Generation device and generation method
Patent Information
- Application Number
- PCT/JP2025/006638
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2026-09-03
Smart Images

Figure JP2025006638_03092026_PF_FP_ABST
Abstract
Description
Generation Apparatus and Generation Method
[0001] The present disclosure relates to a generation apparatus and a generation method.
[0002] For persons in charge working on solving social issues in various fields to create diverse growth businesses through digital transformation (DX), it is important to be able to early confirm the profitability of businesses utilizing ICT resources. There are also cases where increased costs and delayed delivery dates occur due to manual development and operation, resulting in missed opportunities for market launch.
[0003] Against this background, attempts have been made to automatically generate a desired application (APL) by inputting a request in natural language to generative AI such as a large language model (LLM) and causing the AI to output a code.
[0004] In recent years, code generation technology using LLM, which has been widely普及? Wait no, widely popularized due to its high performance, enables even users without software development skills to automatically generate code that satisfies their requirements by inputting requirements described in natural language. However, incomplete code may be output.
[0005] Ryota Morimoto, three others, "Proposal of Automated Orchestration APL Generation Method Using Connection Records Between APIs", IEICE Society Conference, September 2024, B-14-14
[0006] The technology of Non-Patent Document 1 stores part or all of APLs with operational track records in the past as components in a repository, selects candidate application programming interfaces (APIs) that satisfy requirements, then extracts components including many of the candidate APIs, and connects components based on past connection records, thereby automatically generating an APL from requirements.
[0007] However, in Non-Patent Document 1, depending on the component configuration in the repository, the generated API may deviate from the requirements. For example, components that cannot be connected to each other may be extracted, and a component including an API that satisfies the requirement may not be used for APL generation; or a component similar to the component that should originally be used may be extracted, resulting in some functions in the APL differing from the requirements.
[0008] This disclosure is made in view of the above and aims to automatically generate applications that meet the requirements.
[0009] A generation apparatus in one aspect of the present disclosure is a generation apparatus for generating an application, comprising: a component holding unit that holds a component including a plurality of functions, connection relationships between the plurality of functions, and information on the functions at the endpoints; a section setting unit that sets a plurality of component extraction sections with the main functions as endpoints based on the order of a plurality of main functions for solving a user's request; a component extraction unit that extracts a group of candidate components from the component holding unit for each component extraction section, the same function as the main function at the endpoint of the component extraction section as the endpoint of the component extraction section; a component connection unit that generates a component connection pattern by selecting and combining one component from each of the candidate component groups; and a generation unit that generates an application from the component connection pattern.
[0010] According to this disclosure, applications that meet the requirements can be automatically generated.
[0011] Figure 1 shows an example of the configuration of the generation device. Figure 2 shows an example of storing part or all of an application as components in a component repository. Figure 3 shows an example of prompts for selecting candidate APIs. Figure 4 shows an example of candidate APIs and their order. Figure 5 shows an example of a component extraction interval. Figure 6 shows an example of a group of candidate components. Figure 7 shows an example of excluding component connection patterns that do not satisfy API dependencies. Figure 8 is a flowchart showing an example of the processing flow of the generation device. Figure 9 shows an example of the hardware configuration of the generation device.
[0012] [Configuration of the Application Generation Device] Referring to Figure 1, an example of the configuration of the generation device 10 in this embodiment will be described. The generation device 10 takes a request written in natural language as input and generates and outputs an APL that satisfies the request. The generation device 10 includes an API selection unit 11, an extraction interval setting unit 12, a candidate component group extraction unit 13, a component group connection unit 14, an APL generation unit 15, a component creation unit 21, and a component repository 22.
[0013] The component creation unit 21 extracts information on the connection relationships (also called usage relationships) between APIs from the repository or source code of an APL with a proven track record of operation, and stores the components in the component repository 22. For example, a component is a series of parts or all of the APIs used in an APL. The APIs may be closed APIs, Web APIs, APIs provided by the OS, APIs provided by the runtime, etc. In the following, APIs will be used as an example to explain the components of a component, but it is not limited to APIs. For example, the components of a component may be tasks, APLs, Web services, APLs linked with APIs, services linked with APIs, code, workflows, flowcharts, functions, etc. In other words, the components of a component may also be called the functions that make up the component. Strictly speaking, an API is an interface that provides functions, but here it will be explained as a function provided as a result of using an API.
[0014] An APL with operational experience can be rephrased as an APL that has been in operation, an APL that has been made public, an APL that has been in operation in the past, or an APL that has been used in the past. An APL can be a system or service, and may be an internal system, a web service, an internal service, or a private service. Furthermore, an APL may be various APIs, workflow diagrams, flowcharts, tasks, or functions. In addition, by using Infrastructure as Code technology, APLs can also be applied to network configurations, resource management, and other areas.
[0015] Figure 2 shows an example of storing components obtainable from APL 100 in the component repository 22. APL 100 consists of nine APIs, a through i. In the example in Figure 2, component 110, which consists of APIs a, b, c, and d of APL 100, component 120, which consists of APIs e, f, and g, and component 130, which is the entirety of APL 100, are stored in the component repository 22. Figure 2 also shows component 150 obtained from another APL.
[0016] The component repository 22 stores component information, including information about the constituent APIs, the connection relationships between the APIs, the API information of the endpoints, and the dependencies between the APIs. For example, for component 110 in Figure 2, the component repository 22 stores that it is composed of APIs a, b, c, and d, that there are connection relationships between a and b, b and d, and c and d, that a and c are the start and d is the end, and that d depends on b and c. The component repository 22 may also store the connection relationships between APIs and endpoint information for each component in an undirected or directed graph. Furthermore, the component repository 22 may store the connection history between APIs for all components it holds as an adjacency matrix.
[0017] The component repository 22 may maintain API dependencies, including their strength. For example, if API d depends on b and c, the component repository 22 may maintain the dependencies of d as "d mDependsOn b" and "d dependsOn c", and maintain information that d strongly depends on b. API dependencies may also be expressed as prerequisite information, parameters, input parameters, output parameters, required parameters, arguments, options, triggers, conditions, related APIs, related tasks, related functions, etc.
[0018] The component repository 22 may hold specification data for the APIs of all components. For example, the API specification data is text data for each API, including the API name and a description of the API. The API description includes the API's function, input parameters, output parameters, etc.
[0019] The parts repository 22 may also store parts information manually.
[0020] The API selection unit 11 receives the user's request as input, selects candidate APIs necessary to resolve the user's request, and indicates the order of the candidate APIs. Specifically, the API selection unit 11 creates a prompt that includes an instruction statement instructing the selection of candidate APIs and consideration of the execution order, a request written in natural language, and an API list. The created prompt is input to the generative AI, and the generative AI extracts the candidate APIs and their order from the output data. The generative AI outputs candidate APIs that satisfy the request and their order according to the input prompt. The order may also refer to the execution order of the APIs, execution conditions, dependencies, flow, input parameters, output parameters, input / output parameters, etc.
[0021] Figure 3 shows an example of a prompt 200. The prompt 200 shown in the figure is text data including an instruction 210, a request 220, and an API list 230. The instruction 210 contains instructions to select candidate APIs to resolve the request 220 and to consider the execution order of the candidate APIs. The request 220 contains a request written in natural language, input by the generation device 10. The API list 230 contains specification data for all available APIs. The APIs included in the API list 230 may be APIs for all parts stored in the parts repository 22, and the specification data for each API can be obtained from the parts repository 22. Alternatively, the API list 230 may contain an abstract description of the operation and function of each API. For example, the operation and function of the API may be described abstractly as "API that does ○○", "API that does △△", "API that does □□".
[0022] Figure 4 shows an example of the candidate APIs selected by the API selection unit 11 and the order of the candidate APIs. In the example in Figure 4, three candidate APIs, C, E, and F, were selected, and the order of the candidate APIs was shown to be C, E, F. In other words, the user's request can be resolved by using the APIs in the order of C, E, F. However, since this may result in an incomplete APL being output, the generation device 10 generates the APL by combining components stored in the component repository 22 that have a history of API connection. C, E, and F may be abstract descriptions.
[0023] Alternatively, the user may input candidate APIs that seem likely to solve their request and their order into the API selection unit 11. Alternatively, the user may generate a prompt and input it into the generative AI, and then input the candidate APIs and their order obtained from the generative AI into the API selection unit 11. In either case, the input candidate APIs may be abstract descriptions.
[0024] The extraction interval setting unit 12 sets up multiple component extraction intervals, each with a start API and an end API specified based on the candidate APIs and their order. For example, the extraction interval setting unit 12 sets up component extraction intervals using the following procedure. First, the extraction interval setting unit 12 sets an index i (i=1,2,...,N) for each candidate API according to the order of the candidate APIs. Here, N is the number of candidate APIs. The extraction interval setting unit 12 also assumes (N+1) intervals arranged in series and sets an index j (j=1,2,...N+1) for each interval. The index j may start from 0. Furthermore, the extraction interval setting unit 12 sets the k (k=1,2,...N)th candidate API as the end API of interval k and the start API of interval k+1, and sets the start API of interval 1 and the end API of interval N+1 as Undefined. Through the above procedure, (N+1) component extraction intervals with set start APIs and end APIs are obtained.
[0025] Figure 5 shows an example of a component extraction section. In the example in Figure 5, section 1 is defined before C, section 2 is defined from C to E, section 3 is defined from E to F, and section 4 is defined after F. The start and end APIs for each section are as follows: The start API for section 1 is Undefined, and the end API is C. The start API for section 2 is C, and the end API is E. The start API for section 3 is E, and the end API is F. The start API for section 4 is F, and the end API is Undefined. Undefined is an API that does not limit the target.
[0026] The candidate component group extraction unit 13 extracts candidate component groups for each component extraction interval based on the API information of the endpoints of each component stored in the component repository 22 and the component extraction interval. Specifically, for each component extraction interval, the candidate component group extraction unit 13 extracts components as candidate components that have APIs as endpoints that match the start API and end API of the interval. The conditions for a candidate component are that the API at the start of the component matches the start API of the component extraction interval, and the API at the end of the component matches the end API of the component extraction interval. However, the number of APIs included between the start and end of the component is not a factor. For components with multiple start points, it is sufficient if any of the start points match the start API of the component extraction interval. For components with multiple end points, it is sufficient if any of the end points match the end API of the component extraction interval. If the start API of the component extraction interval is Undefined, the API at the start of the component can be arbitrary, and it is sufficient if the API at the end of the component matches the end API of the component extraction interval. If the end API of the component extraction interval is Undefined, the end API of the component can be arbitrary, and the start API of the component only needs to match the start API of the component extraction interval. Also, if either the start API or end API of the component extraction interval is Undefined, candidate components containing only the end API or only the start API may be extracted.
[0027] Figure 6 shows an example of a group of candidate components. In the example in Figure 6, a group of candidate components was extracted for each of the sections from section 1 to section 4. Candidate component group 1 for section 1 includes components whose terminal API is C. Candidate component group 1 may also include candidate components that contain only C. Candidate component group 2 for section 2 includes components whose starting API is C and whose terminal API is E. Candidate component group 3 for section 3 includes components whose starting API is E and whose terminal API is F. In the example in Figure 6, only one candidate component containing only E and F was extracted. Candidate component group 4 for section 4 includes components whose starting API is F. Candidate component group 4 may also include candidate components that contain only F.
[0028] If the start and end APIs are abstract APIs that are higher-level concepts, components that have specific APIs included in those higher-level concepts as endpoints will be extracted as candidates. For example, if the start API is a higher-level concept such as "a function to output the CPU temperature," components that have more specific APIs included in that higher-level concept as endpoints, such as "an API that outputs the CPU temperature every second" or "an API that outputs the CPU temperature in Celsius," will be selected as candidates.
[0029] The component group connection unit 14 selects one component from each candidate component group and enumerates all component connection patterns. For example, if candidate component groups 1 through 4 contain 5, 3, 1, and 2 candidate components respectively, the number of combinations for selecting one component from each candidate component group is 5 × 3 × 1 × 2 = 30, resulting in 30 component connection patterns. Note that in consecutive component extraction intervals, the terminal API and the starting API are the same, so the candidate components selected one from each candidate component group can be connected.
[0030] Furthermore, the component group connection unit 14 refers to the API dependencies of the component repository 22 and excludes component connection patterns from all component connection patterns that do not satisfy the API dependencies.
[0031] Figure 7 shows an example of excluding component connection patterns that do not satisfy API dependencies. The upper part of Figure 7 shows all component connection patterns, and the lower part shows component connection patterns with non-API dependency patterns excluded. In the example in Figure 7, it is assumed that E has a dependency on D. The component group connection unit 14 excludes the second component connection pattern from the top that does not satisfy this dependency.
[0032] The component group connection unit 14 may generate arbitrary component connection patterns without enumerating all component connection patterns.
[0033] The APL generation unit 15 generates and outputs an APL that satisfies the user's requirements based on the obtained component connection pattern. For example, the APL generation unit 15 inputs an instruction statement to generate an APL, the user's requirements, and the obtained component connection pattern into the generation AI to generate the APL. The APL generated here is the code that actually operates by calling each API included in the component connection pattern.
[0034] If multiple component connection patterns remain, the APL generation unit 15 may generate the APL using any of the component connection patterns, or it may generate the APL using the component connection pattern with the fewest APIs used, or it may generate the APL using the component connection pattern with the most connection history.
[0035] [Processing of the Application Generation Device] Referring to the flowchart in Figure 8, an example of the processing flow of the generation device 10 will be explained. Assume that components are stored in the component repository 22.
[0036] In step S11, the API selection unit 11 inputs the user's request into the LLM and obtains candidate APIs and their order from the LLM's output data.
[0037] In step S12, the extraction interval setting unit 12 sets a component extraction interval between candidate APIs, specifying a start API and an end API, based on the candidate APIs and the order of candidate APIs obtained in step S11.
[0038] In step S13, the candidate component group extraction unit 13 extracts candidate component groups for each component extraction interval based on the API information of the endpoints of each component stored in the component repository 22 and the start API and end API of the component extraction interval.
[0039] In step S14, the component group connection unit 14 selects one component from each candidate component group, enumerates all component connection patterns, and refers to the API dependencies of the component repository 22 to exclude component connection patterns that do not satisfy the API dependencies.
[0040] In step S15, the APL generation unit 15 generates an APL based on the obtained component connection pattern.
[0041] As described above, the generation device 10 of this embodiment includes a component repository 22 that holds components including a plurality of APIs, connection relationships between the plurality of APIs, and information on endpoint APIs; an extraction interval setting unit 12 that sets component extraction intervals with candidate APIs as endpoints based on the order of APIs to solve the user's request; a candidate component group extraction unit 13 that extracts a group of candidate components from the component repository 22 for each component extraction interval, with the same API as the endpoint API of the component extraction interval as the endpoint API of the component extraction interval; a component group connection unit 14 that generates a component connection pattern by selecting and combining one component from each of the candidate component groups; and an APL generation unit 15 that generates an application from the component connection pattern. As a result, by using APIs with a proven connection record, the reliability of connections between APIs is ensured, and applications that meet the user's request can be automatically generated.
[0042] In the generation device 10 of this embodiment, the component repository 22 maintains the dependencies of each API, and the component group connection unit 14 selects one component from each candidate component group to generate component connection patterns for all possible combinations, and then excludes component connection patterns that do not satisfy the functional dependencies. This increases the likelihood of extracting components that are suitable for the user's requirements.
[0043] The generation device 10 described above can be a general-purpose computer system, such as the one shown in Figure 9, which includes a central processing unit (CPU) 901, memory 902, storage 903, communication device 904, input device 905, and output device 906. In this computer system, the generation device 10 is realized when the CPU 901 executes a predetermined program loaded onto the memory 902. This program can be recorded on a computer-readable non-temporary recording medium such as a magnetic disk, optical disk, or semiconductor memory, or it can be distributed via a network.
[0044] 10 Generation device 11 API selection unit 12 Extraction interval setting unit 13 Candidate component group extraction unit 14 Component group connection unit 21 Component creation unit 22 Component repository
Claims
1. An application generation device comprising: a component holding unit that holds a component including a plurality of functions, connection relationships between the plurality of functions, and information on the functions at the endpoints; a section setting unit that sets a plurality of component extraction sections with the main functions as endpoints based on the order of a plurality of main functions for solving the user's request; a component extraction unit that extracts a group of candidate components from the component holding unit for each component extraction section, the same function as the main function at the endpoint of the component extraction section as the endpoint of the component extraction section; a component connection unit that generates a component connection pattern by selecting and combining one component from each of the candidate component groups; and a generation unit that generates an application from the component connection pattern.
2. A generation apparatus according to claim 1, wherein the component holding unit maintains the dependencies of each function, and the component connecting unit selects one component from each of the candidate component groups to generate component connection patterns for all combinations, and then excludes the component connection patterns that do not satisfy the functional dependencies.
3. A generation device according to claim 1, comprising a function selection unit that inputs a prompt including an instruction statement that instructs the selection of main functions for solving the user's request and the output of the order of the main functions, the user's request, and specification data of available functions into a large-scale language model to obtain the order of the plurality of main functions for solving the user's request.
4. A generation apparatus according to claim 1, wherein the generation unit inputs the component connection pattern into a large-scale language model to generate an application.
5. A method for generating an application, wherein a computer holds a component in a component holding unit that includes a plurality of functions, connection relationships between the plurality of functions, and information on the functions at the endpoints; sets a plurality of component extraction intervals with the main functions as endpoints based on the order of a plurality of main functions for solving the user's request; extracts a group of candidate components from the component holding unit for each component extraction interval, with the same function as the main function at the endpoint of the component extraction interval as the endpoint; generates a component connection pattern by selecting and combining one component from each of the candidate component groups; and generates an application from the component connection pattern.
6. A generation method according to claim 5, wherein the component holding unit maintains the dependencies of each function, selects one component from each of the candidate component groups to generate component connection patterns for all combinations, and then excludes the component connection patterns that do not satisfy the functional dependencies.
7. A generation method according to claim 5, comprising inputting a prompt including an instruction statement that instructs the selection of key functions for solving the user's request and the output of the order of the key functions, the user's request, and specification data of available functions into a large language model to obtain the order of the plurality of key functions for solving the user's request.
8. A generation method according to claim 5, comprising inputting the component connection pattern into a large-scale language model to generate an application.