API service orchestration method and device, equipment, medium and product

By acquiring user request text and utilizing intent recognition models and API information knowledge bases, API call chains are automatically constructed, solving the problem of frequent user involvement in API orchestration in existing technologies and achieving efficient API service orchestration.

CN121523769APending Publication Date: 2026-02-13CHINA MOBILE COMM GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511603447.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-04
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

Existing API service orchestration solutions rely on predefined rules or simple matching algorithms, which cannot effectively handle fuzzy or complex API call requirements, resulting in users having to frequently participate in the orchestration process and incurring a heavy operational burden.

Method used

By obtaining users' API service orchestration request text, using an intent recognition model to identify atomic operation entities, retrieving information from an API information knowledge base, constructing an API call chain, and generating orchestration results through semantic analysis, the user's operational burden is reduced.

Benefits of technology

It achieves automated API service orchestration, reduces the operational burden on users during the orchestration process, and can handle complex and ambiguous requirement descriptions to generate accurate API orchestration results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121523769A_ABST
    Figure CN121523769A_ABST
Patent Text Reader

Abstract

The invention provides an API service orchestration method and device, equipment, a medium and a product, and the method comprises the steps: obtaining a demand text which reflects an API service orchestration demand of a user; the demand text is input into an intention recognition model, at least one atomic operation entity output by the intention recognition model is obtained, and the atomic operation entity comprises an operation intention and operation parameters; based on the atomic operation entities, retrieval is conducted in the API information knowledge base, at least one candidate API set is obtained, and each candidate API set corresponds to one atomic operation entity; at least one API calling chain is constructed on the basis of the dependency relationship between the APIs in the candidate API set, and the API calling chain comprises API information of the multiple APIs and calling sequence constraints between the APIs; and determining at least one API orchestration result based on the API call chain and the demand text. According to the invention, the operation burden of a user in API service orchestration can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of network services, and in particular to an API service orchestration method and device, equipment, medium and product. BACKGROUND

[0002] Network capability standardization and network service scenario have become an important issue for various industries. The number and types of application programming interfaces (APIs) have increased dramatically, and API management has become increasingly complex. API gateways and API service orchestration technologies can help developers and operation and maintenance personnel more efficiently manage APIs, enabling rapid integration and service-oriented opening of API capabilities. As a kind of middleware, API gateways are located between client applications and backend services. In API gateways, as API invoker business requirements diversify, a single API often cannot meet complex application scenarios, so multiple APIs need to be combined and orchestrated to build new functions. API service orchestration technology aims to connect different APIs in a certain logical order to integrate them into new service links, thereby realizing more complex business functions.

[0003] Existing API service orchestration schemes usually rely on predefined rules or simple matching algorithms. These methods lack effective orchestration mechanisms in scenarios where the number of APIs is large, the growth rate is rapid, and the invocation requirements are constantly changing. They cannot handle vague or complex requirement descriptions to generate corresponding API service orchestration schemes, resulting in users needing to frequently participate in the orchestration process, which is burdensome for users. SUMMARY

[0004] The present application provides an API service orchestration method, device, equipment, medium and product to solve the defect that the user needs to frequently participate in the orchestration process in the prior art, which is burdensome for users, and to reduce the user's operational burden in API orchestration.

[0005] The present application provides an API service orchestration method, comprising: obtaining a requirement text reflecting a user's API service orchestration requirement; inputting the requirement text into an intent recognition model to obtain an atomic operation entity recognition result output by the intent recognition model, the atomic operation entity recognition result comprising at least one atomic operation entity, the atomic operation entity comprising an operation intent and an operation parameter; based on the atomic operation entity, performing retrieval in an API information knowledge base to obtain at least one candidate API set, each candidate API set corresponding to an atomic operation entity; construct at least one API calling chain based on the dependency relationship between the APIs in the candidate API set, the API calling chain including API information of a plurality of APIs and calling sequence constraints between the APIs; determine at least one API orchestration result based on the API calling chain and the requirement text.

[0006] According to the API service orchestration method provided in the application, the step of constructing at least one API calling chain based on the dependency relationship between the APIs in the candidate API set includes: recursively query the preceding API of each API in the candidate API set based on the dependency relationship between the APIs in the candidate API set, to obtain at least one initial calling chain, wherein when a first API depends on a second API for running, the second API is the preceding API of the first API; perform parameter matching checking on the APIs in the initial calling chain, to obtain the API calling chain including a plurality of parameter-matched APIs.

[0007] According to the API service orchestration method provided in the application, the step of recursively querying the preceding API of each API in the candidate API set to obtain at least one initial calling chain includes: when the API in the candidate API set has no preceding API in each of the candidate API sets, re-perform the step of searching for a new API by searching for the API information in the API information knowledge base based on the atomic operation entity; The step of performing parameter matching checking on the APIs in the initial calling chain to obtain the API calling chain including a plurality of parameter-matched APIs includes: when the API parameters in the initial calling chain are not matched, re-perform the step of searching for a new API by searching for the API information in the API information knowledge base based on the atomic operation entity; when the execution step of searching for a new API by searching for the API information in the API information knowledge base based on the atomic operation entity exceeds a threshold value, generate a follow-up question text based on the requirement text; obtain a reply text corresponding to the follow-up question text, and update the requirement text based on the reply text.

[0008] According to the API service orchestration method provided in the application, the step of determining at least one API orchestration result based on the API calling chain and the requirement text includes: input the API calling chain and the requirement text into a language model, and obtain at least one candidate orchestration result output by the language model; constructing an API topology graph corresponding to each of the candidate orchestration results respectively; performing connection rule checking on the API topology graph; when the API topology graph meets the preset rule, taking the candidate orchestration result corresponding to the API topology graph as the API orchestration result; when the API topology graph does not meet the preset rule, performing completion on the API topology graph based on API orchestration atomic operations to obtain a completed API topology graph meeting the preset rule, and taking the orchestration result corresponding to the completed API topology graph as the API orchestration result.

