Processing device and program

The processing device and program enable accurate mapping of API terms across services, addressing the high costs and manual efforts of existing API switching methods by automating term association and state transitions, thereby reducing operational burdens.

WO2025173158A1PCT designated stage Publication Date: 2025-08-21NT T INC
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/005225
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-02-15
Publication Date
2025-08-21

AI Technical Summary

Technical Problem

Existing methods for switching API services are costly and require manual creation of common APIs and mappings, leading to high development and operational burdens.

Method used

A processing device and program that associate method and parameter names across multiple APIs based on similarity and state transitions, enabling accurate mapping and reducing the need for manual intervention.

Benefits of technology

Facilitates high-accuracy term association in APIs, reducing the burden of switching services by eliminating the need to modify API call and link units, thus optimizing service transitions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024005225_21082025_PF_FP_ABST
    Figure JP2024005225_21082025_PF_FP_ABST
Patent Text Reader

Abstract

This processing device 1 is provided with: a storage device that stores first API data 11 associating the method name, type, and description of each method used in an initial state for a first API, and second API data 12 associating the method name, type, and description of each method used in an initial state for a second API; and a mapping processing unit 21 that associates the two methods of a method pair which includes one method selected from among the methods used in the initial state for the first API data 11 and one method selected from among the methods used in the initial state for the second API data 12, said two methods being of the same type and having similar method names and descriptions.
Need to check novelty before this filing date? Find Prior Art

Description

Processing device and program

[0001] The present disclosure relates to a processing device and a program.

[0002] Some service providers provide services by combining externally published services such as API (Application Programming Interface) services, etc. In order to improve their services, such service providers switch to more attractive API services on an ongoing basis.

[0003] API services vary in API format, internal structure, etc. When switching API services, service providers may need to modify the API call unit and the link function unit that links with the API call unit. The development costs and operational aspects associated with these modifications are a barrier to switching API services.

[0004] For example, there is a method in which a person designs and implements mapping between a common API and the API of each API service, taking into account the API of each API service (for example, Non-Patent Document 1). Another method is to align formats and simplify the implementation of control code by converting API specifications into a standard format (Patent Document 1).

[0005] JP 2019-144848 A

[0006] CloudBridge: a Simple Cross-Cloud Python Library Goonasekera N, Lonie A, Taylor J, Afgan E. CloudBridge:Proc XSEDE16 (2016)

[0007] However, the technology described in Non-Patent Document 1 is costly because it requires manual creation of the common API and the mapping between APIs. Furthermore, the technology described in Patent Document 1 does not create the common API and the mapping between APIs.

[0008] Therefore, a common API and a method for easily associating terms used in a plurality of APIs to perform mapping between APIs are required.

[0009] The present disclosure has been made in consideration of the above circumstances, and an object of the present disclosure is to provide a technology that can associate terms used in multiple APIs with high accuracy.

[0010] A processing device according to one aspect of the present disclosure includes a storage device that stores first API data that associates the method name, type, and description of each method used in an initial state for a first API, and second API data that associates the method name, type, and description of each method used in an initial state for a second API, and a mapping processing unit that associates two methods of a method pair that include one method selected from the methods used in the initial state of the first API data and one method selected from the methods used in the initial state of the second API data, the two methods having the same type and similar method names and descriptions.

[0011] A program according to one aspect of the present disclosure causes a computer to function as a memory unit that stores in a storage device first API data that associates the method name, type, and description of each method used in an initial state for a first API, and second API data that associates the method name, type, and description of each method used in an initial state for a second API, and a mapping processing unit that associates two methods of a method pair that include one method selected from the methods used in the initial state of the first API data and one method selected from the methods used in the initial state of the second API data, and that have the same type and similar method names and descriptions.

[0012] According to the present disclosure, it is possible to provide a technology that can associate terms used in multiple APIs with high accuracy.

[0013] FIG. 1 is a diagram illustrating functional blocks of a processing device according to the present disclosure. FIG. 2 is a diagram illustrating an example of state data of a first API. FIG. 3 is a diagram illustrating an example of resource data of a first API. FIG. 4 is a diagram illustrating an example of state data of a second API. FIG. 5 is a diagram illustrating an example of resource data of a second API. FIG. 6 is a diagram illustrating an example of method mapping data. FIG. 7 is a diagram illustrating an example of parameter mapping data. FIG. 8 is a flowchart illustrating an example of method mapping processing. FIG. 9 is a flowchart illustrating an example of parameter mapping processing. FIG. 10 is a diagram illustrating the hardware configuration of a computer used in the processing device.

