WO2022180815A1 - Information processing program, information processing method, and information processing device - Google Patents

Information processing program, information processing method, and information processing device Download PDF

Info

Publication number
WO2022180815A1
WO2022180815A1 PCT/JP2021/007476 JP2021007476W WO2022180815A1 WO 2022180815 A1 WO2022180815 A1 WO 2022180815A1 JP 2021007476 W JP2021007476 W JP 2021007476W WO 2022180815 A1 WO2022180815 A1 WO 2022180815A1
Authority
WO
WIPO (PCT)
Prior art keywords
api
information
integrity
linked
response
Prior art date
Application number
PCT/JP2021/007476
Other languages
French (fr)
Japanese (ja)
Inventor
壮吉 藤田
仙知 大三島
チャーミン ハンシ ラナウィーラ,ジャヤラタゲー
源 高
Original Assignee
富士通株式会社
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 富士通株式会社 filed Critical 富士通株式会社
Priority to JP2023501976A priority Critical patent/JPWO2022180815A1/ja
Priority to PCT/JP2021/007476 priority patent/WO2022180815A1/en
Publication of WO2022180815A1 publication Critical patent/WO2022180815A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design

Definitions

  • the present invention relates to an information processing program, an information processing method, and an information processing apparatus.
  • the processing result is used to create a request for the second API. This is the same between each API even when combining three or more APIs.
  • the disclosed technology has been made in view of the above, and aims to provide an information processing program, an information processing method, and an information processing apparatus that efficiently combine a plurality of APIs.
  • the information processing program disclosed in this application causes a computer to execute the following processes.
  • the first API has integrity that enables the creation of a request to the second API based on the information of the first API including definition information and the information contained in the response of the first API.
  • Processing to determine whether or not. generating information for generating the request to the second API based on information included in the response of the first API if it is determined that the first API does not have the integrity;
  • the present invention can efficiently combine multiple APIs.
  • FIG. 1 is a system configuration diagram of an API combination support system.
  • FIG. 2 is a block diagram of an API combination support device.
  • FIG. 3 is a diagram showing an example of connecting two APIs.
  • FIG. 4 is a diagram showing an example of connecting two APIs by a plurality of APIs.
  • FIG. 5 is a flowchart of API combination processing by the API combination support device according to the embodiment.
  • FIG. 6 is a flow chart of search processing for the link API.
  • FIG. 7 is a hardware configuration diagram of an API combination support device.
  • Fig. 1 is a system configuration diagram of the API combination support system.
  • the API combination support system 1 has an API combination support device 10 , a repository 20 and a user terminal 30 .
  • the API combination support device 10 is an information processing device such as a server, and performs combination processing for combining designated APIs.
  • API combination support device 10 is connected to repository 20 and user terminal 30 .
  • the repository 20 includes a database of definition information for multiple APIs.
  • the API definition information includes schema definition information indicating data information used in a request for each API and data information returned in a response.
  • the definition information includes various kinds of information that serve as criteria for judging the completeness of the API.
  • An incomplete API is an API that cannot pass processing to the next API without the help of another API. That is, an API having integrity with respect to the second API can be said to be an API that has the property of being able to create a request for the second API based on the information included in the response.
  • the definition information also includes, for example, the presence or absence of external references in each API, the size of the request value, the size of the response value, the number of request keys, the number of response keys, and the like.
  • the definition information also includes the name of the key of the response, the type and content of the value, and the outline and details of each API. Furthermore, in the repository 20, connectable APIs are arranged so that they have close addresses.
  • the repository 20 may include integrity information indicating whether each API is complete or incomplete.
  • the completeness information may be registered by the administrator of the API combination support system 1 based on past combination results, or information defined by the administrator may be registered.
  • the repository 20 may store past combination information.
  • API information a collection of definition information and completeness information for each API included in the repository 20 is simply referred to as "API information”.
  • the user terminal 30 is a terminal that requests the API combination support device 10 to combine APIs.
  • the user terminal 30 receives an input from the user P specifying APIs to be combined. Then, the user terminal 30 transmits identification information of the specified API to the API combination support device 10 and requests execution of API combination.
  • FIG. 2 is a block diagram of the API combination support device.
  • the API combination support device 10 has an API acquisition unit 101, an API information acquisition unit 102, a linked API search unit 103, an integrity determination unit 104, and a combination generation unit 105, as shown in FIG.
  • the number of APIs to be combined is not limited, but the procedure for combining individual APIs is the same between any APIs. That is, when combining N APIs in order, the API combination support device 10 can: Combinations can be performed in a similar manner. Therefore, the case where two APIs are combined will be described below.
  • the API that is read and executed earlier is called the “first API”, and is called after the first API, and based on the execution result of the first API
  • the API that is executed is called the "second API”.
  • an API for connecting the first API and the second API is called a "connection API”.
  • the first AIP corresponds to an example of the first API
  • the second API corresponds to an example of the second API.
  • the API acquisition unit 101 receives the identification information of the first API and the second API from the user terminal 30, and receives a request to execute the combination of the first API and the second API. Then, API acquisition section 101 outputs the identification information of the first API to API information acquisition section 102 . API acquisition section 101 also outputs the identification information of the first API and the second API to linked API search section 103 and completeness determination section 104 .
  • the API information acquisition unit 102 receives the input of the identification information of the first API from the API acquisition unit 101 . Then, the API information acquisition unit 102 determines whether or not the integrity information for the first API exists in the repository 20 . When the integrity information exists, the API information acquisition unit 102 acquires the integrity information of the first API from the repository 20 and outputs it to the integrity determination unit 104 .
  • the API information acquisition unit 102 acquires the definition information of the first API from the repository 20. Then, API information acquisition section 102 outputs the acquired definition information of the first API to integrity determination section 104 .
  • the API information acquisition unit 102 receives from the link API search unit 103 a request to acquire past combination information of the first API or the link API and the second API.
  • the API information acquisition unit 102 acquires the specified past combination information from the repository 20 and outputs the acquired past combination information to the linked API search unit 103 .
  • API information acquisition section 102 notifies link API search section 103 of the absence of past combination information sound.
  • the API information acquisition unit 102 also receives an API information acquisition request from the linked API search unit 103 . Then, the API information acquisition unit 102 determines whether or not the integrity information for the specified API exists in the repository 20 . When the integrity information exists, the API information acquisition unit 102 acquires the integrity information of the designated API from the repository 20 and outputs it to the integrity determination unit 104 .
  • the API information acquisition unit 102 acquires the definition information of the specified API from the repository 20. Then, API information acquisition section 102 outputs the definition information of the designated API to integrity determination section 104 .
  • the integrity determination unit 104 receives input of the first API information and the second API identification information from the API acquisition unit 101 . Next, when the integrity information of the first API exists in the repository 20 , the integrity determination unit 104 acquires the integrity information of the first API from the API information acquisition unit 102 . Then, the integrity determination unit 104 determines whether or not the first API has integrity based on the integrity information.
  • the integrity determination unit 104 receives the input of the definition information of the first API from the API information acquisition unit 102. Then, the integrity determination unit 104 determines the integrity of the first API based on the scoring and classification results of a predetermined rule-based algorithm using the information included in the acquired definition information. An example of scoring and classification results by a rule-based algorithm will be described below.
  • the integrity determination unit 104 acquires API schema definition information from the definition information and checks the presence or absence of external references based on whether the URL (Uniform Resource Locator) or ID (Identifier) of the external resource exists. do. Then, the completeness determination unit 104 increases the incompleteness score when there is an external reference. Further, the completeness determination unit 104 acquires the request value and the response value from the definition information, and calculates the difference between the magnitude of the request value and the magnitude of the response value. Then, the completeness determination unit 104 increases the score of incompleteness as the difference between the magnitude of the request value and the magnitude of the response value increases.
  • the integrity determination unit 104 acquires the number of request keys and the number of response keys from the definition information, and calculates the difference between the number of request keys and the number of response keys. Then, the completeness determination unit 104 increases the incompleteness score as the difference between the number of request keys and the number of response keys increases. Further, the completeness determination unit 104 acquires one or a combination of the name of the response key, the type of the value, and the contents of the value from the definition information. Then, the integrity determination unit 104 determines whether or not the data acquired from the response can be processed by the second API from the acquired information. Then, the completeness determination unit 104 increases the incompleteness score as the probability of the data that can be processed by the second API is low.
  • the integrity determination unit 104 acquires the outline and details of the first API from the definition information, checks the content of the first API, and determines the possibility of having integrity. Then, the completeness determination unit 104 increases the incompleteness score as the possibility of completeness is low. After that, the completeness determination unit 104 calculates the sum of the incompleteness scores, and determines that the first API is incomplete if the calculated result is higher than a predetermined threshold. Conversely, if the calculation result is equal to or less than the predetermined threshold, the integrity determination unit 104 determines that the first API has integrity.
  • the completeness judging unit 104 performs machine learning from learning data using each item obtained from the definition information described above as a feature amount, and classifies whether or not there is completeness using the generated learning model. may be performed to determine whether or not the first API is complete.
  • the integrity determination unit 104 When the first API has integrity, the integrity determination unit 104 outputs information on the first API and the second API to the combination generation unit 105 along with a notification that the first API has integrity. do. At this time, the completeness determination unit 104 also outputs the definition information of the first API and the second API to the combination generation unit 105 . On the other hand, if the first API is incomplete, the completeness determination unit 104 notifies the link API search unit 103 of an instruction to search for a link API for linking the first API and the second API. do.
  • the integrity determination unit 104 receives a request to confirm the integrity of the linked API from the linked API search unit 103 when the first API is incomplete. If the integrity information exists in the repository 20, the integrity determination unit 104 acquires the integrity information and determines the integrity of the designated API. Further, when the integrity information of the specified linked API does not exist in the repository 20 or is incomplete due to the integrity information, the integrity determination unit 104 obtains the definition information of the specified linked API from the API information acquisition unit. 102. The completeness determination unit 104 then performs scoring and classification using a predetermined rule-based algorithm, similar to the first API.
  • the completeness determination unit 104 determines whether or not the specified API has a higher completeness index value obtained by scoring or classification than the preceding linked API. If the completeness index value of the designated API is less than or equal to the previous linked API, the integrity determination unit 104 instructs to re-search the linked API to connect the previous linked API and the second API. is notified to the link API search unit 103 .
  • the completeness determination unit 104 determines the completeness from the results of scoring and classification of the specified API.
  • the integrity determination unit 104 When the specified concatenated API has integrity, the integrity determination unit 104 notifies the combination generation unit 105 that the specified concatenated API has integrity. On the other hand, if the specified linking API is incomplete, the completeness determination unit 104 determines whether the specified API is selected together with the following command for linking the specified linking API and the second API. It notifies the linked API search unit 103 of a link API re-search instruction.
  • the linked API search unit 103 receives input of the identification information of the first API and the second API from the API acquisition unit 101 . After that, when the first API is incomplete, the link API search unit 103 receives a link API search instruction from the completeness determination unit 104 . Then, the linked API search unit 103 searches for linked APIs connected to the first API. Further, when there is a selected linked API, the linked API search unit 103 searches for the next linked API if the previous linked API does not have completeness. Finding the Concatenation API is described in detail below.
  • the linked API search unit 103 requests the API information acquisition unit 102 to acquire the past combination information of the previous API and the second API, and checks the presence or absence of the past combination information of the previous linked API. judge.
  • the completeness determination unit 104 acquires the past combination information of the linked API immediately before the API information acquisition unit 102. Get from Then, the link API search unit 103 requests the API information acquisition unit 102 to acquire the definition information of the link API specified by the acquired past combination information. Get information.
  • the linked API searching unit 103 outputs the information of the first API, the second API, and all the APIs arranged between the first API and the second API to the combination generating unit 105 . At this time, the linked API searching unit 103 also outputs definition information of all APIs arranged between the first API and the second API to the combination generating unit 105 .
  • the linked API search unit 103 requests the API information acquisition unit 102 to acquire the definition information of the immediately previous API. Get the definition information of the previous API. Then, the linked API search unit 103 acquires the key or value of the response of the previous API from the definition information.
  • the linked API search unit 103 stores a predetermined priority for each key and value of the response. For example, the priority is determined in the order in which the following APIs can obtain a response with as much completeness as possible. Therefore, the linked API search unit 103 sorts the keys or values of the previous API response in order of priority.
  • the linked API search unit 103 selects the key or value with the highest priority from among the unselected keys and values arranged in order of priority. Then, the linked API search unit 103 determines whether or not there is an API having the selected key or value in the request item among the APIs having addresses close to the previous linked API in the repository 20 . If there is an API having the selected key or value in the request item among APIs with close addresses, the linked API search unit 103 determines that API as a candidate for the next linked API.
  • the link API search unit 103 determines an API that acquires data from that storage location as a candidate for the next link API.
  • the linking API search unit 103 determines an API that performs a process of extracting the mail address as a candidate for the next linking API.
  • the linked API search unit 103 requests the integrity determination unit 104 to determine the integrity of the APIs determined as candidates for the linked API. After that, the link API search unit 103 receives a response to the integrity determination request from the integrity determination unit 104 .
  • the concatenated API search unit 103 When receiving from the completeness determination unit 104 an instruction to re-search the concatenated API for connecting the immediately preceding concatenated API and the second API, the concatenated API search unit 103 selects a key or value according to the priority. Do it again. Then, using the selected key or value, the linked API search unit 103 searches again for an API that is a candidate for the next linked API, and requests the completeness determination unit 104 to perform completeness determination.
  • the link API search unit 103 selects the determined API as the next link API. do. Then, the linked API searching unit 103 similarly searches for the linked API next to the linked API selected at this time. The linked API search unit 103 repeats determination of the next linked API until the linked API has completeness.
  • the link API search unit 103 terminates the search for the link API.
  • Linked API searching section 103 then outputs to combination generating section 105 the information of the first API, the second API, and all the APIs arranged between the first API and the second API.
  • the linked API searching unit 103 also outputs definition information of all APIs arranged between the first API and the second API to the combination generating unit 105 .
  • the key and value of the response are used to search for the next linked API. good. For example, among the values included in the definition information transfer, other information may be used as long as it is information that can be linked to the second API. Extract to Then, the linked API search unit 103 may determine the most effective API among the APIs corresponding to the extracted information as a candidate for the next linked API.
  • the combination generation unit 105 notifies the integrity determination unit 105 that the first API has integrity and the information and definition information of the first and second APIs. Get from After that, the combination generation unit 105 combines the code for calling the first API and the code for calling the second API when the response of the first API is returned. Accordingly, the combination generator 105 combines the first API and the second API. After that, the combination generator 105 transmits the result of direct combination of the first API and the second API to the user terminal 30 for display, and also transmits the generated code to the user terminal 30 .
  • the combination generation unit 105 generates the first API, the second API, and all the APIs lined up between the first API and the second API. and definition information from the combination generation unit 105 . Then, the combination generating unit 105 generates a code for sequentially calling all linked APIs arranged between the first API and the second API, and generates a code for calling the first API and a code for calling the second API. Insert between Accordingly, the combination generator 105 combines the first API and the second API. After that, the combination generation unit 105 transmits the combination result of arranging the linked APIs between the first API and the second API to the user terminal 30 for display, and transmits the generated code to the user terminal 30. Send.
  • FIG. 3 is a diagram showing a case where one linked API is inserted between the first API and the second API.
  • the first API 201 is a natural language processing API
  • the second API 202 is a chat API.
  • the first API is an API that executes POST for an image under domainA.
  • the second API is an API for executing POST for photos under domainB.
  • the integrity determination unit 104 acquires the value of the response 211 specified from the definition information of the first API 201 .
  • the completeness determination unit 104 determines that the first API 201 is incomplete.
  • the linking API search unit 103 determines, as the linking API 203 , an API for acquiring the natural language corresponding to the id indicating the identification information as the response 212 specified from the definition information of the first API 201 .
  • the linking API 203 is an API that executes GET on the following images for domainA.
  • the integrity determination unit 104 determines that the linkage API 203 has integrity because the response of the linkage API 203 includes text information representing a natural language.
  • Linked API searching section 103 then outputs information on first API 201 , linked API 203 and second API 202 to combination generating section 105 .
  • the combination generation unit 105 arranges codes for reading the first API 201, the concatenated API 203, and the second API 202 using the respective results, and combines the first API 201 and the second API 202.
  • FIG. This completes a series of processes of acquiring the natural language id as a response to the first API 201, which is a natural language API, acquiring the natural language corresponding to the acquired id, and writing the acquired natural language to the chat.
  • FIG. 4 is a diagram showing a case where a plurality of linked APIs are inserted between the first API and the second API.
  • a procedure for inserting a plurality of linking APIs between the first API and the second API to combine the first API and the second API will be described.
  • the case where the first API is API#A, the second API is API#B, and the repository 20 contains information on API#C to #E will be described.
  • the completeness determination unit 104 determines that API#A is incomplete, as in state 301, based on the value of the API#A response.
  • the link API search unit 103 requests the API information acquisition unit 102 to acquire an API that is a candidate for the link API from the key or value of the response of API #A. Then, the link API search unit 103 acquires the information of API #C as an API that is a candidate for the link API. After that, the completeness determination unit 104 determines that the API#C is incomplete as shown in the state 302 from the value of the API#C response.
  • the link API search unit 103 requests the API information acquisition unit 102 to acquire the next link API candidate from the key or value of the API #C response. Then, the link API search unit 103 acquires the information of the API #D as a link API candidate. After that, the completeness determination unit 104 determines that API#D is incomplete, as in state 303, based on the value of the response to API#D. As a result, by arranging API#A, API#C, API#D, and API#B, API#A and API#B are combined.
  • FIG. 5 is a flowchart of API combination processing by the API combination support device according to the embodiment. Next, the flow of API combination processing by the API combination support device 10 according to the embodiment will be described with reference to FIG.
  • the API acquisition unit 101 of the API combination support device 10 receives the identification information of each API to be combined from the user terminal 30 (step S1).
  • the API information acquisition unit 102 acquires the identification information of the first API from the API acquisition unit 101 . Then, the API information acquisition unit 102 acquires the information of the first API from the repository 20 (step S2).
  • the integrity determination unit 104 acquires information on the first API from the API information acquisition unit 102 . Then, the completeness determination unit 104 uses the completeness information or the definition information to determine whether or not the first API is complete (step S3). If the first API has integrity (step S3: affirmative), the integrity determination unit 104 obtains the information indicating that the first API has integrity and the definition information of the first API and the second API. to the combination generation unit 105 . Thereafter, the API combination processing proceeds to step S6. On the other hand, if the first API is incomplete (step S3: No), the completeness determination unit 104 sends the definition information of the first API to the linked API search unit 103 and searches for the linked API. to the link API search unit 103 .
  • the linked API search unit 103 searches for the next linked API (step S4).
  • the linked API search unit 103 requests the integrity determination unit 104 to determine whether or not the next linked API is complete.
  • the integrity determination unit 104 determines whether or not the next link API has integrity (step S5).
  • step S5 No
  • the completeness determination unit 104 notifies the linked API search unit 103 that the next linked API is incomplete. Thereafter, the API combination processing returns to step S4.
  • the integrity determination unit 104 notifies the linked API search unit 103 that the next linked API has integrity.
  • Linked API search unit 103 arranges extracted APIs for combining the first API and second API between the first API and second API, and notifies combination generation unit 105 of the respective definition information.
  • the combination generation unit 105 generates codes for calling each API used to combine the first API and the second API, and arranges them in order (step S6).
  • the combination generation unit 105 inserts a code for sequentially reading each concatenated API between the code for calling the first API and the code for calling the second API.
  • the combination generation unit 105 transmits the combination result of combining the first API and the second API to the user terminal 30 for display, and also transmits the generated code to the user terminal 30 to perform the combination processing. The result is notified to the user P (step S7).
  • FIG. 6 is a flow chart of the search processing for the link API. Each process shown in the flowchart of FIG. 6 corresponds to an example of the process executed in step S4 in FIG.
  • the linked API search unit 103 requests the API information acquisition unit 102 to acquire past combination information of the previous API and the second API, and determines whether the past combination information exists in the repository 20. is determined (step S11).
  • step S11 If the past combination information of the previous linked API and the second API exists in the repository 20 (step S11: Yes), the linked API searching unit 103 proceeds to step S16.
  • the linked API searching unit 103 retrieves the definition information of the previous API. to the API information acquisition unit 102 . Then, the linked API search unit 103 acquires the definition information of the previous API stored in the repository 20 from the API information acquisition unit 102 . Next, the link API search unit 103 extracts the key and value of the response from the acquired definition information. Then, the link API searching unit 103 sorts the keys and values of the extracted response in order of priority (step S12).
  • the linked API search unit 103 selects one unselected item in order of priority from among the keys and values arranged in order of priority (step S13).
  • the linked API search unit 103 determines whether or not there is an API having the selected key or value in the request item among the APIs with addresses close to the previous linked API in the repository 20. (Step S14).
  • step S14 If there is no API having the selected key or value in the request item among APIs with close addresses (step S14: No), the linked API search unit 103 returns to step S13.
  • step S14 if there is an API having the selected key or value in the request item among the APIs with close addresses (step S14: Yes), the link API search unit 103 searches the API for the next link API. Decide as a candidate. Next, the linked API search unit 103 requests the completeness determination unit 104 to determine the integrity of the APIs determined as candidates for the linked API. The integrity determination unit 104 determines whether or not the index value of the integrity of the designated API is higher than that of the previous API (step S15). If the completeness index value does not increase (step S15: No), the link API search process returns to step S13.
  • step S15 the completeness determination unit 104 instructs the linked API search unit 103 to select the designated API.
  • the linked API search unit 103 receives the instruction from the completeness determination unit 104 and selects the corresponding API as the next linked API (step S16).
  • the API combination support device determines the completeness of the first API when combining APIs, and selects a linked API based on the value of the response if the first API is incomplete. and list until you have a complete concatenated API.
  • the API combination support device can easily detect the linking APIs used to combine the specified APIs, and provide information on what kind of APIs are interposed to combine the specified APIs. becomes possible. Therefore, it is possible to efficiently combine a plurality of APIs. In addition, it can contribute to shortening the time required for combination and reducing costs.
  • FIG. 6 is a hardware configuration diagram of the server.
  • the API combination support device 10 according to this embodiment has, for example, a hardware configuration as shown in FIG.
  • the API combination support device 10 has a CPU 91 , a memory 92 , a storage device 93 and a communication module 94 .
  • the CPU 91, memory 92, storage device 93 and communication module 94 are connected by buses.
  • the storage device 93 is an auxiliary storage device such as an SSD (Solid State Drive) or hard disk.
  • the storage device 93 stores various programs including programs for operating the API acquisition unit 101, the API information acquisition unit 102, the linked API search unit 103, the completeness determination unit 104, and the combination generation unit 105 illustrated in FIG. be.
  • the storage device 50 may also store the repository 20 .
  • the communication module 94 is a network interface for the API combination support device 10 to communicate with external devices.
  • the CPU 91 communicates with the repository 20 and the user terminal 30 via the communication module 94 .
  • the memory 92 is a main storage device such as SDRAM (Synchronous Dynamic Random Access Memory).
  • the CPU 91 reads out various programs stored in the storage device 93, develops them on the memory 92, and executes them to obtain the API acquisition unit 101, the API information acquisition unit 102, and the linked API shown in FIG.
  • the functions of the search unit 103, the completeness determination unit 104, and the combination generation unit 105 are realized.
  • API combination support system 10
  • API combination support device 20
  • repository 30
  • API acquisition unit 102
  • API information acquisition unit 103 linked API search unit
  • completeness determination unit 105 combination generation unit

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