[0009] According to the API service orchestration method provided in the application, the API information knowledge base is searched based on the atomic operation entity, and at least one candidate API set is obtained, which includes: based on the semantics of the words included in the atomic operation entity, the words in the atomic operation entity are expanded to obtain an expanded atomic operation entity; performing keyword matching on the words in the expanded atomic operation entity and the API information in the API information knowledge base, obtaining a first ranking result based on the matching degree, and the first ranking result includes multiple APIs; based on the semantic vector of the expanded atomic operation entity and the semantic vector of the API information in the API information knowledge base, a second ranking result is obtained based on the semantic vector similarity, and the second ranking result includes multiple APIs; based on the first ranking result and the second ranking result, the candidate API set corresponding to the atomic operation entity is determined.

[0010] According to the API service orchestration method provided in the application, the intent recognition model includes a prediction module, a graph interaction module and a decoding module; the demand text is input into the trained intent recognition model to obtain the atomic operation entity recognition result output by the intent recognition model, which includes: the demand text is input into the prediction module to obtain the prediction result output by the prediction module, the prediction result includes operation intent prediction results and operation parameter prediction results corresponding to multiple words in the demand text respectively, the operation intent prediction result reflects the probability of each operation intent corresponding to a word, and the operation parameter prediction result reflects the probability of each operation parameter corresponding to a word for each operation intent; construct an interaction graph based on the prediction result, the interaction graph including a first vertex, a second vertex and a third vertex, the first vertex corresponding to a word in the requirement text, the second vertex corresponding to an operation intent, and the third vertex corresponding to an operation parameter, an edge between the first vertex and the second vertex reflecting a probability that the word of the first vertex corresponds to the operation intent of the second vertex, an edge between the first vertex and the third vertex reflecting a probability that the word of the first vertex reflects the operation parameter of the third vertex, and an edge between the second vertex and the third vertex reflecting a probability that the operation parameter of the third vertex is the operation parameter of the operation intent of the second vertex; input the interaction graph into the graph interaction module, and obtain, by the graph interaction module, feature representations of vertices in the interaction graph by using a graph attention network; input the feature representations of the vertices in the interaction graph into the decoding module, and obtain the atomic operation entity recognition result output by the decoding module.

[0011] The application further provides an API service orchestration apparatus, which comprises: a user interaction module configured to acquire a requirement text, the requirement text reflecting an API service orchestration requirement of a user; an intent recognition module configured to input the requirement text into an intent recognition model, and acquire an atomic operation entity recognition result output by the intent recognition model, the atomic operation entity recognition result including at least one atomic operation entity, the atomic operation entity including an operation intent and an operation parameter; an API retrieval module configured to retrieve, based on the atomic operation entity, an API information knowledge base, and obtain at least one candidate API set, each candidate API set corresponding to one atomic operation entity; a call chain construction module configured to construct, based on a dependency relationship between APIs in the candidate API set, at least one API call chain, the API call chain including API information of a plurality of APIs and a calling sequence constraint between the APIs; an API orchestration module configured to determine, based on the API call chain and the requirement text, at least one API orchestration result.

[0012] The application further provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the API service orchestration method according to any one of the above when executing the computer program.

[0013] The application further provides a non-transitory computer-readable storage medium, which stores a computer program, and the computer program is executable on a processor to implement the API service orchestration method according to any one of the above.

[0014] The application further provides a computer program product comprising a computer program which, when executed by a processor, implements the API service orchestration method according to any one of the above.

[0015] The API service orchestration method, device, equipment, medium and product provided by the application, by obtaining a demand text reflecting the API service orchestration demand of a user, and inputting the demand text into an intention recognition model first, so as to recognize atomic operation entities including operation intention and operation parameters based on the demand text, then performing retrieval in an API information knowledge base based on the semantics of the recognized atomic operation entities, obtaining each candidate API set corresponding to each atomic operation entity respectively, and constructing an API calling chain including API information and calling sequence constraints between APIs based on the dependency relationship between APIs in the candidate set, and finally determining an API orchestration result based on the API calling chain and the demand text, in the process of determining the API orchestration result in the application, the operation intention and operation parameters of the user are not simply recognized based on fixed predefined rules or matching algorithms, but are recognized based on semantic analysis of the demand text of the user, the atomic operation entities including operation intention and operation parameters are retrieved in the API information knowledge base, the candidate API set corresponding to each atomic operation entity is obtained, and the calling sequence between APIs in the candidate API set is further constrained, and the API orchestration result is generated based on the information and calling sequence constraints of the APIs in the candidate API set, so that the user only needs to input the API service orchestration demand, and an accurate and usable API orchestration result can be generated, thereby reducing the operation burden of the user in API service orchestration. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.

[0017] Figure 1 is a flowchart of the API service orchestration method provided by the application.

[0018] Figure 2 is a logic flowchart in an embodiment of the API service orchestration method provided by the application.

[0019] Figure 3 is a schematic diagram of an API topology graph in the API service orchestration method provided by the application.

[0020] Figure 4 is a structural schematic diagram of an API service arrangement device provided by the present application.

[0021] Figure 5 is a structural schematic diagram of an electronic device provided by the present application. DETAILED DESCRIPTION

[0022] For the purposes of the present application, the technical solutions and advantages thereof are more clearly apparent, the technical solutions in the present application will be described clearly and completely below in conjunction with the drawings in the present application. Obviously, the described embodiments are some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of protection of the present application.

[0023] It should be understood that when used in the specification and the appended claims, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0024] It should also be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, unless otherwise clearly indicated by the context, the singular forms "a", "an" and "the" are intended to include the plural forms.

[0025] It should be further understood that the term "and / or" used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.

[0026] As used in the present application specification and the appended claims, the term "if" can be interpreted as "when" or "upon" or "in response to a determination" or "in response to detecting" depending on the context. Similarly, the phrases "if it is determined" or "if [a described condition or event] is detected" can be interpreted to mean "upon determining" or "in response to determining" or "upon detecting [the described condition or event]" or "in response to detecting [the described condition or event]" depending on the context.