[0014] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. In the description of the drawings, the same parts are designated by the same reference numerals and the description thereof will be omitted.

[0015] (Processing Device) A processing device 1 according to the present disclosure associates terms used in multiple APIs of multiple API services provided by various companies. The terms associated by the processing device 1 are method names and parameter names used in the API services. The processing device 1 is used when designing a common API common to the APIs provided by various companies and mapping between each API.

[0016] In the present disclosure, the processing device 1 associates method names of each API based on the relationship between methods used in each state of each API and the similarity between each method name and its description. The processing device 1 associates parameter names of each API based on the relationship between parameters and the methods in which the parameters are used and the similarity between each parameter name and its description. The processing device 1 may also associate method names or parameter names by taking other factors into consideration.

[0017] In the present disclosure, an example will be described in which the processing device 1 maps the methods and parameters used in a first API provided by company A and a second API provided by company B.

[0018] 1, the processing device 1 includes first API data 11, second API data 12, and mapping data 13, and the function of a mapping processing unit 21. Each piece of data is stored by a storage unit in a storage device such as a memory 902 or a storage 903. The functions are implemented in a CPU 901.

[0019] The first API data 11 is data that associates the method name, type, and description of each method used in each state of the first API, and also includes parameter names used in each method. The first API data 11 is generated from an API reference provided by the provider of the first API. The first API data 11 may be generated by computer processing or by a person in charge.

[0020] The first API data 11 includes state data 11a and resource data 11b.

[0021] The state data 11a associates the method name, type, and description of each method used in each state. In this disclosure, each state is at least an initial state and a state to which the initial state is transitioned. The description will be given for a case in which one state transition occurs within the API. Two or more state transitions may occur within the API.

[0022] As shown in Figure 2, the state data 11a defines the methods used in each state of the first API. The state data 11a shown in Figure 2 is in Extensible Markup Language (XML) format, but is not limited to this. The state data 11a may be in any format, such as comma separated values ​​(CSV) format or database format. The state data 11a may be in any format as long as it can identify the state within the API, the method used in that state, and information about that method for each item.

[0023] States are specified by items beginning with "state id". States include "INITIAL_State" and "LIVE VERSION". Methods in each state are specified by items beginning with "transition event". The method names used in the state "INITIAL_State" are "Objects.insert" and "Objects.copy".

[0024] Each method has the fields "target", "desc", and "type". "target", "desc", and "type" respectively specify the name of the state to which this method will transition, the description of this method, and the type of this method. For the method "Objects.insert", the name of the state to which this method will transition is "LIVE VERSION", the description is "Store a new object and metadata. ...", and the type is "CREATE".

[0025] In this disclosure, the following five types of methods are assumed. Method types are distinguished by the current state, whether there is a state transition, or the state to which the state will be transitioned. (1) CREATE: A method executed in the initial state. (2) READ: A method that does not change the value or state. (3) UPDATE_stay: A method that changes only the value, not the state. (4) UPDATE_trans: A method that changes the value and state. (5) DELETE: A method that transitions to the final state.

[0026] The resource data 11b includes parameter names used in each method used in the first API. FIG. 3 shows the resource data 11b, with parameters in an ER diagram (Entity Relationship Diagram) corresponding to the names of methods that use the parameters. In the example shown in FIG. 3, the parameter "acl List" is used in the method "Object.insert." Although not shown in FIG. 3, each parameter may be associated with a parameter name, a data format type such as Strings or list, a description, and the like.

[0027] Note that the diagram shown in Figure 3 explains the concept of the resource data 11b, and the resource data 11b held by the processing device 1 has a format, such as XML format, that allows a computer to recognize the relationship between a method name and a parameter name used in that method.

[0028] The second API data 12 is data that associates the method name, type, and description of each method used in each state in the second API, and also includes parameter names used in each method. The second API data 12 is generated from an API reference provided by a provider of the second API.