An information processing program that makes a computer execute the following processing. Processing that receives a combination request for a first API and a second API. Processing that, on the basis of information for the first API that includes definition information, determines whether the first API has the completeness to make it possible for a request to the second API to be created from information included in a response from the first API. Processing that, when it has been determined that the first API does not have the completeness, searches for and acquires a linking API to generate information for generating the request to the second API on the basis of the information included in the response from the first API.

Description

情報処理プログラム、情報処理方法及び情報処理装置Information processing program, information processing method, and information processing apparatus
 本発明は、情報処理プログラム、情報処理方法及び情報処理装置に関する。 The present invention relates to an information processing program, an information processing method, and an information processing apparatus.
 近年、ユーザが複数のAPI(Application Programing Interface)を組み合わせることで、ユーザの業務を自動化する機能を有するクラウドサービスが提案されている。このサービスは、IT(Information Technology)技術者のみならず、ビジネスユーザもターゲットとしている。 In recent years, cloud services have been proposed that have functions that allow users to automate their work by combining multiple APIs (Application Programming Interfaces). This service targets not only IT (Information Technology) engineers but also business users.
 このようなクラウドサービスを使う場合、APIを正しく組み合わせることで、業務の自動化が適切に実現される。APIを正しく組み合わせるためには、APIの仕様を理解し、且つ、APIを繋げるためのコードを記述することなどが求められるが、技術的な詳細の理解が乏しいユーザがこれらを実施することは難しい。 When using such a cloud service, the correct combination of APIs will properly automate operations. In order to combine APIs correctly, it is necessary to understand API specifications and write code to connect APIs, but it is difficult for users who do not have a good understanding of technical details to do this. .
 例えば、2つのAPIを組み合わせる場合、一般的に1個目のAPIのレスポンスが適切に処理された後に、処理結果を用いて2個目のAPIに対するリクエストの作成が行われる。これは、3つ以上のAPIを組み合わせる場合でも、各API間で同様である。 For example, when combining two APIs, generally after the response of the first API is properly processed, the processing result is used to create a request for the second API. This is the same between each API even when combining three or more APIs.
 ただし、1個目のAPIのレスポンスが不完全である場合、2個目のAPIをそのまま組み合わせることは困難である。そのような場合、1個目のAPIと2個目のAPIとの間を繋ぐ別のAPIを探して、探し出したAPIにより1個目のAPIの処理結果と2個目のAPIに対するリクエストとを繋ぐ処理を記述する作業が発生する。例えば、画像認識や自然言語を扱うAPIは、レスポンスに実行結果が含まれていない場合が多い。そして、そのようなレスポンスでは、実行結果の格納場所が示される場合が多い。このような場合に、2個目のAPIで実行結果を用いるためには、1番目のAPIのレスポンスに含まれる処理結果を用いて実行結果を取得する別のAPIを呼び出し、2個目のAPIに対するリクエストで用いる情報を取得することが求められる。 However, if the response of the first API is incomplete, it is difficult to combine the second API as it is. In such a case, another API that connects the first API and the second API is searched, and the processing result of the first API and the request for the second API are sent by the searched API. Work to describe the connecting process occurs. For example, APIs that handle image recognition and natural language often do not include execution results in responses. Such a response often indicates the storage location of the execution result. In such a case, in order to use the execution result in the second API, another API that acquires the execution result is called using the processing result included in the response of the first API, and the second API It is required to obtain information used in requests to
 従来、APIを繋ぐ技術としては、複数のAPIを収集し、各APIの情報からAPIの相関を決定して、APIマッシュアップデータベースを作成し、利用者の要求に対してマッシュアップのための適切なAPIを応答する技術がある。また、API呼び出し処理を行う場合に、並列性を考慮して効率よくプログラムを実行する技術がある。 Conventionally, as a technology for connecting APIs, multiple APIs are collected, the correlation of APIs is determined from the information of each API, an API mashup database is created, and appropriate There is a technology that responds to various APIs. There is also a technique for efficiently executing a program in consideration of parallelism when performing API call processing.