[0027] The API service arrangement method provided by the present application is described below. Figures 1-3 The API service arrangement method provided by the present application is described below. Figure 1 As shown in the figure, the API service arrangement method includes the following steps: S110, obtaining a requirement text, the requirement text reflecting the API service arrangement requirement of a user; S120, input the demand text into the intent recognition model, obtain an atomic operation entity recognition result output by the intent recognition model, the atomic operation entity recognition result includes at least one atomic operation entity, and the atomic operation entity includes an operation intent and an operation parameter; S130, based on the atomic operation entity, searching in the API information knowledge base to obtain at least one candidate API set, each candidate API set corresponding to an atomic operation entity; S140, based on the dependency relationship between the APIs in the candidate API set, constructing at least one API calling chain, the API calling chain including API information of multiple APIs and calling sequence constraints between the APIs; S150, determining at least one API arrangement result based on the API calling chain and the demand text.

[0028] The API service arrangement method provided in the application, by obtaining the demand text reflecting the API service arrangement demand of the user, and first inputting the demand text into the intent recognition model, thereby obtaining the atomic operation entity including the operation intent and the operation parameter based on the demand text, then searching in the API information knowledge base based on the semantics of the atomic operation entity recognized, obtaining each candidate API set corresponding to each atomic operation entity, then constructing the API calling chain including the API information and the calling sequence constraint between the APIs based on the dependency relationship between the APIs in the candidate set, and finally determining the API arrangement result based on the API calling chain and the demand text, in the process of determining the API arrangement result in the application, not simply based on the fixed predefined rule or matching algorithm, but the operation intent of the user and the operation parameter of the intent are recognized based on the semantic analysis of the demand text of the user, the atomic operation entity including the operation intent and the operation parameter is searched in the API information knowledge base, each candidate API set corresponding to each atomic operation entity is obtained, and the calling sequence between the APIs in the candidate API set is further constrained, and the API arrangement result is generated based on the information of the APIs in the candidate API set and the calling sequence constraint, which can make the user only need to input the API service arrangement demand, and accurate and available API arrangement result can be generated, thereby reducing the operation burden of the user in the API service arrangement.

[0029] As Figure 2As shown, the requirement text can be obtained through a user interaction module, which provides a text input interface, and the user can input the requirement text through the user interaction module, which reflects the user's API orchestration requirements. For example, the user can input: "Please help me orchestrate a service to query the power consumption of each base station." A large language model can be deployed in the user interaction module to infer the dialogue strategy, enabling the user to clearly and smoothly express their requirements, resulting in more accurate requirement text. After obtaining the requirement text through the user interaction module, subsequent processing of the requirement text is performed, and the API orchestration result is obtained. The API orchestration result can be displayed to the user through the user interaction module.

[0030] In one possible implementation, intelligent dialogue management is performed through the user interaction module, such as using a large language model for dialogue management. This ensures that the dialogue is coherent and logically clear, and the user interaction model also performs context awareness, i.e., remembers the dialogue history, so that it can better understand the user's continuous questions or more complex requests in the process of obtaining the requirement text through dialogue with the user, guiding the user to input more accurate requirement text.

[0031] Further, the method provided by the present application can also support a user feedback mechanism, which can receive user evaluations of the interactive experience and service quality through the user interaction module, continuously improving API orchestration performance and user experience.

[0032] Compared with the graphical drag-and-drop orchestration interactive interface in the prior art, the present application uses a large language model technology to realize natural language dialogue interaction, automatically analyzes user requirements and context background, and reduces the user threshold.

[0033] After obtaining the requirement text, the requirement text is input into the intent recognition model for intent recognition, and the atomic operation entity recognition result output by the intent recognition model is obtained. The atomic operation entity recognition result includes at least one atomic operation entity, and the atomic operation entity includes an operation intent and an operation parameter.

[0034] The intent recognition model is used to output at least one atomic operation entity based on the requirement text. The atomic operation entity is used to describe the user's intent to machine-related operation details. Each atomic operation entity represents an independent operation step, which mainly includes an operation intent and an operation parameter. The operation intent represents the main action or target that the user wants to perform, and the operation parameter contains specific information or conditions required for executing the operation, such as objects, times, and locations. For example, the requirement text is "Please help me orchestrate a service to query the power consumption of each base station, and send the base station power consumption to the headquarters IP workstation in the form of an email." Two atomic operation entities can be identified and stored in json format, where entity one is: { "intent": "query power consumption", "parameters": ["target": "each base station", "range": "today", "data": "power consumption"] }.

[0035] Entity two is: { "intent": "send email", "parameters": ["send to": "headquarters IP workstation", "body": "base station power consumption signal", "subject": "each base station's power consumption today"] }.

[0036] For simple requirement texts, the intent recognition model can be a keyword matching model to realize the identification of atomic operation entities through keyword matching. However, in actual service arrangement use, the requirement texts of users are often more complex, containing multiple atomic operation intents and more complex description methods. In order to realize the identification of atomic operation entities in complex requirement texts, in one possible implementation manner of the method provided in the present application, the intent recognition model is a multi-intent recognition and semantic slot joint model, that is, the intent recognition model is used to perform two natural language tasks: a multi-intent recognition task and a semantic slot filling task. The multi-intent recognition task is used to identify multiple atomic operation intents in the requirement text, which can be attributed to a multi-classification task, and the semantic slot filling task is used to identify and fill the required condition parameters of each intent, which can be attributed to a sequence labeling task.

[0037] The multi-intent recognition task and the semantic slot filling task can be respectively realized based on a multi-intent recognition model and a semantic slot filling model in the related art, that is, in some embodiments, a joint model of the multi-intent recognition model and the semantic slot filling model in the related art can be used as the intent recognition model.