[0029] The second API data 12 includes state data 12a and resource data 12b. As shown in Fig. 4, the state data 12a for the second API has a data format similar to that of the state data 11a for the first API shown in Fig. 2. As shown in Fig. 5, the resource data 12b for the second API has a concept similar to that of the resource data 11b for the first API shown in Fig. 3.

[0030] The mapping data 13 is data that associates terms used in the first API with terms used in the second API. The mapping data 13 may be in any data format as long as it can associate terms used in the first API with terms used in the second API. In the present disclosure, the mapping data 13 describes a case in which the mapping data 13 associates terms used in two APIs, but this is not limited to this. For example, the mapping data 13 may be data that associates terms used in a common API that defines functions common to the first API and the second API with terms used in the first API and the second API.

[0031] The mapping data 13 includes method mapping data 13a and parameter mapping data 13b.

[0032] The method mapping data 13a shown in Fig. 6 associates the method names used in each API with each state and method type. In the example shown in Fig. 6, in the state "INITIAL_State" and type "CREATE", the method "Object.insert" of the first API of company A is associated with the methods "CopyObject" and "PutObject" of the second API of company B. The method mapping data 13a shown in Fig. 6 also associates the state to which each method transitions.

[0033] 6, the state names in the method mapping data 13a are represented by "INITIAL_State" defined in the present disclosure for the initial state, and by state names defined in each API for the transition destination from the initial state, but are not limited to this. It is sufficient that the state transitions in the first API and the state transitions in the second API are associated with each other, and that the methods used in each associated state are associated with each other.

[0034] 7 associates parameters used in the first API of company A with parameters used in the second API of company B. The parameter mapping data 13b shown in Fig. 7 further associates each parameter with a type.

[0035] The mapping processing unit 21 associates each term of the first API with each term of the second API. The mapping processing unit 21 includes a method mapping unit 22 and a parameter mapping unit 23.

[0036] The method mapping unit 22 associates methods of each API. The method mapping unit 22 identifies a method pair including one method selected from the methods used in the initial state of the state data 11a of the first API data 11 and one method selected from the methods used in the initial state of the state data 12a of the second API data 12. Of the identified method pairs, the method mapping unit 22 associates two methods of the method pair that are the same type and have similar method names and descriptions. The method mapping unit 22 stores the two associated methods in the method mapping data 13a.

[0037] Here, the method mapping unit 22 uses the method used in the first API as a reference and searches the methods of the second API for a method of the same type and with the most similar method name and description.Furthermore, the method mapping unit 22 uses the method used in the second API as a reference and searches the methods of the first API for a method of the same type and with the most similar method name and description.This makes it possible to associate two methods with one method, as shown in Figure 6.

[0038] The method mapping unit 22 is not limited to determining that methods are similar when they contain the same terms. The method mapping unit 22 may calculate the similarity between method names and descriptions by taking into account the similarity of the terms used in the method names and descriptions, for example, by using a synonym dictionary.

[0039] It is preferable that the method mapping unit 22 associates state transitions of each API and associates a method with each state. For example, if an initial state and a next transition state from the initial state are defined for each of the first and second APIs, the method mapping unit 22 associates each transition state with a method for the next transition state. For example, if there are two state transitions depending on the method executed in a certain state, the method mapping unit 22 associates the transition state names for the first and second APIs with each of the two transition states and further associates a method with each of the two transition states. Here, if the type of method does not involve a state transition, specifically, if the type is READ or UPDATE_stay, the method mapping unit 22 does not associate the transition states with each other.

[0040] Specifically, the method mapping unit 22 identifies a method pair including one method selected from the methods used in the state after the transition from the initial state of the first API state data 11a and one method selected from the methods used in the state after the transition from the initial state of the second API state data 12a. Of the identified method pairs, the method mapping unit 22 associates two methods of the method pair that are the same type and have similar method names and descriptions.

[0041] The method mapping unit 22 associates a method with every state defined by each API, and stores the two methods associated with each state in the method mapping data 13a.

[0042] The method mapping process performed by the method mapping unit 22 will be described with reference to FIG.

[0043] In step S101, the method mapping unit 22 extracts a method used in the first API and a method used in the second API in the initial state of the first API and the second API. In step S102, the method mapping unit 22 associates two methods of a method pair that includes one method used in the first API and one method used in the second API, and that are of the same type and have similar method names and descriptions.