特開2020-126641号公報JP 2020-126641 A 特開2019-179383号公報JP 2019-179383 A
 しかしながら、2つのAPIを接続する作業を、IT技術者でないビジネスユーザなどが実行する場合、様々なミスの発生が懸念される。例えば、使用したい2つのAPIに対する間を繋ぐAPIの組み合わせの誤りや、入力情報間違いなどが発生するおそれがある。このようなミスにより異常が発生した場合、異常の原因の特定及び修正を行うことが求められる。ミスが複数である場合には、何度もこれらの工程が繰り返されることになる。そのため、複数のAPIの組み合わせを効率よく行うことが困難となる。そして、求めるAPIの組み合わせにより実現しようとするサービスを正常に動作させるまでに多くの時間がかかり、所望するサービスを容易に手に入れることが困難となる。 However, when business users who are not IT engineers perform the task of connecting the two APIs, there is concern that various mistakes may occur. For example, there is a risk of an error in the combination of APIs connecting two APIs to be used, an error in input information, and the like. When an abnormality occurs due to such a mistake, it is required to identify the cause of the abnormality and correct it. If there are multiple mistakes, these steps will be repeated many times. Therefore, it becomes difficult to efficiently combine a plurality of APIs. In addition, it takes a long time to normally operate the service to be realized by combining the required APIs, making it difficult to easily obtain the desired service.
 また、APIマッシュアップデータベースを作成して適切なAPIを提案する技術では、APIの適切な組み合わせの提案は可能であるが、自動的に2つのAPI間を繋ぐAPIを検出してAPIを組み合わせることは困難である。また、API呼び出し処理を行う場合に並列性を考慮して効率よくプログラムを実行する技術でも、自動的に2つのAPI間を繋ぐAPIを検出してAPIを組み合わせることは困難である。したがって、いずれの技術を用いても、複数のAPIの組み合わせを効率よく行うことは困難である。 In addition, in the technique of creating an API mashup database and proposing an appropriate API, it is possible to propose an appropriate combination of APIs, but it is difficult to automatically detect an API that connects two APIs and combine the APIs. It is difficult. Moreover, even with a technique for efficiently executing a program in consideration of parallelism when performing API call processing, it is difficult to automatically detect an API that connects two APIs and combine the APIs. Therefore, no matter which technology is used, it is difficult to efficiently combine multiple APIs.
 開示の技術は、上記に鑑みてなされたものであって、複数のAPIの組み合わせを効率よく行う情報処理プログラム、情報処理方法及び情報処理装置を提供することを目的とする。 The disclosed technology has been made in view of the above, and aims to provide an information processing program, an information processing method, and an information processing apparatus that efficiently combine a plurality of APIs.
 本願の開示する、情報処理プログラムは以下の処理をコンピュータに実行させる。第1のAPIと第2のAPIとの組み合わせ要求を受け付ける処理。定義情報を含む前記第1のAPIの情報を基に、前記第1のAPIのレスポンスに含まれる情報により前記第2のAPIに対するリクエストが作成可能となる完全性を、前記第1のAPIが有するか否かを判定する処理。前記第1のAPIが前記完全性を有さないと判定した場合、前記第1のAPIの前記レスポンスに含まれる情報を基に前記第2のAPIに対する前記リクエストを生成するための情報を生成する連結APIを探索して取得する処理。 The information processing program disclosed in this application causes a computer to execute the following processes. A process of accepting a combination request for a first API and a second API. The first API has integrity that enables the creation of a request to the second API based on the information of the first API including definition information and the information contained in the response of the first API. Processing to determine whether or not. generating information for generating the request to the second API based on information included in the response of the first API if it is determined that the first API does not have the integrity; A process of searching for and acquiring a connection API.
 1つの側面では、本発明は、複数のAPIの組み合わせを効率よく行うことができる。 In one aspect, the present invention can efficiently combine multiple APIs.