[0038] In another embodiment of the method provided in the present application, the intent recognition model is a model based on a graph neural network, and specifically, the intent recognition model includes a prediction module, a graph interaction module and a decoding module. The requirement text is input into the trained intent recognition model to obtain an atomic operation entity recognition result output by the intent recognition model, including: The requirement text is input into the prediction module to obtain a prediction result output by the prediction module. The prediction result includes operation intent prediction results and operation parameter prediction results corresponding to multiple words in the requirement text, respectively. The operation intent prediction result reflects the probability of each operation intent corresponding to the word, and the operation parameter prediction result reflects the probability of the word being the operation parameter of each operation intent, respectively. construct an interaction graph based on the prediction results, the interaction graph including a first vertex, a second vertex and a third vertex, the first vertex corresponding to a word in the demand text, the second vertex corresponding to an operation intention, and the third vertex corresponding to an operation parameter, an edge between the first vertex and the second vertex reflecting a probability that the word of the first vertex corresponds to the operation intention of the second vertex, an edge between the first vertex and the third vertex reflecting a probability that the word of the first vertex is the operation parameter of the third vertex, and an edge between the second vertex and the third vertex reflecting a probability that the operation parameter of the third vertex is the operation parameter of the operation intention of the second vertex; input the interaction graph into a graph interaction module, and obtain feature representations of vertices in the interaction graph by using a graph attention network through the graph interaction module; input the feature representations of the vertices in the interaction graph into a decoding module, and obtain an atomic operation entity recognition result output by the decoding module.

[0039] Specifically, the prediction module includes an encoder, an intention decoder and a semantic slot decoder, the encoder is configured to convert the word vector into a semantic hidden vector of the input text. The encoder can adopt the structure of a semantic encoding model in the related art, for example, a pre-training language model BERT based on a Transformer architecture. The intention decoder adopts the structure of a multi-task classification model, for example, includes a fully connected layer for intention classification added on top of BERT and an output layer for independently predicting the activation probability of each intention using a sigmoid activation function, that is, the intention encoder outputs an operation intention prediction result reflecting the probability that a word corresponds to each operation intention. The semantic slot decoder can adopt a sequence labeling model structure, including a fully connected layer for slot classification added on top of BERT, which converts the output of BERT into a normalized score of the slot label corresponding to each word. The semantic slot decoder further includes a conditional random field layer to decode the most likely label sequence, that is, the output of the semantic slot decoder is a probability that a word is an operation parameter of each intention.

[0040] After obtaining the operation intention prediction result and the operation parameter prediction result, an interaction graph is constructed based on the operation intention prediction result and the operation parameter prediction structure, the vertices in the interaction graph including three kinds of word vertices, operation parameter vertices and operation intention vertices, using the hidden representation output by BERT as the initial node feature of the word vertex, using the semantic vectors of the intention and the operation as the initial node features of the intention vertex and the operation parameter vertex respectively; the edges include three kinds of word-operation parameter connection lines, word-operation intention connection lines and operation intention-operation parameter connection lines.

[0041] The graph interaction module includes a graph neural network, which in one possible implementation is a graph attention network (GAT). After the dependency relationship between the word, operation intent, and operation parameter is represented by the interaction graph, the graph attention network is used to update the node representation to capture the mutual influence between different elements. In each iteration step, for each node v, the graph attention network calculates the attention coefficient a(v, u) between it and the neighbor node u, and updates the node v using the nonlinear activation function ReLU. The above iteration process is repeated several times until convergence to obtain the final node feature representation. It can be understood that the graph neural network included in the graph interaction module can also be other types of graph neural networks, such as a graph convolution network, etc.

[0042] The feature representation of the vertex in the interaction graph output by the graph interaction module is input into the decoding module to obtain the atomic operation entity recognition result output by the decoding module. The intent recognition model can be trained based on multiple sets of training data, and each set of training data includes a sample text and an intent label and a semantic slot label corresponding to the sample text. In the training process of the intent recognition model, a joint loss function can be used to update the parameters of the intent recognition model, and the joint loss includes the loss of the intent recognition task and the loss of the semantic slot recognition task.

[0043] After the intent recognition model is trained, the model is loaded in the deployment environment to perform intent recognition using the model to obtain the atomic operation entity recognition result based on the requirement text. In one possible implementation, user feedback and prediction results can also be collected during the use of the intent recognition model, and when the performance of the intent recognition model decreases, new training data is collected to retrain the intent recognition model.

[0044] After obtaining the atomic operation entity, at least one candidate API set is obtained based on the atomic operation entity in the API information knowledge base. The API information knowledge base includes API information of multiple APIs, and the API information can include API name, description, input parameter, output parameter, request method, precondition, etc. The API information can be saved in the API information knowledge base in the form of API document.

[0045] In some possible implementations, the API information knowledge base can be searched based on the atomic operation entity based on a keyword matching method, that is, the keywords in the atomic operation entity text are matched with the keywords in the API information. This implementation process is relatively simple and consumes less computing resources.

[0046] Since there are a large number of professional terms in API retrieval, and the API parameter expression is closely related to the context, relying only on keyword retrieval may not be accurate enough. In another possible implementation of the present application, keyword matching and semantic retrieval are combined to improve the accuracy of the API candidate set obtained by retrieval. Specifically, based on the atomic operation entity, at least one candidate API set is obtained by searching the API information knowledge base, including: Based on the semantics of the words included in the atomic operation entity, the words in the atomic operation entity are expanded to obtain an expanded atomic operation entity. The words in the expanded atomic operation entity are matched with the API information in the API information knowledge base based on keywords, and a first ranking result is obtained based on the matching degree, the first ranking result including a plurality of APIs. Based on the semantic vector of the expanded atomic operation entity and the semantic vector of the API information in the API information knowledge base, a second ranking result is obtained based on the similarity of the semantic vectors, the second ranking result including a plurality of APIs. Based on the first ranking result and the second ranking result, a candidate API set corresponding to the atomic operation entity is determined.

[0047] In some embodiments, the retrieval can be directly based on the atomic operation entity output by the intent recognition model. In some other embodiments of the present application, the words in the atomic operation entity output by the intent recognition model can also be expanded to expand the query of the atomic operation entity and improve the accuracy and coverage of the search. Specifically, the words in the atomic operation entity can be expanded by adding synonyms, near-synonyms, etc. This step can be implemented by a pre-trained word embedding model. The expanded atomic operation entity obtained after expansion includes not only the words in the original atomic operation entity, but also the synonyms and near-synonyms of the words in the original atomic operation entity.

[0048] After obtaining the expanded atomic operation entity, retrieval is performed based on two retrieval methods: keyword-based retrieval and semantic vector-based retrieval. For these two retrieval methods, two different processing methods can be used to obtain two retrieval indexes.