[0044] After associating each method in the initial state, in step S103, the method mapping unit 22 determines whether there is a state transition from the initial state in each of the first API and the second API. If there is no state transition, the process ends.

[0045] If a state transition is present, the process proceeds to step S104. In step S104, the method mapping unit 22 extracts a method used in the first API and a method used in the second API in a state to which the first API and the second API are transitioned from their initial states. In step S102, the method mapping unit 22 associates two methods of each method pair that includes one method used in the first API and one method used in the second API, and that are of the same type and have similar method names and descriptions.

[0046] After associating each method with the state after the transition from the initial state, the method mapping unit 22 determines in step S103 whether there is a further state transition from the state after the transition from the initial state in each of the first and second APIs. If there is no state transition, the process ends.

[0047] If there is a transition state, the process proceeds to step S104, and the processes of steps S104 to S103 are repeated until the final states of the first API and the second API are processed. After the final states of each API are processed, the method mapping unit 22 ends the process.

[0048] In this way, the method mapping unit 22 takes into consideration state transitions within the APIs and associates methods within the same state of two APIs, thereby enabling accurate method association.

[0049] The parameter mapping unit 23 associates parameters of each API by using the association of methods of each API obtained by the method mapping unit 22.

[0050] The parameter mapping unit 23 associates the first parameter with the second parameter when each method that uses a first parameter in the resource data 11b of the first API data 11 corresponds to each method that uses a second parameter in the resource data 12b of the second API data 12. The parameter mapping unit 23 stores the two associated parameters in the parameter mapping data 13b.

[0051] The parameter mapping unit 23 identifies a parameter pair including one parameter from among the parameters used in the first API and one parameter from among the parameters used in the second API. For each parameter pair, the parameter mapping unit 23 extracts a method whose first parameter is used in the first API and a method whose second parameter is used in the second API. If the method mapping unit 22 determines that the method extracted from the first API and the method extracted from the second API correspond to each other, the parameter mapping unit 23 associates the two parameters of the parameter pair to be processed.

[0052] When a plurality of methods are extracted from the first API and a plurality of methods are extracted from the second API, the parameter mapping unit 23 determines whether the methods correspond to each other. For example, in the example shown in Fig. 6, when the methods extracted from the first API are Object.copy and Object.insert and the methods extracted from the second API are CopyObject and PutObject, the parameter mapping unit 23 associates parameters to be processed because Object.copy corresponds to CopyObject and Object.insert corresponds to PutObject.

[0053] Here, the parameter mapping unit 23 may not be able to associate the parameters of the first API with the parameters of the second API based solely on the correspondence between the methods, such as when a method using multiple parameters of a first API corresponds to a method using multiple parameters of a second API. In this case, the parameter mapping unit 23 refers to the parameter name and description of each parameter and associates parameters with similar parameter names and descriptions. At this time, the sameness of the parameter types may also be taken into consideration.

[0054] For example, when a method using multiple parameters of a first API corresponds to a method using multiple parameters of a second API, the parameter mapping unit 23 associates the parameter of the first API with the parameter of the second API that has the most similar name and description to the parameter of the first API. Similarly, the parameter mapping unit 23 associates the parameter of the second API with the parameter of the first API that has the most similar name and description to the parameter of the second API.

[0055] 6, one method may be associated with two methods. If there is an extracted method that cannot be associated with a method of another API, the parameter mapping unit 23 does not associate the parameters of the method to be processed. On the other hand, if all of the extracted methods are associated with methods of another API, the parameter mapping unit 23 associates the parameters of the method to be processed.

[0056] The parameter mapping process performed by the parameter mapping unit 23 will be described with reference to FIG.

[0057] In step S201, the parameter mapping unit 23 extracts the parameters of the first API and the parameters of the second API.

[0058] The processes of steps S202 to S205 are performed for each parameter pair of the first API parameter and the second API parameter.

[0059] In step S202, the parameter mapping unit 23 identifies a method of the first API in which a parameter of the first API is used from among the parameter pairs to be processed. In step S203, the parameter mapping unit 23 identifies a method of the second API in which a parameter of the second API is used from among the parameter pairs to be processed.