図1は、API組合せ支援システムのシステム構成図である。FIG. 1 is a system configuration diagram of an API combination support system. 図2は、API組合せ支援装置のブロック図である。FIG. 2 is a block diagram of an API combination support device. 図3は、2つのAPIを接続の一例を示す図である。FIG. 3 is a diagram showing an example of connecting two APIs. 図4は、2つのAPIを複数のAPIで接続する場合の一例を示す図である。FIG. 4 is a diagram showing an example of connecting two APIs by a plurality of APIs. 図5は、実施例に係るAPI組合せ支援装置によるAPI組合せ処理のフローチャートである。FIG. 5 is a flowchart of API combination processing by the API combination support device according to the embodiment. 図6は、連結APIの探索処理のフローチャートである。FIG. 6 is a flow chart of search processing for the link API. 図7は、API組合せ支援装置のハードウェア構成図である。FIG. 7 is a hardware configuration diagram of an API combination support device.
 以下に、本願の開示する情報処理プログラム、情報処理方法及び情報処理装置の実施例を図面に基づいて詳細に説明する。なお、以下の実施例により本願の開示する情報処理プログラム、情報処理方法及び情報処理装置が限定されるものではない。 Hereinafter, embodiments of the information processing program, the information processing method, and the information processing apparatus disclosed in the present application will be described in detail based on the drawings. The information processing program, the information processing method, and the information processing apparatus disclosed in the present application are not limited to the following embodiments.
 図1は、API組合せ支援システムのシステム構成図である。API組合せ支援システム1は、API組合せ支援装置10、リポジトリ20及び利用者端末30を有する。 Fig. 1 is a system configuration diagram of the API combination support system. The API combination support system 1 has an API combination support device 10 , a repository 20 and a user terminal 30 .
 API組合せ支援装置10は、サーバなどの情報処理装置であり、指定されたAPIを組み合わせる組合せ処理を行う。API組合せ支援装置10は、リポジトリ20及び利用者端末30と接続される。 The API combination support device 10 is an information processing device such as a server, and performs combination processing for combining designated APIs. API combination support device 10 is connected to repository 20 and user terminal 30 .
 リポジトリ20は、複数のAPIの定義情報のデータベースを含む。APIの定義情報には、それぞれのAPIに対するリクエストで用いられるデータの情報及びレスポンスで返されるデータの情報を示すスキーマ定義情報が含まれる。他にも、定義情報には、APIの完全性を判定するための基準となる各種情報が含まれる。不完全なAPIとは、他のAPIの助けがないと次のAPIに処理を渡せないAPIである。すなわち、2番目のAPIに対して完全性を有するAPIとは、レスポンスに含まれる情報により前記2番目のAPIに対するリクエストが作成可能となる性質を有するAPIといえる。 The repository 20 includes a database of definition information for multiple APIs. The API definition information includes schema definition information indicating data information used in a request for each API and data information returned in a response. In addition, the definition information includes various kinds of information that serve as criteria for judging the completeness of the API. An incomplete API is an API that cannot pass processing to the next API without the help of another API. That is, an API having integrity with respect to the second API can be said to be an API that has the property of being able to create a request for the second API based on the information included in the response.
 また、定義情報には、例えば、それぞれのAPIにおける外部参照の有無、リクエストの値大きさ、レスポンスの値の大きさ、リクエストのキーの個数、レスポンスのキーの個数などが含まれる。また、定義情報には、レスポンスのキーの名称、値の型及び値の内容、並びに、それぞれのAPIの概要及び詳細が含まれる。さらに、リポジトリ20では、接続可能なAPI同士が近いアドレスを有するように配置される。 The definition information also includes, for example, the presence or absence of external references in each API, the size of the request value, the size of the response value, the number of request keys, the number of response keys, and the like. The definition information also includes the name of the key of the response, the type and content of the value, and the outline and details of each API. Furthermore, in the repository 20, connectable APIs are arranged so that they have close addresses.
 また、リポジトリ20は、それぞれのAPIについて完全性を有するか不完全であるかを表す完全性情報を含んでもよい。完全性情報は、例えば、過去の組み合わせ結果を基にAPI組合せ支援システム1の管理者が登録してもよいし、管理者により定義された情報が登録されてもよい。また、リポジトリ20には、過去の組合せ情報が格納されてもよい。ここでは、リポジトリ20に含まれる各APIについての定義情報や完全性情報をまとめたものを、単に「APIの情報」と呼ぶ。 Also, the repository 20 may include integrity information indicating whether each API is complete or incomplete. For example, the completeness information may be registered by the administrator of the API combination support system 1 based on past combination results, or information defined by the administrator may be registered. Also, the repository 20 may store past combination information. Here, a collection of definition information and completeness information for each API included in the repository 20 is simply referred to as "API information".
 利用者端末30は、APIの組み合わせの要求をAPI組合せ支援装置10に対して行う端末である。利用者端末30は、利用者Pから組み合わせるAPIの指定の入力を受ける。そして、利用者端末30は、指定されたAPIの識別情報をAPI組合せ支援装置10へ送信して、APIの組み合わせの実行を要求する。 The user terminal 30 is a terminal that requests the API combination support device 10 to combine APIs. The user terminal 30 receives an input from the user P specifying APIs to be combined. Then, the user terminal 30 transmits identification information of the specified API to the API combination support device 10 and requests execution of API combination.
 図2は、API組合せ支援装置のブロック図である。API組合せ支援装置10は、図2に示すように、API取得部101、API情報取得部102、連結API探索部103、完全性判定部104及び組合せ生成部105を有する。ここで、組み合わせるAPIの数に制限はないが、個々のAPIの組み合わせ手順はいずれのAPI間でも同様である。すなわち、N個のAPIを順番に組み合わせる場合、i個目(0<i<N)のAPIを先行するAPIとしてi+1個目のAPIを後続のAPIとして考えることで、API組合せ支援装置10は、同様の処理で組み合わせを実行することができる。そのため、以下では2つのAPIを組み合わせる場合で説明する。ここでは、組み合わせる2つのAPIのうち先に読みだされて実行されるAPIを「1番目のAPI」と呼び、1番目のAPIの後で呼び出されて、1番目のAPIの実行結果に基づいて実行されるAPIを「2番目のAPI」と呼ぶ。また、1番目のAPIと2番目のAPIとの間を繋ぐためのAPIを「連結API」と呼ぶ。1番目のAIPが第1のAPIの一例にあたり、2番目のAPIが第2のAPIの一例にあたる。 FIG. 2 is a block diagram of the API combination support device. The API combination support device 10 has an API acquisition unit 101, an API information acquisition unit 102, a linked API search unit 103, an integrity determination unit 104, and a combination generation unit 105, as shown in FIG. Here, the number of APIs to be combined is not limited, but the procedure for combining individual APIs is the same between any APIs. That is, when combining N APIs in order, the API combination support device 10 can: Combinations can be performed in a similar manner. Therefore, the case where two APIs are combined will be described below. Here, of the two APIs to be combined, the API that is read and executed earlier is called the "first API", and is called after the first API, and based on the execution result of the first API The API that is executed is called the "second API". Also, an API for connecting the first API and the second API is called a "connection API". The first AIP corresponds to an example of the first API, and the second API corresponds to an example of the second API.
 API取得部101は、1番目のAPI及び2番目のAPIの識別情報を利用者端末30から受信して、1番目のAPIと2番目のAPIとの組み合わせの実行要求を受ける。そして、API取得部101は、1番目のAPIの識別情報をAPI情報取得部102へ出力する。また、API取得部101は、1番目のAPI及び2番目のAPIの識別情報を連結API探索部103及び完全性判定部104へ出力する。 The API acquisition unit 101 receives the identification information of the first API and the second API from the user terminal 30, and receives a request to execute the combination of the first API and the second API. Then, API acquisition section 101 outputs the identification information of the first API to API information acquisition section 102 . API acquisition section 101 also outputs the identification information of the first API and the second API to linked API search section 103 and completeness determination section 104 .
 API情報取得部102は、1番目のAPIの識別情報の入力をAPI取得部101から受ける。そして、API情報取得部102は、1番目のAPIについて完全性情報がリポジトリ20に存在するか否かを判定する。完全性情報が存在する場合、API情報取得部102は、リポジトリ20から1番目のAPIの完全性情報を取得して完全性判定部104へ出力する。 The API information acquisition unit 102 receives the input of the identification information of the first API from the API acquisition unit 101 . Then, the API information acquisition unit 102 determines whether or not the integrity information for the first API exists in the repository 20 . When the integrity information exists, the API information acquisition unit 102 acquires the integrity information of the first API from the repository 20 and outputs it to the integrity determination unit 104 .
 これに対して、1番目のAPIの完全性情報が存在しない場合、API情報取得部102は、1番目のAPIの定義情報をリポジトリ20から取得する。そして、API情報取得部102は、取得した1番目のAPIの定義情報を完全性判定部104へ出力する。 On the other hand, if the integrity information of the first API does not exist, the API information acquisition unit 102 acquires the definition information of the first API from the repository 20. Then, API information acquisition section 102 outputs the acquired definition information of the first API to integrity determination section 104 .
 また、API情報取得部102は、1番目のAPI又は連結APIと2番目のAPIとの過去の組合せ情報の取得要求を連結API探索部103から受ける。指定された過去の組合せ情報がリポジトリ20に存在する場合、API情報取得部102は、リポジトリ20から指定された過去の組合せ情報を取得して連結API探索部103へ出力する。指定された過去の組合せ情報がない場合、API情報取得部102は、過去の組合せ情報音不存在を連結API探索部103へ通知する。 Also, the API information acquisition unit 102 receives from the link API search unit 103 a request to acquire past combination information of the first API or the link API and the second API. When the specified past combination information exists in the repository 20 , the API information acquisition unit 102 acquires the specified past combination information from the repository 20 and outputs the acquired past combination information to the linked API search unit 103 . When there is no designated past combination information, API information acquisition section 102 notifies link API search section 103 of the absence of past combination information sound.
 また、API情報取得部102は、APIの情報取得要求を連結API探索部103から受ける。そして、API情報取得部102は、指定されたAPIについて完全性情報がリポジトリ20に存在するか否かを判定する。完全性情報が存在する場合、API情報取得部102は、リポジトリ20から指定されたAPIの完全性情報を取得して完全性判定部104へ出力する。 The API information acquisition unit 102 also receives an API information acquisition request from the linked API search unit 103 . Then, the API information acquisition unit 102 determines whether or not the integrity information for the specified API exists in the repository 20 . When the integrity information exists, the API information acquisition unit 102 acquires the integrity information of the designated API from the repository 20 and outputs it to the integrity determination unit 104 .
 これに対して、完全性情報を有さない場合、API情報取得部102は、指定されたAPIの定義情報をリポジトリ20から取得する。そして、API情報取得部102は、指定されたAPIの定義情報を完全性判定部104へ出力する。 On the other hand, if there is no completeness information, the API information acquisition unit 102 acquires the definition information of the specified API from the repository 20. Then, API information acquisition section 102 outputs the definition information of the designated API to integrity determination section 104 .
 完全性判定部104は、1番目のAPIの情報及び2番目のAPIの識別情報の入力をAPI取得部101から受ける。次に、1番目のAPIの完全性情報がリポジトリ20に存在する場合、完全性判定部104は、1番目のAPIの完全性情報をAPI情報取得部102から取得する。そして、完全性判定部104は、完全性情報により1番目のAPIが完全性を有するか否かを判定する。 The integrity determination unit 104 receives input of the first API information and the second API identification information from the API acquisition unit 101 . Next, when the integrity information of the first API exists in the repository 20 , the integrity determination unit 104 acquires the integrity information of the first API from the API information acquisition unit 102 . Then, the integrity determination unit 104 determines whether or not the first API has integrity based on the integrity information.
 これに対して、1番目のAPIの完全性情報がリポジトリ20に存在しない場合、完全性判定部104は、1番目のAPIの定義情報の入力をAPI情報取得部102から受ける。そして、完全性判定部104は、取得した定義情報に含まれる情報を用いて予め決められたルールベースのアルゴリズムによるスコアリングや分類結果により、1番目のAPIの完全性を判定する。以下に、ルールベースのアルゴリズムによるスコアリングや分類結果の一例について説明する。 On the other hand, if the integrity information of the first API does not exist in the repository 20, the integrity determination unit 104 receives the input of the definition information of the first API from the API information acquisition unit 102. Then, the integrity determination unit 104 determines the integrity of the first API based on the scoring and classification results of a predetermined rule-based algorithm using the information included in the acquired definition information. An example of scoring and classification results by a rule-based algorithm will be described below.
 例えば、完全性判定部104は、定義情報からAPIのスキーマ定義情報などを取得して外部リソースのURL(Uniform Resource Locator)やID(Identifier)が存在するか否かなどから外部参照の有無を確認する。そして、完全性判定部104は、外部参照がある場合、不完全性スコアを高くする。また、完全性判定部104は、定義情報からリクエスト値とレスポンス値とを取得して、リクエスト値の大きさとレスポンス値との大きさとの差分を算出する。そして、完全性判定部104は、リクエスト値の大きさとレスポンス値との大きさとの差分が大きいほど不完全性のスコアを高くする。また、完全性判定部104は、定義情報からリクエストキーの個数とレスポンスキーの個数を取得して、リクエストキーの個数とレスポンスキーの個数の差分を算出する。そして、完全性判定部104は、リクエストキーの個数とレスポンスキーの個数の差分が大きいほど不完全性のスコアを高くする。また、完全性判定部104は、定義情報からレスポンスキーの名称、値の型又は値の内容のいずれか一つもしくはその組み合わせを取得する。そして、完全性判定部104は、取得した情報からレスポンスから取得されるデータが2番目のAPIで処理可能なデータか否かを判定する。そして、完全性判定部104は、2番目のAPIで処理可能なデータの可能性が低いほど、不完全性のスコアを高くする。また、完全性判定部104は、定義情報から1番目のAPIの概要及び詳細を取得して、1番目のAPIの内容を確認して完全性を有する可能性を判定する。そして、完全性判定部104は、完全性を有する可能性が低いほど、不完全性のスコアを高くする。その後、完全性判定部104は、不完全性のスコアの合計を算出して、算出結果が予め決められた閾値よりも高ければ1番目のAPIが不完全であると判定する。逆に、算出結果が予め決められた閾値以下であれば、完全性判定部104は、1番目のAPIが完全性を有すると判定する。 For example, the integrity determination unit 104 acquires API schema definition information from the definition information and checks the presence or absence of external references based on whether the URL (Uniform Resource Locator) or ID (Identifier) of the external resource exists. do. Then, the completeness determination unit 104 increases the incompleteness score when there is an external reference. Further, the completeness determination unit 104 acquires the request value and the response value from the definition information, and calculates the difference between the magnitude of the request value and the magnitude of the response value. Then, the completeness determination unit 104 increases the score of incompleteness as the difference between the magnitude of the request value and the magnitude of the response value increases. Further, the integrity determination unit 104 acquires the number of request keys and the number of response keys from the definition information, and calculates the difference between the number of request keys and the number of response keys. Then, the completeness determination unit 104 increases the incompleteness score as the difference between the number of request keys and the number of response keys increases. Further, the completeness determination unit 104 acquires one or a combination of the name of the response key, the type of the value, and the contents of the value from the definition information. Then, the integrity determination unit 104 determines whether or not the data acquired from the response can be processed by the second API from the acquired information. Then, the completeness determination unit 104 increases the incompleteness score as the probability of the data that can be processed by the second API is low. Further, the integrity determination unit 104 acquires the outline and details of the first API from the definition information, checks the content of the first API, and determines the possibility of having integrity. Then, the completeness determination unit 104 increases the incompleteness score as the possibility of completeness is low. After that, the completeness determination unit 104 calculates the sum of the incompleteness scores, and determines that the first API is incomplete if the calculated result is higher than a predetermined threshold. Conversely, if the calculation result is equal to or less than the predetermined threshold, the integrity determination unit 104 determines that the first API has integrity.
 他にも、完全性判定部104は、上述した定義情報から得られる各項目などを特徴量とした学習データから機械学習を行い、生成した学習モデルを用いて完全性を有するか否かの分類を行い、1番目のAPIの完全性の有無を判定してもよい。 In addition, the completeness judging unit 104 performs machine learning from learning data using each item obtained from the definition information described above as a feature amount, and classifies whether or not there is completeness using the generated learning model. may be performed to determine whether or not the first API is complete.
 1番目のAPIが完全性を有する場合、完全性判定部104は、1番目のAPIが完全性を有する旨の通知とともに、1番目のAPI及び2番目のAPIの情報を組合せ生成部105へ出力する。この時、完全性判定部104は、1番目のAPI及び2番目のAPIの定義情報も組合せ生成部105へ出力する。これに対して、1番目のAPIが不完全である場合、完全性判定部104は、1番目のAPIと2番目のAPIとを繋ぐための連結APIの探索指示を連結API探索部103に通知する。 When the first API has integrity, the integrity determination unit 104 outputs information on the first API and the second API to the combination generation unit 105 along with a notification that the first API has integrity. do. At this time, the completeness determination unit 104 also outputs the definition information of the first API and the second API to the combination generation unit 105 . On the other hand, if the first API is incomplete, the completeness determination unit 104 notifies the link API search unit 103 of an instruction to search for a link API for linking the first API and the second API. do.
 また、完全性判定部104は、1番目のAPIが不完全な場合、連結APIの完全性の確認要求を連結API探索部103から受ける。完全性情報がリポジトリ20に存在すれば、完全性判定部104は、その完全性情報を取得して指定されたAPIの完全性を判定する。また、指定された連結APIの完全性情報がリポジトリ20に存在しない場合もしくは完全性情報により不完全とされた場合、完全性判定部104は、指定された連結APIの定義情報をAPI情報取得部102から取得する。そして、完全性判定部104は、1番目のAPIと同様に予め決められたルールベースのアルゴリズムによるスコアリングや分類を行なう。 Also, the integrity determination unit 104 receives a request to confirm the integrity of the linked API from the linked API search unit 103 when the first API is incomplete. If the integrity information exists in the repository 20, the integrity determination unit 104 acquires the integrity information and determines the integrity of the designated API. Further, when the integrity information of the specified linked API does not exist in the repository 20 or is incomplete due to the integrity information, the integrity determination unit 104 obtains the definition information of the specified linked API from the API information acquisition unit. 102. The completeness determination unit 104 then performs scoring and classification using a predetermined rule-based algorithm, similar to the first API.
 そして、完全性判定部104は、スコアリングや分類により求められる完全性の指標値について、指定されたAPIの方が1つ前の連結APIよりも高いか否かを判定する。指定されたAPIの完全性の指標値が1つ前の連結API以下の場合、完全性判定部104は、1つ前の連結APIと2番目のAPIとを繋ぐための連結APIの再探索指示を連結API探索部103に通知する。 Then, the completeness determination unit 104 determines whether or not the specified API has a higher completeness index value obtained by scoring or classification than the preceding linked API. If the completeness index value of the designated API is less than or equal to the previous linked API, the integrity determination unit 104 instructs to re-search the linked API to connect the previous linked API and the second API. is notified to the link API search unit 103 .
 これに対して、指定されたAPIの指標値が1つ前の連結APIより高い場合、完全性判定部104は、指定されたAPIのスコアリングや分類の結果から完全性を判定する。 On the other hand, if the index value of the specified API is higher than the preceding linked API, the completeness determination unit 104 determines the completeness from the results of scoring and classification of the specified API.
 指定された連結APIが完全性を有する場合、完全性判定部104は、指定された連結APIが完全性を有することを組合せ生成部105に通知する。これに対して、指定された連結APIが不完全である場合、完全性判定部104は、指定されたAPIが選定指示とともに、指定された連結APIと2番目のAPIとを繋ぐための次の連結APIの再探索指示を連結API探索部103に通知する。 When the specified concatenated API has integrity, the integrity determination unit 104 notifies the combination generation unit 105 that the specified concatenated API has integrity. On the other hand, if the specified linking API is incomplete, the completeness determination unit 104 determines whether the specified API is selected together with the following command for linking the specified linking API and the second API. It notifies the linked API search unit 103 of a link API re-search instruction.
 連結API探索部103は、1番目のAPI及び2番目のAPIの識別情報の入力をAPI取得部101から受ける。その後、1番目のAPIが不完全な場合、連結API探索部103は、連結APIの探索指示を完全性判定部104から受ける。そして、連結API探索部103は、1番目のAPIに繋がる連結APIの探索を行う。また、連結API探索部103は、選定済みの連結APIが存在する場合、1つ前の連結APIが完全性を有さなければ、次の連結APIの探索を行う。以下に連結APIの探索を詳細に説明する。 The linked API search unit 103 receives input of the identification information of the first API and the second API from the API acquisition unit 101 . After that, when the first API is incomplete, the link API search unit 103 receives a link API search instruction from the completeness determination unit 104 . Then, the linked API search unit 103 searches for linked APIs connected to the first API. Further, when there is a selected linked API, the linked API search unit 103 searches for the next linked API if the previous linked API does not have completeness. Finding the Concatenation API is described in detail below.
 連結API探索部103は、1つ前のAPIと2番目のAPIとの過去の組合せ情報の取得をAPI情報取得部102に依頼して、1つ前の連結APIの過去の組合せ情報の有無を判定する。リポジトリ20に1つ前の連結APIと2場目のAPIとの過去の組合せ情報が存在する場合、完全性判定部104は、1つ前の連結APIの過去の組合せ情報をAPI情報取得部102から取得する。そして、連結API探索部103は、取得した過去の組合せ情報で指定された連結APIの定義情報の取得要求をAPI情報取得部102に対して行い、過去の組合せ情報で指定された連結APIの定義情報を取得する。その後、連結API探索部103は、1番目のAPI及び2番目のAPI、並びに、1番目のAPIと2番目のAPIとの間に並ぶ全てのAPIの情報を組合せ生成部105へ出力する。この時、連結API探索部103は、1番目のAPIと2番目のAPIとの間に並ぶ全てのAPIの定義情報も組合せ生成部105へ出力する。 The linked API search unit 103 requests the API information acquisition unit 102 to acquire the past combination information of the previous API and the second API, and checks the presence or absence of the past combination information of the previous linked API. judge. When past combination information of the linked API immediately before and the API in the second place exists in the repository 20, the completeness determination unit 104 acquires the past combination information of the linked API immediately before the API information acquisition unit 102. Get from Then, the link API search unit 103 requests the API information acquisition unit 102 to acquire the definition information of the link API specified by the acquired past combination information. Get information. After that, the linked API searching unit 103 outputs the information of the first API, the second API, and all the APIs arranged between the first API and the second API to the combination generating unit 105 . At this time, the linked API searching unit 103 also outputs definition information of all APIs arranged between the first API and the second API to the combination generating unit 105 .
 一方、リポジトリ20に1つ前の連結APIの過去の組合せ情報が存在しない場合、連結API探索部103は、1つ前のAPIの定義情報の取得要求をAPI情報取得部102に行い、1つ前のAPIの定義情報を取得する。そして、連結API探索部103は、1つ前のAPIのレスポンスのキー又は値を定義情報から取得する。ここで、連結API探索部103は、レスポンスのキー及び値のそれぞれについて予め決められた優先度を記憶する。例えば、優先度は、次のAPIによりなるべく完全性を有するレスポンスを得られる順に決められる。そこで、連結API探索部103は、1つ前のAPIのレスポンスのキー又は値を優先度順にソートする。 On the other hand, when the past combination information of the immediately previous linked API does not exist in the repository 20, the linked API search unit 103 requests the API information acquisition unit 102 to acquire the definition information of the immediately previous API. Get the definition information of the previous API. Then, the linked API search unit 103 acquires the key or value of the response of the previous API from the definition information. Here, the linked API search unit 103 stores a predetermined priority for each key and value of the response. For example, the priority is determined in the order in which the following APIs can obtain a response with as much completeness as possible. Therefore, the linked API search unit 103 sorts the keys or values of the previous API response in order of priority.
 次に、連結API探索部103は、優先度順に並べたキー及び値のうち未選択の物の中から最も優先度が高いキー又は値を選択する。そして、連結API探索部103は、1つ前の連結APIに対してリポジトリ20においてアドレスの近いAPIのうち、選択したキー又は値をリクエストの項目に有するAPIが存在するか否かを判定する。アドレスの近いAPIの中に選択したキー又は値をリクエストの項目に有するAPIが存在する場合、連結API探索部103は、そのAPIを次の連結APIの候補として決定する。 Next, the linked API search unit 103 selects the key or value with the highest priority from among the unselected keys and values arranged in order of priority. Then, the linked API search unit 103 determines whether or not there is an API having the selected key or value in the request item among the APIs having addresses close to the previous linked API in the repository 20 . If there is an API having the selected key or value in the request item among APIs with close addresses, the linked API search unit 103 determines that API as a candidate for the next linked API.
 例えば、1番目のAPIのレスポンスとしてデータの格納先の情報が返ってくる場合、連結API探索部103は、その格納先からデータを取得するAPIを、次の連結APIの候補として決定する。他にも、1番目のAPIでレスポンスとして返ってきたテキスト情報からメールアドレスを抜き出す場合、連結API探索部103は、メールアドレスを抜き出す処理を行なうAPIを、次の連結APIの候補として決定する。 For example, when information about a data storage location is returned as a response to the first API, the link API search unit 103 determines an API that acquires data from that storage location as a candidate for the next link API. In addition, when extracting a mail address from text information returned as a response from the first API, the linking API search unit 103 determines an API that performs a process of extracting the mail address as a candidate for the next linking API.
 次に、連結API探索部103は、連結APIの候補として決定したAPIの完全性の判定を完全性判定部104に依頼する。その後、連結API探索部103は、完全性の判定依頼の応答を完全性判定部104から受ける。 Next, the linked API search unit 103 requests the integrity determination unit 104 to determine the integrity of the APIs determined as candidates for the linked API. After that, the link API search unit 103 receives a response to the integrity determination request from the integrity determination unit 104 .
 1つ前の連結APIと2番目のAPIとを繋ぐための連結APIの再探索指示を完全性判定部104から受けた場合、連結API探索部103は、優先度にしたがってキー又は値の選択を再度行う。そして、連結API探索部103は、選択したキー又は値を用いて、次の連結APIの候補となるAPIの探索を再度行い、完全性判定部104に対して完全性の判定を依頼する。 When receiving from the completeness determination unit 104 an instruction to re-search the concatenated API for connecting the immediately preceding concatenated API and the second API, the concatenated API search unit 103 selects a key or value according to the priority. Do it again. Then, using the selected key or value, the linked API search unit 103 searches again for an API that is a candidate for the next linked API, and requests the completeness determination unit 104 to perform completeness determination.
 また、選択したAPIの選定指示とともに、指定したAPIが不完全であることを示す応答を完全性判定部104から受けた場合、連結API探索部103は、決定したAPIを次の連結APIとして選択する。そして、連結API探索部103は、この時点で選択した連結APIの次の連結APIの探索を同様に行う。連結API探索部103は、連結APIが完全性を有するまで、次に続く連結APIの決定を繰り返す。 Further, when a response indicating that the specified API is incomplete is received from the completeness determination unit 104 together with the selection instruction of the selected API, the link API search unit 103 selects the determined API as the next link API. do. Then, the linked API searching unit 103 similarly searches for the linked API next to the linked API selected at this time. The linked API search unit 103 repeats determination of the next linked API until the linked API has completeness.
 指定した連結APIが完全性を有する判定を完全性判定部104から受けた場合、連結API探索部103は、連結APIの探索を終了する。そして、連結API探索部103は、1番目のAPI及び2番目のAPI、並びに、1番目のAPIと2番目のAPIとの間に並ぶ全てのAPIの情報を組合せ生成部105へ出力する。この時、連結API探索部103は、1番目のAPIと2番目のAPIとの間に並ぶ全てのAPIの定義情報も組合せ生成部105へ出力する。 When the completeness determination unit 104 determines that the designated link API has integrity, the link API search unit 103 terminates the search for the link API. Linked API searching section 103 then outputs to combination generating section 105 the information of the first API, the second API, and all the APIs arranged between the first API and the second API. At this time, the linked API searching unit 103 also outputs definition information of all APIs arranged between the first API and the second API to the combination generating unit 105 .
 ここで、本実施例ではレスポンスのキー及び値を用いて次の連結APIの探索を行ったが、連結API探索部103は、次の連結APIの探索に用いる情報として他の情報を用いてもよい。例えば、定義情報移含まれる値の中で2番目のAPIに繋げることが可能な情報であれば他の情報を用いてもよく、連結API探索部103は、それらの情報をプライオリティ付けして順番に抽出する。そして、連結API探索部103は、抽出した情報に対応するAPIの中で最も有効なAPIを次の連結APIの候補として決定してもよい。 Here, in this embodiment, the key and value of the response are used to search for the next linked API. good. For example, among the values included in the definition information transfer, other information may be used as long as it is information that can be linked to the second API. Extract to Then, the linked API search unit 103 may determine the most effective API among the APIs corresponding to the extracted information as a candidate for the next linked API.
 組合せ生成部105は、1番目のAPIが完全性を有する場合、1番目のAPIが完全性を有する旨の通知とともに1番目のAPI及び2番目のAPIの情報及び定義情報を完全性判定部104から取得する。その後、組合せ生成部105は、1番目のAPIを呼び出すコード及び、1番目のAPIのレスポンスが返ってきた際に2番目のAPIを呼び出すコードを組み合わせる。これにより、組合せ生成部105は、1番目のAPIと2番目のAPIとを組み合わせる。その後、組合せ生成部105は、1番目のAPIと2番目のAPIとを直接組み合わせる組合せ結果を利用者端末30へ送信して表示させるとともに、生成したコードを利用者端末30へ送信する。 If the first API has integrity, the combination generation unit 105 notifies the integrity determination unit 105 that the first API has integrity and the information and definition information of the first and second APIs. Get from After that, the combination generation unit 105 combines the code for calling the first API and the code for calling the second API when the response of the first API is returned. Accordingly, the combination generator 105 combines the first API and the second API. After that, the combination generator 105 transmits the result of direct combination of the first API and the second API to the user terminal 30 for display, and also transmits the generated code to the user terminal 30 .
 これに対して、1番目のAPIが不完全な場合、組合せ生成部105は、1番目のAPI及び2番目のAPI、並びに、1番目のAPIと2番目のAPIとの間に並ぶ全てのAPIの情報及び定義情報の入力を組合せ生成部105から受ける。そして、組合せ生成部105は、1番目のAPIと2番目のAPIとの間に並ぶ全ての連結APIを順次呼び出すコードを生成して、1番目のAPIを呼び出すコードと2番目のAPIを呼び出すコードとの間に挿入する。これにより、組合せ生成部105は、1番目のAPIと2番目のAPIとを組み合わせる。その後、組合せ生成部105は、1番目のAPIと2番目のAPIとの間に連結APIを並べた組合せ結果を利用者端末30へ送信して表示させるとともに、生成したコードを利用者端末30へ送信する。 On the other hand, if the first API is incomplete, the combination generation unit 105 generates the first API, the second API, and all the APIs lined up between the first API and the second API. and definition information from the combination generation unit 105 . Then, the combination generating unit 105 generates a code for sequentially calling all linked APIs arranged between the first API and the second API, and generates a code for calling the first API and a code for calling the second API. Insert between Accordingly, the combination generator 105 combines the first API and the second API. After that, the combination generation unit 105 transmits the combination result of arranging the linked APIs between the first API and the second API to the user terminal 30 for display, and transmits the generated code to the user terminal 30. Send.
 図3は、1番目のAPIと2番目のAPIとの間に1つの連結APIを挿入する場合を示す図である。次に、図3を参照して、1番目のAPIと2番目のAPIとの間に1つの連結APIを挿入して1番目のAPIと2番目のAPIとを組み合わせる手順を説明する。例えば、1番目のAPI201が自然言語処理APIであり、2番目のAPI202がチャットAPIである。1番目のAPIは、domeinA配下のイメージに対するPOSTを実行するAPIである。また、2番目のAPIは、domeinB配下のフォトに対するPOSTを実行するAPIである。 FIG. 3 is a diagram showing a case where one linked API is inserted between the first API and the second API. Next, referring to FIG. 3, a procedure for inserting one linking API between the first API and the second API to combine the first API and the second API will be described. For example, the first API 201 is a natural language processing API, and the second API 202 is a chat API. The first API is an API that executes POST for an image under domainA. The second API is an API for executing POST for photos under domainB.
 この時、完全性判定部104は、1番目のAPI201の定義情報から特定されるレスポンス211の値を取得する。この場合、レスポンス211にはステータスの情報及び自然言語の識別情報を示すidが含まれることから、完全性判定部104は、1番目のAPI201が不完全であると判定する。そして、連結API探索部103は、1番目のAPI201の定義情報から特定されるレスポンス212として識別情報を示すidに対応する自然言語を取得するAPIを連結API203として決定する。連結API203は、domainAは以下のイメージに対してGETを実行するAPIである。 At this time, the integrity determination unit 104 acquires the value of the response 211 specified from the definition information of the first API 201 . In this case, since the response 211 includes status information and id indicating natural language identification information, the completeness determination unit 104 determines that the first API 201 is incomplete. Then, the linking API search unit 103 determines, as the linking API 203 , an API for acquiring the natural language corresponding to the id indicating the identification information as the response 212 specified from the definition information of the first API 201 . The linking API 203 is an API that executes GET on the following images for domainA.
 完全性判定部104は、連結API203のレスポンスに自然言語を表すテキスト情報が含まれることから、連結API203が完全性を有すると判定する。そして、連結API探索部103は、1番目のAPI201、連結API203及び2番目のAPI202の情報を組合せ生成部105へ出力する。組合せ生成部105は、1番目のAPI201、連結API203及び2番目のAPI202をそれぞれの結果を用いて読み出すコードを並べて1番目のAPI201と2番目のAPI202とを組み合わせる。これにより、自然言語APIである1番目のAPI201のレスポンスとして自然言語のidを取得し、取得したidに対応する自然言語を取得し、取得した自然言語をチャットに書き込む一連の処理が完成する。 The integrity determination unit 104 determines that the linkage API 203 has integrity because the response of the linkage API 203 includes text information representing a natural language. Linked API searching section 103 then outputs information on first API 201 , linked API 203 and second API 202 to combination generating section 105 . The combination generation unit 105 arranges codes for reading the first API 201, the concatenated API 203, and the second API 202 using the respective results, and combines the first API 201 and the second API 202. FIG. This completes a series of processes of acquiring the natural language id as a response to the first API 201, which is a natural language API, acquiring the natural language corresponding to the acquired id, and writing the acquired natural language to the chat.
 また、図4は、1番目のAPIと2番目のAPIとの間に複数の連結APIを挿入する場合を示す図である。次に、図4を参照して、1番目のAPIと2番目のAPIとの間に複数の連結APIを挿入して1番目のAPIと2番目のAPIとを組み合わせる手順を説明する。ここでは、1番目のAPIがAPI#Aであり、2番目のAPIがAPI#Bであり、リポジトリ20にAPI#C~#Eの情報が含まれる場合で説明する。 Also, FIG. 4 is a diagram showing a case where a plurality of linked APIs are inserted between the first API and the second API. Next, referring to FIG. 4, a procedure for inserting a plurality of linking APIs between the first API and the second API to combine the first API and the second API will be described. Here, the case where the first API is API#A, the second API is API#B, and the repository 20 contains information on API#C to #E will be described.
 完全性判定部104は、API#Aのレスポンスの値などから状態301のように、API#Aが不完全であると判定する。 The completeness determination unit 104 determines that API#A is incomplete, as in state 301, based on the value of the API#A response.
 そこで、連結API探索部103は、API#Aのレスポンスのキー又は値から連結APIの候補となるAPIの取得要求をAPI情報取得部102に対して行なう。そして、連結API探索部103は、連結APIの候補となるAPIとしてAPI#Cの情報を取得する。その後、完全性判定部104は、API#Cのレスポンスの値などから状態302のように、API#Cが不完全であると判定する。 Therefore, the link API search unit 103 requests the API information acquisition unit 102 to acquire an API that is a candidate for the link API from the key or value of the response of API #A. Then, the link API search unit 103 acquires the information of API #C as an API that is a candidate for the link API. After that, the completeness determination unit 104 determines that the API#C is incomplete as shown in the state 302 from the value of the API#C response.
 そこで、連結API探索部103は、API#Cのレスポンスのキー又は値から次の連結APIの候補の取得要求をAPI情報取得部102に対して行なう。そして、連結API探索部103は、連結APIの候補としてAPI#Dの情報を取得する。その後、完全性判定部104は、API#Dのレスポンスの値などから状態303のように、API#Dが不完全であると判定する。これにより、API#A、API#C、API#D、API#Bと並べることで、API#AとAPI#Bとが組み合わせられる。 Therefore, the link API search unit 103 requests the API information acquisition unit 102 to acquire the next link API candidate from the key or value of the API #C response. Then, the link API search unit 103 acquires the information of the API #D as a link API candidate. After that, the completeness determination unit 104 determines that API#D is incomplete, as in state 303, based on the value of the response to API#D. As a result, by arranging API#A, API#C, API#D, and API#B, API#A and API#B are combined.
 図5は、実施例に係るAPI組合せ支援装置によるAPI組合せ処理のフローチャートである。次に、図5を参照して、実施例に係るAPI組合せ支援装置10によるAPI組合せ処理の流れを説明する。 FIG. 5 is a flowchart of API combination processing by the API combination support device according to the embodiment. Next, the flow of API combination processing by the API combination support device 10 according to the embodiment will be described with reference to FIG.
 利用者Pは、利用者端末30を用いて組み合わせるAPIを指定する。API組合せ支援装置10のAPI取得部101は、組み合わせるAPIのそれぞれの識別情報を利用者端末30から受信する(ステップS1)。 User P uses the user terminal 30 to specify APIs to be combined. The API acquisition unit 101 of the API combination support device 10 receives the identification information of each API to be combined from the user terminal 30 (step S1).
 API情報取得部102は、1番目のAPIの識別情報をAPI取得部101から取得する。そして、API情報取得部102は、1番目のAPIの情報をリポジトリ20から取得する(ステップS2)。 The API information acquisition unit 102 acquires the identification information of the first API from the API acquisition unit 101 . Then, the API information acquisition unit 102 acquires the information of the first API from the repository 20 (step S2).
 完全性判定部104は、1番目のAPIの情報をAPI情報取得部102から取得する。そして、完全性判定部104は、完全性情報又は定義情報を用いて1番目のAPIの完全性の有無を判定する(ステップS3)。1番目のAPIが完全性を有する場合(ステップS3:肯定)、完全性判定部104は、1番目のAPIが完全性を有する旨の情報とともに、1番目のAPI及び2番目のAPIの定義情報を組合せ生成部105へ出力する。その後、APIの組合せ処理は、ステップS6へ進む。これに対して、1番目のAPIが不完全である場合(ステップS3:否定)、完全性判定部104は、1番目のAPIの定義情報を連結API探索部103に送信するとともに連結APIの探索を連結API探索部103に指示する。 The integrity determination unit 104 acquires information on the first API from the API information acquisition unit 102 . Then, the completeness determination unit 104 uses the completeness information or the definition information to determine whether or not the first API is complete (step S3). If the first API has integrity (step S3: affirmative), the integrity determination unit 104 obtains the information indicating that the first API has integrity and the definition information of the first API and the second API. to the combination generation unit 105 . Thereafter, the API combination processing proceeds to step S6. On the other hand, if the first API is incomplete (step S3: No), the completeness determination unit 104 sends the definition information of the first API to the linked API search unit 103 and searches for the linked API. to the link API search unit 103 .
 1番目のAPI又は1つ前の連結APIが不完全な場合、連結API探索部103は、次の連結APIの探索を実行する(ステップS4)。 If the first API or the previous linked API is incomplete, the linked API search unit 103 searches for the next linked API (step S4).
 その後、連結API探索部103は、次の連結APIの完全性の有無の判定を完全性判定部104に依頼する。完全性判定部104は、次の連結APIが完全性を有するか否かを判定する(ステップS5)。次の連結APIが不完全な場合(ステップS5:否定)、完全性判定部104は、次の連結APIが不完全であることを連結API探索部103に通知する。その後、APIの組合せ処理は、ステップS4へ戻る。 After that, the linked API search unit 103 requests the integrity determination unit 104 to determine whether or not the next linked API is complete. The integrity determination unit 104 determines whether or not the next link API has integrity (step S5). When the next linked API is incomplete (step S5: No), the completeness determination unit 104 notifies the linked API search unit 103 that the next linked API is incomplete. Thereafter, the API combination processing returns to step S4.
 連結API探索部103から指定された連結APIが完全性を有する場合(ステップS5:肯定)、完全性判定部104は、次の連結APIが完全を有することを連結API探索部103に通知する。連結API探索部103は、1番目のAPIと2番目のAPIとを組み合わせるための抽出APIを1番目のAPIと2番目のAPIとの間に並べてそれぞれの定義情報を組合せ生成部105に通知する。組合せ生成部105は、1番目のAPIと2番目のAPIとを組み合わせるために用いる各APIを呼び出すコードを生成して順番に並べる(ステップS6)。ここで、連結APIを用いる場合、組合せ生成部105は、各連結APIを順番に読み出すコードを1番目のAPIを呼び出すコードと2番目のAPIを呼び出すコードとの間に挿入する。 If the linked API specified by the linked API search unit 103 has integrity (step S5: Yes), the integrity determination unit 104 notifies the linked API search unit 103 that the next linked API has integrity. Linked API search unit 103 arranges extracted APIs for combining the first API and second API between the first API and second API, and notifies combination generation unit 105 of the respective definition information. . The combination generation unit 105 generates codes for calling each API used to combine the first API and the second API, and arranges them in order (step S6). Here, when the concatenated API is used, the combination generation unit 105 inserts a code for sequentially reading each concatenated API between the code for calling the first API and the code for calling the second API.
 その後、組合せ生成部105は、1番目のAPIと2番目のAPIとを組み合わせる組合せ結果を利用者端末30へ送信して表示させるとともに、生成したコードを利用者端末30へ送信して組合せ処理の結果を利用者Pに通知する(ステップS7)。 After that, the combination generation unit 105 transmits the combination result of combining the first API and the second API to the user terminal 30 for display, and also transmits the generated code to the user terminal 30 to perform the combination processing. The result is notified to the user P (step S7).
 図6は、連結APIの探索処理のフローチャートである。図6のフローチャートに示した各処理は、図5におけるステップS4で実行される処理の一例にあたる。 FIG. 6 is a flow chart of the search processing for the link API. Each process shown in the flowchart of FIG. 6 corresponds to an example of the process executed in step S4 in FIG.
 連結API探索部103は、1つ前のAPIと2場目のAPIとの過去の組合せ情報の取得をAPI情報取得部102に依頼して、過去の組合せ情報がリポジトリ20に存在するか否かを判定する(ステップS11)。 The linked API search unit 103 requests the API information acquisition unit 102 to acquire past combination information of the previous API and the second API, and determines whether the past combination information exists in the repository 20. is determined (step S11).
 1つ前の連結APIと2番目のAPIとの過去の組合せ情報がリポジトリ20に存在する場合(ステップS11:肯定)、連結API探索部103は、ステップS16へ進む。 If the past combination information of the previous linked API and the second API exists in the repository 20 (step S11: Yes), the linked API searching unit 103 proceeds to step S16.
 これに対して、1つ前のAPIと2番目のAPIとの過去の組合せ情報がリポジトリ20に存在しない場合(ステップS11:否定)、連結API探索部103は、1つ前のAPIの定義情報の取得要求をAPI情報取得部102に行う。そして、連結API探索部103は、リポジトリ20に格納された1つ前のAPIの定義情報をAPI情報取得部102から取得する。次に、連結API探索部103は、取得した定義情報からレスポンスのキー及び値を抽出する。そして、連結API探索部103は、抽出したレスポンスのキー及び値を優先度順にソートする(ステップS12)。 On the other hand, if the past combination information of the previous API and the second API does not exist in the repository 20 (step S11: No), the linked API searching unit 103 retrieves the definition information of the previous API. to the API information acquisition unit 102 . Then, the linked API search unit 103 acquires the definition information of the previous API stored in the repository 20 from the API information acquisition unit 102 . Next, the link API search unit 103 extracts the key and value of the response from the acquired definition information. Then, the link API searching unit 103 sorts the keys and values of the extracted response in order of priority (step S12).
 次に、連結API探索部103は、優先度順に並べたキー及び値の中から優先度順に未選択の物を1つ選択する(ステップS13)。 Next, the linked API search unit 103 selects one unselected item in order of priority from among the keys and values arranged in order of priority (step S13).
 次に、連結API探索部103は、1つ前の連結APIに対してリポジトリ20においてアドレスの近いAPIのうち、選択したキー又は値をリクエストの項目に有するAPIが存在するか否かを判定する(ステップS14)。 Next, the linked API search unit 103 determines whether or not there is an API having the selected key or value in the request item among the APIs with addresses close to the previous linked API in the repository 20. (Step S14).
 アドレスの近いAPIの中に選択したキー又は値をリクエストの項目に有するAPIが存在しない場合(ステップS14:否定)、連結API探索部103は、ステップS13へ戻る。 If there is no API having the selected key or value in the request item among APIs with close addresses (step S14: No), the linked API search unit 103 returns to step S13.
 これに対して、アドレスの近いAPIの中に選択したキー又は値をリクエストの項目に有するAPIが存在する場合(ステップS14:肯定)、連結API探索部103は、そのAPIを次の連結APIの候補として決定する。次に、連結API探索部103は、連結APIの候補として決定したAPIの完全性の判定を完全性判定部104に依頼する。完全性判定部104は、指定されたAPIの完全性の指標値が1つ前のAPIに対して上昇するか否かを判定する(ステップS15)。完全性の指標値が上昇しない場合(ステップS15:否定)、連結API探索処理は、ステップS13へ戻る。 On the other hand, if there is an API having the selected key or value in the request item among the APIs with close addresses (step S14: Yes), the link API search unit 103 searches the API for the next link API. Decide as a candidate. Next, the linked API search unit 103 requests the completeness determination unit 104 to determine the integrity of the APIs determined as candidates for the linked API. The integrity determination unit 104 determines whether or not the index value of the integrity of the designated API is higher than that of the previous API (step S15). If the completeness index value does not increase (step S15: No), the link API search process returns to step S13.
 これに対して、完全性の指標値が上昇する場合(ステップS15:肯定)、完全性判定部104は、指定されたAPIの選択を連結API探索部103に指示する。 On the other hand, if the index value of completeness increases (step S15: affirmative), the completeness determination unit 104 instructs the linked API search unit 103 to select the designated API.
 連結API探索部103は、完全性判定部104からの指示を受けて、該当するAPIを次の連結APIとして選択する(ステップS16)。 The linked API search unit 103 receives the instruction from the completeness determination unit 104 and selects the corresponding API as the next linked API (step S16).
 以上に説明したように、本実施例に係るAPI組合せ支援装置は、APIを組み合わせる場合に、1番目のAPIの完全性を判定し、不完全な場合にはレスポンスの値などから連結APIの選択を行い、完全性を有する連結APIとなるまで並べる。これにより、API組合せ支援装置は、指定されたAPIを組み合わせるために用いる連結APIを容易に検出してどのようなAPIを間に挟むことで指定されたAPIを組み合わせることができるかを提供することが可能となる。したがって、複数のAPIの組み合わせを効率よく行うことが可能となる。また、組合せに係る時間の短縮やコストの削減に寄与することができる。 As described above, the API combination support device according to the present embodiment determines the completeness of the first API when combining APIs, and selects a linked API based on the value of the response if the first API is incomplete. and list until you have a complete concatenated API. As a result, the API combination support device can easily detect the linking APIs used to combine the specified APIs, and provide information on what kind of APIs are interposed to combine the specified APIs. becomes possible. Therefore, it is possible to efficiently combine a plurality of APIs. In addition, it can contribute to shortening the time required for combination and reducing costs.
 (ハードウェア構成)
 図6は、サーバのハードウェア構成図である。本実施例に係るAPI組合せ支援装置10は、例えば、図6のようなハードウェア構成を有する。API組合せ支援装置10は、CPU91、メモリ92、記憶装置93及び通信モジュール94を有する。CPU91、メモリ92、記憶装置93及び通信モジュール94は、それぞれバスにより接続される。