[0049] Specifically, for the keyword-based retrieval mode, the API documents can be indexed first, the importance of words can be evaluated by analyzing the word frequency and document frequency, and then a sparse vector representation can be generated, and an inverted index can be constructed to map each word to a list of documents containing the word, thereby facilitating fast retrieval of related documents. For the semantic vector-based retrieval mode, the API information text can be blocked and vectorized to construct a vector index from the original form of the API information. Specifically, API information can be extracted from each API document, and then a pre-trained language model can be used to convert the text into a high-dimensional vector. The generated vector can be stored in a vector database.

[0050] The keywords in the augmented atomic operation entity are matched with the keyword index, and the plurality of APIs in the knowledge base are sorted according to the average ranking of the keywords in each augmented atomic operation entity. The retrieval results of each augmented atomic operation entity are sorted respectively to obtain the first sorting result corresponding to each augmented atomic operation entity.

[0051] The augmented atomic operation entity is converted into a semantic vector using a language model, and then the semantic vectors of the augmented atomic operation entity and the APIs in the API knowledge base are calculated for similarity. The plurality of APIs in the knowledge base are sorted according to the similarity to obtain the second sorting result corresponding to each augmented atomic operation entity.

[0052] Specifically, based on the first sorting result and the second sorting result, the candidate API set corresponding to the atomic operation entity can be obtained by fusing the first sorting result and the second sorting result corresponding to the augmented atomic operation entity to obtain the fusion sorting result of the augmented atomic operation entity. The fusion sorting result includes a plurality of APIs sorted in order of relevance to the augmented atomic operation. The candidate API set corresponding to the atomic operation entity is determined based on the fusion sorting result.

[0053] Fusing the first sorting result and the second sorting result can be using a comprehensive sorting method in related technologies, such as a hybrid search reverse ranking fusion method: the results of keyword search and vector search are ranked in reverse order respectively, and a reverse ranking fusion strategy is adopted to comprehensively sort according to the reverse ranking position of each API in each group of sorting. The calculation formula of reverse ranking fusion is: ; Wherein, set A represents the API set to be sorted, set R is the sorting result of two different sorting methods, r(a) represents the reverse ranking of API a in the case of sorting method r, k is a hyperparameter, and is set to 60, is the comprehensive sorting score of API a, and the fusion sorting result is obtained by sorting according to the comprehensive sorting score from large to small.

[0054] Further, in a possible implementation, a confidence threshold and a quantity threshold can also be set. After obtaining the fusion ranking result according to the comprehensive ranking scores from large to small, only the API with a score greater than the confidence threshold is retained, and if the number of retained APIs is less than the quantity threshold, in order to avoid that a feasible API arrangement scheme is missed, the user is provided with more comprehensive API arrangement schemes for selection, the atomic operation entity with a number of retained APIs less than the quantity threshold is returned to the user interaction module, the atomic operation entity is used to ask follow-up questions, a more clear API requirement description is obtained, that is, a new requirement text is obtained, and the previous steps are re-executed until the number of APIs with scores greater than the confidence threshold in the API fusion ranking result obtained by retrieval is greater than the quantity threshold.

[0055] The retained API groups in the fusion ranking result are combined to obtain a candidate API set. In a possible implementation, the APIs in the candidate API set can be further reordered based on domain knowledge. The domain knowledge reflects the historical use of the API in the application domain, for example, the use frequency, stability, security, and the like of the API.

[0056] There is a certain dependency relationship between the APIs, for example, a certain API needs to depend on another API to run. In the method provided in the application, after obtaining the candidate API set, at least one API calling chain is constructed based on the dependency relationship between the APIs in the candidate API set, the API calling chain includes API information of a plurality of APIs and calling order constraints between the APIs, and specifically includes: Based on the dependency relationship between the APIs in the candidate API set, the pre-API of each API in the candidate API set is recursively queried to obtain at least one initial calling chain. When a first API depends on a second API to run, the second API is the pre-API of the first API. The APIs in the initial calling chain are subjected to parameter matching checking to obtain an API calling chain including a plurality of parameter-matched APIs.

[0057] After obtaining the candidate API set, reachability analysis is performed on each API in the candidate API set to obtain an initial calling chain satisfying the calling order constraint. Specifically, when constructing the initial calling chain, for each API in the candidate API set, the pre-API thereof is searched in each candidate API set. If the pre-API is found, the API and the pre-API are added to the calling chain until an API without a pre-condition is reached. In this way, an initial calling chain satisfying the dependency relationship is formed.

[0058] The reachability analysis can be achieved by constructing a graph. Specifically, first, a dependency graph is constructed based on each API in the API set, where the nodes represent the APIs and the edges represent the dependency relationships between the APIs. If API A needs the result of API B to execute, there is a directed edge from B to A. Second, the pre-requisite APIs are checked. For each retrieved API, it is confirmed whether it has pre-requisite APIs (i.e., the case where it depends on other APIs to execute correctly). If the necessary pre-requisite APIs are not found, it is necessary to backtrack to the API retrieval stage to find the missing dependencies. Third, recursive verification is performed on each API and its pre-requisite APIs until an API without pre-requisites is reached. Fourth, loop detection is performed to check whether there are loops in the dependency graph to avoid infinite loop calls. If a loop occurs, the selection or order of the APIs needs to be adjusted. Finally, the initial call chain set that ensures reachability is obtained.

[0059] If the API in the candidate API set does not find the necessary pre-requisite API in each candidate API set, in one possible implementation, the API can be discarded directly, and in another possible implementation, a backtracking operation is performed, i.e., more APIs are retrieved. Specifically, when the API in the candidate API set does not have a pre-requisite API in each candidate API set, the step of retrieving a new API based on the atomic operation entity in the API information knowledge base is re-executed. Through the backtracking retrieval method, feasible API arrangement schemes can be avoided from being missed, and more comprehensive API arrangement schemes can be provided for the user to select.