[0060] In step S204, the parameter mapping unit 23 refers to the method mapping data 13a and determines whether the method identified in step S202 corresponds to the method identified in step S203. If they do not correspond, the processing in steps S202 to S205 is performed for the next parameter pair to be processed.

[0061] If they correspond, in step S205, the parameter mapping unit 23 associates the parameters of the first API with the parameters of the second API of the parameter pair to be processed and stores them in the parameter mapping data 13b.

[0062] In this way, the parameter mapping unit 23 identifies the method in which the parameter is used, and associates the parameter in consideration of the correspondence between the methods in the two APIs.

[0063] For example, if there are parameter names "acl" and "access_list," there is a possibility that these two parameters are associated due to the similarity of the parameter names. However, the parameter mapping unit 23 determines the association between the parameters based on the association between the method using the parameter name "acl" and the method using the parameter name "access_list."

[0064] The parameter mapping unit 23 takes into consideration how the parameters for the method are used, and therefore can associate the parameters with high accuracy.

[0065] In this way, the processing device 1 according to the present disclosure can accurately associate terms used in multiple APIs. By accurately associating each term, a highly accurate common API and a highly accurate mapping relationship between the common API and each API can be obtained. Even if an API service is switched, it is expected that the burden associated with switching API services will be reduced, such as by eliminating the need to modify the processing unit that calls the API or the processing unit that cooperates with the API.

[0066] The processing device 1 of the present embodiment described above is, for example, a general-purpose computer system including a CPU (Central Processing Unit, processor) 901, a memory 902, a storage 903 (HDD: Hard Disk Drive, SSD: Solid State Drive), a communication device 904, an input device 905, and an output device 906. In this computer system, the CPU 901 executes a program loaded on the memory 902, thereby realizing each function of the processing device 1.

[0067] The processing device 1 may be implemented by one computer or by multiple computers, or may be a virtual machine implemented on a computer.

[0068] The program of the processing device 1 can be stored in a computer-readable recording medium such as a HDD, SSD, USB (Universal Serial Bus) memory, CD (Compact Disc), DVD (Digital Versatile Disc), or can be distributed via a network. The computer-readable recording medium is, for example, a non-transitory recording medium.

[0069] The present disclosure is not limited to the above-described embodiments, and various modifications are possible within the scope of the present disclosure.

[0070] REFERENCE SIGNS LIST 1 Processing device 11 First API data 11a, 12a Status data 11b, 12b Resource data 12 Second API data 13 Mapping data 13a Method mapping data 13b Parameter mapping data 21 Mapping processing unit 22 Method mapping unit 23 Parameter mapping unit 901 CPU 902 Memory 903 Storage 904 Communication device 905 Input device 906 Output device

Claims

1. A processing device comprising: a storage device that stores first API data that associates the method name, type, and description of each method used in the initial state for a first API; and second API data that associates the method name, type, and description of each method used in the initial state for a second API; and a mapping processing unit that associates two methods of a method pair that include one method selected from the methods used in the initial state of the first API data and one method selected from the methods used in the initial state of the second API data, where the two methods are of the same type and have similar method names and descriptions.

2. The processing device of claim 1, wherein the first API data further includes a destination state of the initial state, and associates the method name, type, and description of each method used in the destination state; the second API data further includes a destination state of the initial state, and associates the method name, type, and description of each method used in the destination state; and the mapping processing unit associates two methods of a method pair including one method selected from the methods used in the destination state of the first API data and one method selected from the methods used in the destination state of the second API data, the two methods being of the same type and having similar method names and descriptions.

3. The processing device of claim 1, wherein the first API data and the second API data each include parameter names used in each method, and the mapping processing unit associates the first parameter with the second parameter when each method in which a first parameter of the first API data is used corresponds to each method in which a second parameter of the second API data is used.

4. A program that causes a computer to function as: a memory unit that stores in a storage device first API data that associates the method name, type, and description of each method used in the initial state for a first API; and second API data that associates the method name, type, and description of each method used in the initial state for a second API; and a mapping processing unit that associates two methods of a method pair that includes one method selected from the methods used in the initial state of the first API data and one method selected from the methods used in the initial state of the second API data, and that have the same type and similar method name and description.

Citation Information

Patent Citations

  • API matching method and device based on API document

    CN111090462A

  • Management device, management program, and management method

    JP2017162312A