(Hardware configuration)
FIG. 6 is a hardware configuration diagram of the server. The API combination support device 10 according to this embodiment has, for example, a hardware configuration as shown in FIG. The API combination support device 10 has a CPU 91 , a memory 92 , a storage device 93 and a communication module 94 . The CPU 91, memory 92, storage device 93 and communication module 94 are connected by buses.
 記憶装置93は、SSD(Solid State Drive)やハードディスクなどの補助記憶装置である。記憶装置93は、図2に例示したAPI取得部101、API情報取得部102、連結API探索部103、完全性判定部104及び組合せ生成部105を動作させるためのプログラムを含む各種プログラムが格納される。また、記憶装置50は、リポジトリ20を格納してもよい。 The storage device 93 is an auxiliary storage device such as an SSD (Solid State Drive) or hard disk. The storage device 93 stores various programs including programs for operating the API acquisition unit 101, the API information acquisition unit 102, the linked API search unit 103, the completeness determination unit 104, and the combination generation unit 105 illustrated in FIG. be. The storage device 50 may also store the repository 20 .
 通信モジュール94は、API組合せ支援装置10が外部装置との間で通信を行うためのネットワークインタフェースである。例えば、CPU91は、通信モジュール94を介してリポジトリ20及び利用者端末30と通信を行なう。 The communication module 94 is a network interface for the API combination support device 10 to communicate with external devices. For example, the CPU 91 communicates with the repository 20 and the user terminal 30 via the communication module 94 .
 メモリ92は、SDRAM(Synchronous Dynamic Random Access Memory)などの主記憶装置である。 The memory 92 is a main storage device such as SDRAM (Synchronous Dynamic Random Access Memory).
 CPU91は、記憶装置93に格納された各種プログラムを読み出してメモリ92上に展開して実行することで、図1に例示した図2に例示したAPI取得部101、API情報取得部102、連結API探索部103、完全性判定部104及び組合せ生成部105の機能を実現する。 The CPU 91 reads out various programs stored in the storage device 93, develops them on the memory 92, and executes them to obtain the API acquisition unit 101, the API information acquisition unit 102, and the linked API shown in FIG. The functions of the search unit 103, the completeness determination unit 104, and the combination generation unit 105 are realized.
 1 API組合せ支援システム
 10 API組合せ支援装置
 20 リポジトリ
 30 利用者端末
 101 API取得部
 102 API情報取得部
 103 連結API探索部
 104 完全性判定部
 105 組合せ生成部