[0060] After obtaining the initial call chain, it is necessary to check whether the parameters of the APIs in each initial call chain match, including but not limited to: parameter type compatibility: ensuring that the types of all parameters passed to the API meet the requirements of the API. Parameter value range: confirming that the parameter value is within the allowed range to avoid invalid or illegal parameter values causing API call failure. Mandatory parameter integrity: confirming that all required parameters have been provided. Parameter consistency: ensuring that the data format and content passed between the APIs of the front and back calls remain consistent. If the parameter check fails, it is necessary to backtrack to the API retrieval stage. That is, when the API parameters in the initial call chain do not match, the step of retrieving a new API based on the atomic operation entity in the API information knowledge base is re-executed.

[0061] When the step of searching in the API information knowledge base based on the atomic operation entity exceeds the threshold in the execution step of searching for a new API, that is, the number of times of backtracking exceeds the threshold, the user is asked, specifically including: generating a question text based on the demand text, obtaining an answer text corresponding to the question text, and updating the demand text based on the answer text.

[0062] When the number of backtracking is too large, it indicates that the current API retrieval information is insufficient, which cannot retrieve enough APIs that meet the reachability and parameter checking, and the user needs to provide more information. Therefore, a question text can be generated based on the demand text. The question text is used to ask the user for more information related to API arrangement requirements. After generating the question text, the question text is displayed to the user through an interactive interface, and the user's answer text is received through the interactive interface. The demand text is updated based on the answer text, and the previous steps are re-executed to construct the API call chain.

[0063] Compared with the prior art using manually preset arrangement rules or call relationship navigation library, the method provided by the present application does not need to re-preset or modify the rules when a new API is added, but automatically expands the knowledge base through retrieval enhancement generation technology, quickly filters out the most suitable combination arrangement scheme from a large number of API resources when the user proposes a demand, and significantly improves the service response speed to achieve real-time and effective arrangement tasks.

[0064] The pseudo code of the process of retrieving the candidate API set and constructing the API call chain based on the candidate API set can be as shown in Table 1.

[0065] Table 1 Based on the API call chain and the demand text, at least one API arrangement result is determined, including: inputting the API call chain and the demand text into a language model to obtain at least one candidate arrangement result output by the language model; constructing an API topology graph corresponding to each candidate arrangement result; checking the connection rules of the API topology graph; when the API topology graph meets the preset rules, the candidate arrangement result corresponding to the API topology graph is taken as the API arrangement result; when the API topology graph does not meet the preset rules, the API topology graph is completed based on API arrangement atomic operations to obtain a completed API topology graph that meets the preset rules, and the arrangement result corresponding to the completed API topology graph is taken as the API arrangement result.

[0066] As can be seen from the foregoing description, the API calling sequence constraint is included in the API calling chain, and the information of the API is also included. Therefore, based on the requirement text and the API information, the APIs in the candidate API set can be combined to obtain the API orchestration result under the condition of meeting the calling sequence constraint.

[0067] Compared with the prior art in which the user needs to find the required atomic API from the API library and conceive the orchestration logic by himself / herself, or the operation and maintenance personnel manually understand and convert the user orchestration request, the method provided in the present application automatically completes the entire process from requirement analysis to API service orchestration scheme generation, can process ambiguous, complex or uncertain requirement descriptions, and adjusts the orchestration scheme in real time to adapt to dynamically changing requirements, avoids human operation errors, reduces user operation burden and cognitive burden, and improves overall service quality and reliability.

[0068] In order to improve the API orchestration efficiency of the method provided in the present application and reduce the user operation burden, in the method provided in the present application, the API calling chain and the requirement text are input into the large language model by using the semantic understanding capability of the large language model, and at least one candidate orchestration result output by the large language model is obtained. Specifically, for the API calling chain combined with the requirement text, the functions, parameters and calling sequence relationships between the APIs in the API calling chain set are understood by the large language model, and the large language model is required to output an initial orchestration scheme that meets the calling sequence constraint in the calling chain set and the requirements of the requirement text. The orchestration scheme not only includes the calling sequence relationships between the APIs, but also includes the input parameters and output parameters of the APIs required to achieve the user requirements corresponding to the requirement text.

[0069] According to the candidate orchestration structure, a corresponding API topology graph is constructed, which is a directed acyclic graph, as shown in Figure 3 The API topology graph includes the basic connection relationships between the APIs and their parameters. The definitions of the elements in the API topology graph are as follows. The node types include five types: 1, input parameter node, input parameters of all APIs; 2, output parameter node, output parameters of all APIs; 3, API node, each API itself as a node; 4, input node, input parameters of the head node API in each API calling chain; and 5, output node, output parameters of the tail node API in each API calling chain.

[0070] For the constructed API topology graph, in order to ensure its usability, a connection rule is defined, and the API topology graph is checked according to the connection rule. The connection rule is a rule for ensuring that the API orchestration scheme corresponding to the API topology graph can run. The connection rule can be defined as follows. 1, the in-parameter node points to the API node; 2, the API node points to the out-parameter node; 3, the out-parameter node points to the in-parameter node; 4, the in-degree of the input node is 0, and the out-degree is greater than 0; 5, the in-degree of the output node is greater than 0, and the out-degree is 0; 6, the in-degree and the out-degree of the in-parameter and the out-parameter node are both greater than 0.

[0071] When the API topology graph meets the preset rule, the candidate arrangement result corresponding to the API topology graph can be taken as the API arrangement result and added to the API arrangement output data. When the API topology graph does not meet the preset rule, in one possible implementation manner, it can be discarded. In order to obtain more comprehensive feasible API arrangement results and provide more choices for the user, in another possible implementation manner, when the API topology graph does not meet the preset rule, the API topology graph is completed based on the API arrangement atomic operation, a completed API topology graph meeting the preset rule is obtained, and the arrangement result corresponding to the completed API topology graph is taken as the API arrangement result.

[0072] The API arrangement atomic operation is a pre-defined basic API arrangement operation that can be executed. For example, the API arrangement atomic operation can include the following operation types: 1, a change order operation, that is, changing the calling order of APIs; 2, a merging operation, that is, taking the out-parameters of multiple APIs as the in-parameters of an API; 3, a branching operation, that is, taking the out-parameters of an API as the in-parameters of multiple APIs; 4, a conditional selection operation, that is, selecting different API paths according to a condition result. When the API topology graph is completed based on the API arrangement atomic operation, the ability of the large model can be used to automatically identify and execute simple calculations on the in-parameters or the out-parameters.

[0073] Based on the above API arrangement atomic operation, the API topology graph can be completed. The completion can be performed in a traversal manner, that is, each API arrangement atomic operation is tried one by one. This manner can cause relatively large time consumption. In another possible implementation manner, the API topology graph can be completed by using a graph attention network. The API topology graph and the API arrangement atomic operation are taken as network inputs, and a completed API topology graph is obtained as network output.

[0074] After obtaining the completed API topology graph, the preset rule is called again for checking, to ensure that the completed API topology graph meets the preset rule. If the completed topology graph still cannot meet the preset rule, a follow-up question text can be generated and fed back to the user through an interactive interface, to realize the follow-up question to the user, obtain more API service arrangement requirement information, update the requirement text based on the answer text of the user, and re-execute the step of inputting the requirement text into the intent recognition model, to obtain more APIs.

[0075] After obtaining the API arrangement result, the API arrangement result is fed back to the user through the interactive interface. In a possible implementation, while feeding back the API arrangement result to the user through the interactive interface, API calling details and instructions corresponding to the API arrangement result can also be generated, and a topology graph, API calling details and related instructions corresponding to the API arrangement result are also fed back to the user through the interactive interface.

[0076] The above embodiments of the method provided in the application define API topology graph rules and API arrangement operations by combining a large language model with API arrangement field knowledge, graph theory field knowledge and a graph neural network model, and combine the large model and the graph neural network model to quickly complete the API topology graph, output the API arrangement scheme, and quickly and efficiently complete the API automatic arrangement task, thereby forming the core competitiveness of API intelligent arrangement.

[0077] The API service arrangement device provided in the application is described below, and the API service arrangement device described below can be referred to in correspondence with the API service arrangement method described above. As shown in Figure 4 The API service arrangement device provided in the application includes: The user interaction module 410 is configured to obtain a demand text, and the demand text reflects the API service arrangement demand of the user. The intent recognition module 420 is configured to input the demand text into an intent recognition model, and obtain an atomic operation entity recognition result output by the intent recognition model, the atomic operation entity recognition result including at least one atomic operation entity, and the atomic operation entity including an operation intent and an operation parameter. The API retrieval module 430 is configured to retrieve in an API information knowledge base based on the atomic operation entity, and obtain at least one candidate API set, each candidate API set corresponding to one atomic operation entity. The calling chain construction module 440 is configured to construct at least one API calling chain based on the dependency relationship between the APIs in the candidate API set, and the API calling chain including API information of a plurality of APIs and calling sequence constraints between the APIs. The API arrangement module 450 is configured to determine at least one API arrangement result based on the API calling chain and the demand text.

[0078] Figure 5 An example of an entity structure schematic diagram of an electronic device is shown in Figure 5As shown, the electronic device can include a processor 510, a communications interface 520, a memory 530, and a communications bus 540, wherein the processor 510, the communications interface 520, and the memory 530 complete mutual communication through the communications bus 540. The processor 510 can invoke a logical instruction in the memory 530 to execute an API service orchestration method, which includes: obtaining a demand text, the demand text reflecting an API service orchestration demand of a user; inputting the demand text into an intent recognition model to obtain an atomic operation entity recognition result output by the intent recognition model, the atomic operation entity recognition result including at least one atomic operation entity, the atomic operation entity including an operation intent and an operation parameter; based on the atomic operation entity, performing retrieval in an API information knowledge base to obtain at least one candidate API set, each candidate API set corresponding to one atomic operation entity; based on a dependency relationship between APIs in the candidate API set, constructing at least one API calling chain, the API calling chain including API information of multiple APIs and calling sequence constraints between the APIs; based on the API calling chain and the demand text, determining at least one API orchestration result.

[0079] In addition, the logical instructions in the memory 530 described above can be implemented in the form of a software functional unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the method described in various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.

[0080] In another aspect, the present application also provides a computer program product, which comprises a computer program, the computer program being stored in a non-transitory computer-readable storage medium, and the computer program being executable by a processor to enable a computer to perform the API service orchestration method provided by the above method, the method comprising: obtaining a requirement text, the requirement text reflecting an API service orchestration requirement of a user; inputting the requirement text into an intent recognition model to obtain an atomic operation entity recognition result output by the intent recognition model, the atomic operation entity recognition result comprising at least one atomic operation entity, and the atomic operation entity comprising an operation intent and an operation parameter; performing retrieval in an API information knowledge base based on the atomic operation entity to obtain at least one candidate API set, each candidate API set corresponding to one atomic operation entity; constructing at least one API calling chain based on a dependency relationship between APIs in the candidate API set, the API calling chain comprising API information of a plurality of APIs and calling sequence constraints between the APIs; and determining at least one API orchestration result based on the API calling chain and the requirement text.

[0081] In yet another aspect, the present application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the API service orchestration method provided by the above method, the method comprising: obtaining a requirement text, the requirement text reflecting an API service orchestration requirement of a user; inputting the requirement text into an intent recognition model to obtain an atomic operation entity recognition result output by the intent recognition model, the atomic operation entity recognition result comprising at least one atomic operation entity, and the atomic operation entity comprising an operation intent and an operation parameter; performing retrieval in an API information knowledge base based on the atomic operation entity to obtain at least one candidate API set, each candidate API set corresponding to one atomic operation entity; constructing at least one API calling chain based on a dependency relationship between APIs in the candidate API set, the API calling chain comprising API information of a plurality of APIs and calling sequence constraints between the APIs; and determining at least one API orchestration result based on the API calling chain and the requirement text.

[0082] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on multiple network units. Part or all of the modules can be selected to achieve the purpose of the present embodiment scheme according to actual needs. Those skilled in the art can understand and implement it without creative labor.