1 API combination support system 10 API combination support device 20 repository 30 user terminal 101 API acquisition unit 102 API information acquisition unit 103 linked API search unit 104 completeness determination unit 105 combination generation unit

Claims (8)

  1.  第1のAPI(Application Programing Interface)と第2のAPIとの組み合わせ要求を受け付け、
     定義情報を含む前記第1のAPIの情報を基に、前記第1のAPIのレスポンスに含まれる情報により前記第2のAPIに対するリクエストが作成可能となる完全性を、前記第1のAPIが有するか否かを判定し、
     前記第1のAPIが前記完全性を有さないと判定した場合、前記第1のAPIの前記レスポンスに含まれる情報を基に前記第2のAPIに対する前記リクエストを生成するための情報を生成する連結APIを探索して取得する
     処理をコンピュータに実行させることを特徴とする情報処理プログラム。
    Receiving a combination request of a first API (Application Programming Interface) and a second API,
    The first API has integrity that enables the creation of a request to the second API based on the information of the first API including definition information and the information contained in the response of the first API. determine whether or not
    generating information for generating the request to the second API based on information included in the response of the first API if it is determined that the first API does not have the integrity; An information processing program that causes a computer to execute a process of searching for and acquiring a linking API.
  2.  前記探索により取得した前記連結APIについて前記完全性の有無を判定し、
     前記連結APIが前記完全性を有さないと判定した場合、前記連結APIの情報を基に、次の連結APIを探索して取得する処理を、完全性を有する連結APIを取得するまで繰り返すことを特徴とする請求項1に記載の情報処理プログラム。
    determining the presence or absence of the completeness of the linked API obtained by the search;
    If it is determined that the linked API does not have the integrity, the process of searching for and acquiring the next linked API based on the information of the linked API is repeated until the linked API having integrity is acquired. The information processing program according to claim 1, characterized by:
  3.  前記第1のAPIの情報に完全性の有無を表す完全性情報が含まれる場合、前記完全性情報を用いて前記第1のAPIの完全性の有無を判定し、
     前記第1のAPIの情報に前記完全性情報が含まれていない場合、前記第1のAPIの前記定義情報を基に、前記第1のAPIの完全性の有無を判定する
     処理をコンピュータに実行させることを特徴とする請求項1に記載の情報処理プログラム。
    if the information of the first API includes integrity information indicating the presence or absence of integrity, using the integrity information to determine the presence or absence of integrity of the first API;
    If the integrity information is not included in the information of the first API, the computer executes a process of determining presence or absence of integrity of the first API based on the definition information of the first API. 2. The information processing program according to claim 1, characterized in that it causes
  4.  前記定義情報に含まれる前記第1のAPIからのレスポンスの情報を基に、所定のアルゴリズムにしたがい前記第1のAPIの完全性の有無を判定する処理をコンピュータに実行させることを特徴とする請求項1に記載の情報処理プログラム。 A computer is caused to execute a process of determining whether or not the first API is complete according to a predetermined algorithm based on response information from the first API included in the definition information. Item 1. The information processing program according to item 1.
  5.  各前記第1のAPIの前記定義情報を基に学習を行って学習モデルを生成し、生成した前記学習モデルを用いて前記第1のAPIの完全性の有無を判定する処理をコンピュータに実行させることを特徴とする請求項1に記載の情報処理プログラム。 performing learning based on the definition information of each of the first APIs to generate a learning model, and causing a computer to execute a process of determining whether or not the first API is complete using the generated learning model; The information processing program according to claim 1, characterized by:
  6.  前記第1のAPI、前記連結API及び前記第2のAPIを組み合わせた結果を通知する処理をコンピュータにさらに実行させることを特徴とする請求項1に記載の情報処理プログラム。 The information processing program according to claim 1, further causing a computer to execute a process of notifying a result of combining the first API, the linking API, and the second API.
  7.  第1のAPIと第2のAPIとの組み合わせ要求を受け付け、
     定義情報を含む前記第1のAPIの情報を基に、前記第1のAPIのレスポンスに含まれる情報により前記第2のAPIに対するリクエストが作成可能となる完全性を、前記第1のAPIが有するか否かを判定し、
     前記第1のAPIが前記完全性を有さないと判定した場合、前記第1のAPIの前記レスポンスに含まれる情報を基に前記第2のAPIに対する前記リクエストを生成するための情報を生成する連結APIを探索して取得する
     ことを特徴とする情報処理方法。
    receiving a combination request of the first API and the second API;
    The first API has integrity that enables the creation of a request to the second API based on the information of the first API including definition information and the information contained in the response of the first API. determine whether or not
    generating information for generating the request to the second API based on information included in the response of the first API if it is determined that the first API does not have the integrity; An information processing method characterized by searching for and acquiring a linking API.
  8.  第1のAPIと第2のAPIとの組み合わせ要求を受け付けるAPI取得部と、
     各APIについて、各前記APIのレスポンスに含まれる情報により前記第2のAPIへのリクエストが作成可能となる完全性の有無を判定する完全性判定部と、
     前記第1のAPIが完全性を有さないと前記完全性判定部により判定された場合、前記第1のAPIの前記レスポンスに含まれる情報を基に前記第2のAPIに対する前記リクエストを生成するための情報を生成する連結APIを探索して取得する連結API探索部と
     を備えたことを特徴とする情報処理装置。
    an API acquisition unit that receives a combination request for the first API and the second API;
    an integrity determination unit that determines whether or not each API has integrity that enables creation of a request to the second API based on information included in the response of each of the APIs;
    generating the request for the second API based on information included in the response of the first API when the integrity determination unit determines that the first API does not have integrity; an information processing apparatus comprising: a link API search unit that searches for and acquires a link API that generates information for.