[0083] Those skilled in the art can clearly understand the implementation of the various embodiments by means of software and the necessary general hardware platform from the above description of the embodiments, and of course, the embodiments can also be implemented by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part of the prior art that contributes to the technical solutions can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, and the like, and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0084] Finally, it should be noted that: the above examples are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing examples, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing examples, or make equivalent replacement for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for orchestrating application programming interface (API) services, characterized in that, include: Obtain the requirement text, which reflects the user's API service orchestration requirements; The requirement text is input into the intent recognition model, and the atomic operation entity recognition result output by the intent recognition model is obtained. The atomic operation entity recognition result includes at least one atomic operation entity, and the atomic operation entity includes operation intent and operation parameters. Based on the atomic operation entity, a search is performed in the API information knowledge base to obtain at least one candidate API set, and each candidate API set corresponds to one atomic operation entity; Based on the dependencies between APIs in the candidate API set, at least one API call chain is constructed, which includes API information of multiple APIs and call order constraints between APIs; Based on the API call chain and the requirement text, at least one API orchestration result is determined.

2. The API service orchestration method according to claim 1, characterized in that, The step of constructing at least one API call chain based on the dependencies between APIs in the candidate API set includes: Based on the dependencies between APIs in the candidate API set, a recursive query is performed on the preceding APIs of each API in the candidate API set to obtain at least one initial call chain. Wherein, when the first API depends on the second API to run, the second API is the preceding API of the first API. Perform parameter matching checks on the APIs in the initial call chain to obtain the API call chain that includes multiple APIs with matching parameters.

3. The API service orchestration method according to claim 2, characterized in that, The recursive query of the preceding APIs for each API in the candidate API set to obtain at least one initial call chain includes: When no API in any of the candidate API sets has a preceding API, the step of searching the API information knowledge base based on the atomic operation entity is re-executed to retrieve a new API. The step of performing parameter matching checks on the APIs in the initial call chain to obtain the API call chain including multiple APIs with matching parameters includes: When the API parameters in the initial call chain do not match, the step of retrieving the API information knowledge base based on the atomic operation entity is re-executed to retrieve the new API. When the step of retrieving new API execution steps based on the atomic operation entity in the API information knowledge base exceeds the threshold, follow-up question text is generated based on the requirement text. Obtain the answer text corresponding to the follow-up question text, and update the requirement text based on the answer text.

4. The API service orchestration method according to claim 1, characterized in that, The determination of at least one API orchestration result based on the API call chain and the requirement text includes: Input the API call chain and the requirement text into the language model, and obtain at least one candidate arrangement result output by the language model; Construct the API topology diagram corresponding to each of the candidate orchestration results; Perform connection rule checks on the API topology graph; When the API topology graph meets the preset rules, the candidate orchestration result corresponding to the API topology graph is taken as the API orchestration result; When the API topology graph does not meet the preset rules, the API topology graph is completed based on API orchestration atomic operations to obtain a completed API topology graph that meets the preset rules, and the orchestration result corresponding to the completed API topology graph is used as the API orchestration result.

5. The API service orchestration method according to claim 1, characterized in that, Based on the atomic operation entity, a search is performed in the API information knowledge base to obtain at least one set of candidate APIs, including: Based on the semantics of the words included in the atomic operation entity, the words in the atomic operation entity are expanded to obtain an expanded atomic operation entity; The words in the expanded atomic operation entity are matched with the API information in the API information knowledge base. A first ranking result is obtained based on the degree of matching. The first ranking result includes multiple APIs. Based on the semantic vector of the extended atomic operation entity and the semantic vector of the API information in the API information knowledge base, a second ranking result is obtained based on the similarity of the semantic vectors. The second ranking result includes multiple APIs. Based on the first sorting result and the second sorting result, the candidate API set corresponding to the atomic operation entity is determined.

6. The API service orchestration method according to claim 1, characterized in that, The intent recognition model includes a prediction module, a graph interaction module, and a decoding module; the step of inputting the request text into the intent recognition model and obtaining the atomic operation entity recognition result output by the intent recognition model includes: The requirement text is input into the prediction module, and the prediction results output by the prediction module are obtained. The prediction results include the operation intention prediction results and operation parameter prediction results corresponding to multiple words in the requirement text. The operation intention prediction results reflect the probability that a word corresponds to each operation intention, and the operation parameter prediction results reflect the probability that a word is an operation parameter of each operation intention. An interaction graph is constructed based on the prediction results. The interaction graph includes a first vertex, a second vertex, and a third vertex. The first vertex corresponds to a word in the requirement text, the second vertex corresponds to an operation intention, and the third vertex corresponds to an operation parameter. The edge between the first vertex and the second vertex reflects the probability that the word of the first vertex corresponds to the operation intention of the second vertex. The edge between the first vertex and the third vertex reflects the probability that the word of the first vertex corresponds to the operation parameter of the third vertex. The edge between the second vertex and the third vertex reflects the probability that the operation parameter of the third vertex is the operation parameter of the operation intention of the second vertex. The interaction graph is input into the graph interaction module, and through the graph interaction module, a graph attention network is used to obtain the feature representation of the vertices in the interaction graph; The feature representations of the vertices in the interaction graph are input into the decoding module to obtain the atomic operation entity recognition result output by the decoding module.

7. An API service orchestration apparatus, characterized in that, include: The user interaction module is used to obtain the request text, which reflects the user's API service orchestration requirements. The intent recognition module is used to input the request text into the intent recognition model and obtain the atomic operation entity recognition result output by the intent recognition model. The atomic operation entity recognition result includes at least one atomic operation entity, and the atomic operation entity includes operation intent and operation parameters. The API retrieval module is used to perform a retrieval in the API information knowledge base based on the atomic operation entity to obtain at least one candidate API set, and each candidate API set corresponds to one atomic operation entity; The call chain construction module is used to construct at least one API call chain based on the dependency relationships between APIs in the candidate API set. The API call chain includes API information of multiple APIs and call order constraints between APIs. The API orchestration module is used to determine at least one API orchestration result based on the API call chain and the requirement text.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the API service orchestration method as described in any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the API service orchestration method as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the API service orchestration method as described in any one of claims 1 to 6.