PCT/JP2021/007476 2021-02-26 2021-02-26 Information processing program, information processing method, and information processing device WO2022180815A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2023501976A JPWO2022180815A1 (en) 2021-02-26 2021-02-26
PCT/JP2021/007476 WO2022180815A1 (en) 2021-02-26 2021-02-26 Information processing program, information processing method, and information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/007476 WO2022180815A1 (en) 2021-02-26 2021-02-26 Information processing program, information processing method, and information processing device

Publications (1)

Publication Number Publication Date
WO2022180815A1 true WO2022180815A1 (en) 2022-09-01

Family

ID=83048999

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2021/007476 WO2022180815A1 (en) 2021-02-26 2021-02-26 Information processing program, information processing method, and information processing device

Country Status (2)

Country Link
JP (1) JPWO2022180815A1 (en)
WO (1) WO2022180815A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090144210A1 (en) * 2006-04-04 2009-06-04 Huawei Technologies Co., Ltd. Method and apparatus for determining the variable dependency
WO2010113242A1 (en) * 2009-03-31 2010-10-07 三菱電機株式会社 Execution order decision device
JP2018055249A (en) * 2016-09-27 2018-04-05 日本電気株式会社 System construction support apparatus, system construction support method, and system construction support program
WO2018225200A1 (en) * 2017-06-08 2018-12-13 株式会社日立製作所 Device and method for assisting in creating service template
JP2019040259A (en) * 2017-08-22 2019-03-14 株式会社フォトロン Curriculum and taking order proposition system of lesson

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090144210A1 (en) * 2006-04-04 2009-06-04 Huawei Technologies Co., Ltd. Method and apparatus for determining the variable dependency
WO2010113242A1 (en) * 2009-03-31 2010-10-07 三菱電機株式会社 Execution order decision device
JP2018055249A (en) * 2016-09-27 2018-04-05 日本電気株式会社 System construction support apparatus, system construction support method, and system construction support program
WO2018225200A1 (en) * 2017-06-08 2018-12-13 株式会社日立製作所 Device and method for assisting in creating service template
JP2019040259A (en) * 2017-08-22 2019-03-14 株式会社フォトロン Curriculum and taking order proposition system of lesson

Also Published As

Publication number Publication date
JPWO2022180815A1 (en) 2022-09-01

Similar Documents

Publication Publication Date Title
CN112925898B (en) Question-answering method and device based on artificial intelligence, server and storage medium
JP6832903B2 (en) Information retrieval system and method
KR20190095099A (en) Transaction system error detection method, apparatus, storage medium and computer device
US11797617B2 (en) Method and apparatus for collecting information regarding dark web
CN111143359A (en) Query statement generation method and device
JP2007128450A (en) Software reusable component management system
JP2016076020A (en) Grouping method, grouping device, and grouping program
US20110289070A1 (en) Dynamic resource orchestration system for data retrieval and output generation
KR20170044408A (en) System and method for recommending project
CN111158973B (en) Web application dynamic evolution monitoring method
WO2022180815A1 (en) Information processing program, information processing method, and information processing device
CN100409182C (en) Method and apparatus for processing of internet forms
CN110196952B (en) Program code search processing method, device, equipment and storage medium
JP2018133044A (en) Webapi execution flow generation device and webapi execution flow generation method
JP2009043029A (en) Related database creating device
JP2018190030A (en) Information processing server, control method for the same, and program, and information processing system, control method for the same, and program
JP7126808B2 (en) Information processing device and program for information processing device
JP7111972B2 (en) Compliance determination device and method
CN115203057B (en) Low code test automation method, device, equipment and storage medium
JP5382303B2 (en) Information analysis system, terminal device, server device, information analysis method, and program
CN114153830B (en) Data verification method and device, computer storage medium and electronic equipment
JP2019212060A (en) Retrieval device, retrieval method, and retrieval program
JP5394512B2 (en) Teacher data generation apparatus, method, and program
CN114924978B (en) Multi-branch increment checking method based on artificial intelligence and related equipment
WO2024171614A1 (en) Search processing program, search processing method, and search processing device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21927915

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2023501976

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21927915

Country of ref document: EP

Kind code of ref document: A1