CN116991520A - Application program interface calling method, device, equipment and storage medium - Google Patents

Application program interface calling method, device, equipment and storage medium Download PDF

Info

Publication number
CN116991520A
CN116991520A CN202310861872.6A CN202310861872A CN116991520A CN 116991520 A CN116991520 A CN 116991520A CN 202310861872 A CN202310861872 A CN 202310861872A CN 116991520 A CN116991520 A CN 116991520A
Authority
CN
China
Prior art keywords
application program
local
program interfaces
target
targets
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310861872.6A
Other languages
Chinese (zh)
Inventor
李�浩
黄宇辉
王海威
王保卫
邹宗尧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu China Co Ltd
Original Assignee
Baidu China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Baidu China Co Ltd filed Critical Baidu China Co Ltd
Priority to CN202310861872.6A priority Critical patent/CN116991520A/en
Publication of CN116991520A publication Critical patent/CN116991520A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/36Software reuse
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0455Auto-encoder networks; Encoder-decoder networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure provides an application program interface calling method, an application program interface calling device, application program interface calling equipment and a storage medium, relates to the field of artificial intelligence, in particular to the technical fields of large-model data processing, an artificial intelligent system and the like, and can be applied to scenes such as personal intelligent assistants, automatic driving and the like. The specific scheme comprises the following steps: dividing a first global target into at least two first local targets; determining application program interfaces corresponding to all first local targets from available application program interfaces; dividing the second global target into at least two second local targets when the first global target is changed into the second global target, wherein the second local targets comprise a third local target and a fourth local target; and determining the application program interfaces corresponding to the third local targets according to the application program interfaces corresponding to the first local targets, and determining the application program interfaces corresponding to the fourth local targets from the available application program interfaces. The method and the device can improve the processing efficiency of the large model and reduce the waste of computing resources and time.

Description

Application program interface calling method, device, equipment and storage medium
Technical Field
The disclosure relates to the field of artificial intelligence, in particular to the technical fields of large model data processing, artificial intelligence systems and the like, and can be applied to personal intelligent assistants, automatic driving and other scenes, in particular to an application program interface calling method, an application program interface calling device, application program interface calling equipment and a storage medium.
Background
Large language models (large language model, LLM) capable of generating human-like fluent responses for many downstream tasks (e.g., task-oriented conversations and problem solutions) may be integrated into artificial intelligence systems to achieve user goals.
At present, after receiving a target input by a user, an artificial intelligence system based on a large model (i.e. a large language model) sends the user target to the large model, the large model selects one or more APIs from all available APIs according to descriptions of all available application program interfaces (application programming interface, APIs) and the user target, and the artificial intelligence system calls the APIs selected by the large model according to preset rules, thereby realizing the user target.
However, in the current mode, the large model is integrated with the processing of the user target every time, once the user target is changed, the large model discards the processing user target and the processing process, and directly resumes processing the changed user target, thereby wasting computing resources and time.
Disclosure of Invention
The present disclosure provides a method, an apparatus, a device, and a storage medium for calling an application program interface, which can improve the processing efficiency of a large model and reduce the waste of computing resources and time.
According to a first aspect of the present disclosure, there is provided an application program interface calling method, including:
the large model divides a first global target from the artificial intelligent system into at least two first local targets according to the description information of the available application program interfaces; the large model determines application program interfaces corresponding to all first local targets from available application program interfaces, and sends identification information of the application program interfaces corresponding to all first local targets to the artificial intelligent system, wherein the identification information of the application program interfaces corresponding to all first local targets is used for indicating the application program interfaces required to be called for realizing the first global targets to the artificial intelligent system; in response to detecting that a first global target from the artificial intelligence system is changed to a second global target, the large model divides the second global target into at least two second local targets according to the description information of the available application program interfaces, the second local targets comprise a third local target and a fourth local target, the third local target is identical to at least one first local target, and the fourth local target is different from any one first local target; the large model determines application program interfaces corresponding to the third local targets according to the application program interfaces corresponding to the first local targets, determines the application program interfaces corresponding to the fourth local targets from the available application program interfaces, and sends identification information of the third local targets and the application program interfaces corresponding to the fourth local targets to the artificial intelligent system, wherein the identification information of the application program interfaces corresponding to the third local targets and the fourth local targets is used for indicating the application program interfaces required to be called for realizing the second global targets to the artificial intelligent system.
According to a second aspect of the present disclosure, there is provided an application program interface calling method, including:
the artificial intelligence system sends a first global target input by a user to the large model; the artificial intelligent system receives identification information of an application program interface corresponding to a first local target, wherein the first local target is obtained by dividing a first global target by a large model according to description information of the available application program interfaces, and the first local target comprises at least two; the artificial intelligent system calls the application program interfaces corresponding to the first local targets according to the identification information of the application program interfaces corresponding to the first local targets to realize the first global targets; in response to detecting that the first global target is changed to a second global target, the artificial intelligence system sends the second global target to the large model; the artificial intelligent system receives identification information of application program interfaces corresponding to a third local target and a fourth local target, the third local target is identical to at least one first local target, the fourth local target is different from any one first local target, the third local target and the fourth local target are second local targets obtained by dividing a second global target according to description information of the available application program interfaces by a large model, and the second local targets comprise at least two; and the artificial intelligent system calls the application program interfaces corresponding to the third local targets and the fourth local targets according to the identification information of the application program interfaces corresponding to the third local targets and the fourth local targets, so as to realize the second global target.
According to a third aspect of the present disclosure, there is provided an application program interface calling apparatus, the apparatus comprising:
and the dividing module is used for dividing the first global target from the artificial intelligent system into at least two first local targets according to the description information of the available application program interfaces.
The processing module is used for determining application program interfaces corresponding to the first local targets from available application program interfaces, sending identification information of the application program interfaces corresponding to the first local targets to the artificial intelligent system, and indicating the application program interfaces required to be called for realizing the first global targets to the artificial intelligent system.
The processing module is further used for responding to detection that a first global target from the artificial intelligent system is changed into a second global target, dividing the second global target into at least two second local targets according to the description information of the available application program interfaces, wherein the second local targets comprise a third local target and a fourth local target, the third local target is identical to at least one first local target, and the fourth local target is different from any one first local target; determining application program interfaces corresponding to the third local targets according to the application program interfaces corresponding to the first local targets, determining the application program interfaces corresponding to the fourth local targets from the available application program interfaces, and sending identification information of the third local targets and the application program interfaces corresponding to the fourth local targets to the artificial intelligent system, wherein the identification information of the application program interfaces corresponding to the third local targets and the fourth local targets is used for indicating the application program interfaces required to be called for realizing the second global targets to the artificial intelligent system.
According to a fourth aspect of the present disclosure, there is provided an application program interface calling apparatus, the apparatus comprising:
and the sending module is used for sending the first global target input by the user to the large model.
The receiving module is used for receiving the identification information of the application program interface corresponding to the first local target, the first local target is obtained by dividing the first global target by the large model according to the description information of the available application program interfaces, and the first local target comprises at least two.
And the processing module is used for calling the application program interfaces corresponding to the first local targets according to the identification information of the application program interfaces corresponding to the first local targets so as to realize the first global targets.
And the sending module is also used for sending the second global target to the large model in response to detecting that the first global target is changed into the second global target.
The receiving module is further configured to receive identification information of application program interfaces corresponding to a third local target and a fourth local target, where the third local target is the same as at least one first local target, the fourth local target is different from any one first local target, the third local target and the fourth local target are second local targets obtained by dividing a second global target by a large model according to description information of the available application program interfaces, and the second local targets include at least two second local targets.
The processing module is further used for calling the application program interfaces corresponding to the third local targets and the fourth local targets according to the identification information of the application program interfaces corresponding to the third local targets and the fourth local targets, so as to realize the second global target.
According to a fifth aspect of the present disclosure, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method as in the first aspect or a method as in the second aspect.
According to a sixth aspect of the present disclosure there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method according to the first aspect or the method according to the second aspect.
According to a seventh aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method according to the first aspect or the method of the second aspect.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a flowchart of an application program interface calling method according to an embodiment of the disclosure;
FIG. 2 is a flowchart illustrating another method for invoking an application program interface according to an embodiment of the present disclosure;
FIG. 3 is a flowchart illustrating an application program interface calling method according to an embodiment of the present disclosure;
FIG. 4 is a flowchart illustrating an application program interface calling method according to an embodiment of the present disclosure;
FIG. 5 is a flowchart illustrating an application program interface calling method according to an embodiment of the present disclosure;
FIG. 6 is a flowchart illustrating an application program interface calling method according to an embodiment of the present disclosure;
fig. 7 is a schematic diagram of the composition of an application program interface calling device according to an embodiment of the present disclosure;
FIG. 8 is a schematic diagram of another configuration of an application program interface calling device according to an embodiment of the disclosure;
fig. 9 is a schematic diagram of the composition of an electronic device according to an embodiment of the disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be appreciated that in embodiments of the present disclosure, the character "/" generally indicates that the context associated object is an "or" relationship. The terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
Large language models (large language model, LLM) capable of generating human-like fluent responses for many downstream tasks (e.g., task-oriented conversations and problem solutions) may be integrated into artificial intelligence systems to achieve user goals.
At present, after receiving a target input by a user, an artificial intelligence system based on a large model (i.e. a large language model) sends the user target to the large model, the large model selects one or more APIs from all available APIs according to descriptions of all available application programming interfaces (application programming interface, APIs) and the user target, and the artificial intelligence system calls the APIs selected by the large model according to preset rules, thereby realizing the user target.
However, in the current mode, the large model is integrated with the processing of the user target every time, once the user target is changed, the large model discards the processing user target and the processing process, and directly resumes processing the changed user target, thereby wasting computing resources and time.
For example, in the process of selecting an application program interface for a user object "open an application a and an application B" by the large model, another user object "open an application a and an application C" is obtained, the large model also gives up processing for the user object "open an application a and an application B", starts processing for the other user object "open an application a and an application C", so that the processing before the large model has no meaning, and because the two user objects have the same part, the large model is in fact meaningful for processing of the previous user object, thereby wasting computing resources and time.
Under the background technology, the application program interface calling method can improve the processing efficiency of a large model and reduce the waste of computing resources and time.
The execution main body of the application program interface calling method provided by the embodiment of the disclosure may be a computer or a server, or may also be other electronic devices with data processing capability; alternatively, the execution subject of the method may be a processor (e.g., a central processing unit (central processing unit, CPU)) in the above-described electronic device; still alternatively, the execution subject of the method may be an Application (APP) installed in the electronic device and capable of implementing the function of the method; alternatively, the execution subject of the method may be a functional module, a unit, or the like having the function of the method in the electronic device. The subject of execution of the method is not limited herein.
The application program interface calling method is exemplarily described below with reference to the accompanying drawings.
Fig. 1 is a flowchart of an application program interface calling method according to an embodiment of the disclosure. As shown in fig. 1, the method may include:
s101, dividing a first global target from an artificial intelligent system into at least two first local targets by the large model according to the description information of the available application program interfaces.
By way of example, the available application program interfaces may be application program interfaces that were previously specified for the large model.
For example, the description information of the application program interface may be a description of functions that can be implemented by the application program interface. For example, the description information of an application program interface implementing the hotel reservation function may be "for reservation of hotel and hotel room type".
Illustratively, the first global goal may be a task that the user expects to complete or information the user wants to know. For example, the first global goal may be "help me reserve standard rooms and lunch of tomorrow and clouds hotels," may be "what is the tomorrow's daily atmosphere.
Illustratively, the user may input the first global target to the artificial intelligence system via an input device (e.g., keyboard, touch screen, microphone, etc.), and the artificial intelligence system may send the first global target to the large model after receiving the first global target input by the user.
Illustratively, the large model may perform semantic understanding on the description information of the available application program interfaces to obtain functions that can be implemented by each available application program interface, and divide the first global target into at least two first local targets in combination with the semantic understanding of the first global target.
By way of example, taking the first global goal as "help me reserve standard room and lunch of tomorrow and cloud hotels" as an example, the first global goal may be divided into the first local goals of "reserve standard room of tomorrow and cloud hotels" and "reserve lunch of tomorrow and cloud hotels".
S102, the large model determines application program interfaces corresponding to the first local targets from available application program interfaces, and sends identification information of the application program interfaces corresponding to the first local targets to the artificial intelligent system.
The identification information of the application program interfaces corresponding to the first local targets is used for indicating the application program interfaces required to be called for realizing the first global targets to the artificial intelligent system.
The large model may semantically understand description information of the available application program interfaces to obtain functions that can be achieved by the available application program interfaces, and determine, from the available application program interfaces, the application program interfaces that can achieve the first local target as application program interfaces corresponding to the first local target in combination with content of the first local target.
The identification information may be, for example, a name, a code or a number of the application program interface, and the form of the identification information is not limited.
Illustratively, when the large model sends the identification information of the application program interface corresponding to the first local target to the artificial intelligence system, the large model may also send the input parameters of the application program interface corresponding to the first local target, so that the artificial intelligence system calls the application program interface corresponding to the first local target.
The artificial intelligence system may call the application program interface indicated by the identification information according to the identification information of the application program interface corresponding to each first local target, so as to realize each first local target.
S103, in response to detecting that the first global target from the artificial intelligent system is changed into a second global target, the large model divides the second global target into at least two second local targets according to the description information of the available application program interfaces, wherein the second local targets comprise a third local target and a fourth local target.
The third local target is the same as at least one first local target, and the fourth local target is different from any one of the first local targets.
The detection of the change from the first global target to the second global target in the artificial intelligence system may be, but not limited to, in a process that the large model determines the application program interface corresponding to each first local target from the available application program interfaces, or after the large model determines the application program interface corresponding to each first local target from the available application program interfaces.
Illustratively, the large model may perform semantic understanding on the description information of the available application program interfaces to obtain functions that can be implemented by each available application program interface, and then combine the second global targets to divide the second global targets into at least two second local targets.
Illustratively, the large model may determine the third local target and the fourth local target by semantically understanding, comparing the first local target with the second local target.
By way of example, taking the first global goal of "help me reserve the standard room of the tomorrow and the lunch" and the divided first local goals of "reserve the standard room of the tomorrow and the lunch of the tomorrow and the tomorrow hotel" and the second global goal of "help me reserve the standard room of the tomorrow and the lunch of the blue sky restaurant" and the divided second local goals of "reserve the standard room of the tomorrow and the lunch of the blue sky restaurant" as examples, the third local goal of "reserve the standard room of the tomorrow and the fourth local goal of" reserve the lunch of the blue sky restaurant ".
S104, the large model determines the application program interfaces corresponding to the third local targets according to the application program interfaces corresponding to the first local targets, determines the application program interfaces corresponding to the fourth local targets from the available application program interfaces, and sends identification information of the third local targets and the application program interfaces corresponding to the fourth local targets to the artificial intelligent system.
The identification information of the application program interfaces corresponding to the third local targets and the fourth local targets is used for indicating the application program interfaces required to be called for realizing the second global targets to the artificial intelligent system.
The large model may use the application program interface corresponding to the first local target, which is the same as the third target interface, as the application program interface corresponding to the third local target, so that the application program interface corresponding to the third local target does not need to be determined again, the processing efficiency of the large model is improved, and the waste of computing resources and time is reduced.
For example, continuing taking the first global target as "help me reservation of standard room and lunch of tomorrow and white cloud hotel", the divided first local targets as "reservation of standard room of tomorrow and white cloud hotel" and "reservation of lunch of tomorrow and white cloud hotel", the second global target as "help me reservation of standard room of tomorrow and white cloud hotel" and "reservation of lunch of tomorrow and white cloud hotel" as examples, the determined third local target as "reservation of standard room of tomorrow and white cloud hotel", the fourth local target as "reservation of lunch of tomorrow and the first local target as the application program interface corresponding to" reservation of standard room of tomorrow and white cloud hotel ".
The large model may semantically understand description information of the available application program interfaces to obtain functions that can be achieved by the available application program interfaces, and determine the application program interfaces that can achieve the fourth local target from the available application program interfaces in combination with contents of the fourth local target.
The identification information may be, for example, a name, a code or a number of the application program interface, and the form of the identification information is not limited.
The artificial intelligence system may call the application program interface indicated by the identification information according to the identification information of the application program interface corresponding to each third local target and the identification information of the application program interface corresponding to each fourth local target, so as to implement each first local target.
According to the embodiment of the disclosure, a first global target is divided into at least two first local targets according to description information of available application program interfaces for a large model, the application program interfaces corresponding to the first local targets are determined from the available application program interfaces, identification information of the application program interfaces corresponding to the first local targets is sent to an artificial intelligent system, and the artificial intelligent system is instructed to call the application program interfaces corresponding to the first local targets; when the first global target from the artificial intelligent system is detected to be changed into a second global target, the large model divides the second global target into at least two second local targets according to the description information of the available application program interfaces, and determines a third local target and a fourth local target from the second local targets; the large model determines the application program interfaces corresponding to the third local targets according to the application program interfaces corresponding to the first local targets, determines the application program interfaces corresponding to the fourth local targets from the available application program interfaces, sends identification information of the third local targets and the application program interfaces corresponding to the fourth local targets to the artificial intelligent system, and instructs the artificial intelligent system to call the application program interfaces corresponding to the third local targets and the application program interfaces corresponding to the fourth local targets, so that the application program interfaces corresponding to the third local targets do not need to be determined from the available application program interfaces, the application program interfaces corresponding to the first local targets identical to the third local targets can be directly used as the application program interfaces corresponding to the third local targets, the processing efficiency of the large model is improved, and the waste of calculation resources and time is reduced.
In a possible embodiment, after the large model divides the first global object from the artificial intelligence system into at least two first local objects according to the description information of the available application program interfaces, the method may further include:
the large model determines a subset of application program interfaces from among the available application program interfaces that are associated with each of the first local objects, the subset of application program interfaces including one or more application program interfaces.
The large model may perform semantic understanding on description information of the available application program interfaces to obtain functions that can be achieved by each available application program interface, divide the first global target into at least two first local targets in combination with semantic understanding of the first global target, and then use the application program interfaces that are related to the first local targets and that are of the types of the functions that can be achieved in each available application program interface as application program interfaces in the subset of application program interfaces related to the first local targets.
For example, taking the first global goal as an example of "help me booking a standard room and lunch of a tomorrow and white cloud hotel", the first global goal may be divided into a first local goal of "booking a standard room of a tomorrow and white cloud hotel" and "booking lunch of a tomorrow and white cloud hotel", and an application program interface (for example, booking a hotel, querying a reserved hotel, canceling a reserved hotel, etc.) with a function of a hotel may be used as an application program interface in a subset of application program interfaces related to a local goal of "booking a standard room of a tomorrow and white cloud hotel", and an application program interface (for example, booking a meal, querying a reserved meal, canceling a reserved meal, etc.) with a function of a restaurant may be used as an application program interface in a subset of application program interfaces related to a local goal of "booking lunch of a tomorrow and white cloud hotel".
The large model determines the application program interfaces corresponding to the first local targets from the available application program interfaces, and the large model may include:
the large model determines the application program interfaces corresponding to the first local targets from the application program interface subset related to the first local targets.
According to the embodiment, the application program interfaces corresponding to the first local targets are determined from the application program interfaces which are available, so that the large model can determine the application program interfaces corresponding to the first local targets from the application program interface subsets which are related to the first local targets, the application program interfaces corresponding to the first local targets do not need to be determined directly from all the available application program interfaces, the requirement on the performance of the large model is reduced, and the efficiency of determining the application program interfaces corresponding to the first local targets is improved.
Fig. 2 is another flow chart of an application program interface calling method according to an embodiment of the disclosure. As shown in fig. 2, after sending the identification information of the application program interface corresponding to each first local target to the artificial intelligence system, the method may further include:
s201, the large model receives a calling result of an application program interface corresponding to a first local target from the artificial intelligent system.
The artificial intelligence system receives the identification information of the application program interfaces corresponding to the first local targets, and then calls the application program interfaces indicated by the identification information to obtain a call result of the application program interfaces corresponding to the first local targets and sends the call result to the large model.
S202, the large model collates the calling result and the first local target corresponding to the calling result.
For example, the large model may compare the semantic understanding result of the first local target corresponding to the call result with the call result, and determine whether the semantic understanding result of the first local target is consistent with the call result.
And S203, when the calling result does not meet the first local target corresponding to the calling result, the large model determines the application program interface corresponding to the first local target corresponding to the calling result from the available application program interfaces again according to the calling result, and sends the identification information of the application program interface corresponding to the first local target determined again to the artificial intelligent system.
Illustratively, the large model may determine the application program interface corresponding to the first local target corresponding to the calling result from the available application program interfaces again according to the difference between the calling result and the semantic understanding result of the first local target and the application program interface corresponding to the calling result.
The identification information may be, for example, a name, a code or a number of the application program interface, and the form of the identification information is not limited.
The artificial intelligence system may call the application program interface indicated by the identification information according to the identification information of the application program interface corresponding to each first local target, so as to realize each first local target.
For example, the received second local target, third local target, and the like may also be implemented with reference to this embodiment, which is not described herein.
According to the embodiment, the calling result of the application program interface corresponding to the first local target received from the artificial intelligent system is checked with the first local target corresponding to the calling result through the large model, when the calling result does not meet the first local target corresponding to the calling result, the application program interface corresponding to the first local target corresponding to the calling result is determined again from the available application program interfaces according to the calling result, and the identification information of the application program interface corresponding to the first local target is sent to the artificial intelligent system, so that when the first local target corresponding to the calling result is not met, the application program interface which is more likely to achieve the first local target is determined again as the application program interface corresponding to the first local target, and the application program interface determined by the large model is more accurate.
Fig. 3 is a schematic flowchart of another method for calling an application program interface according to an embodiment of the disclosure. As shown in FIG. 3, before the large model determines the application program interface corresponding to each first local object from the subset of application program interfaces associated with each first local object, the method may further include:
s301, the large model determines supplementary application program interfaces related to all the first local targets from the available application program interfaces according to historical call data of the available application program interfaces and all the first local targets.
For example, the historical call data for the available application program interfaces may include the corresponding local targets of the available application program interfaces when called.
For example, the large model may determine, based on historical call data of available application program interfaces and the first local targets, available application program interfaces called by the same local targets as the first local targets as supplemental application program interfaces related to the first local targets.
S302, the large model updates the subset of the application program interfaces related to the first local targets according to the supplementary application program interfaces related to the first local targets.
According to the method and the device, through the historical call data of the available application program interfaces and the first local targets, the supplementary application program interfaces related to the first local targets are determined from the available application program interfaces, and the subset of the application program interfaces related to the first local targets is updated, so that the application program interfaces which are called according to the historical of the first local targets can be updated to the subset of the application program interfaces related to the first local targets, and the efficiency of determining the application program interfaces corresponding to the first local targets is improved.
Fig. 4 is a schematic flowchart of another method for calling an application program interface according to an embodiment of the disclosure. As shown in FIG. 4, the large model may determine, from among the available application program interfaces, supplemental application program interfaces associated with each first local object based on historical call data for the available application program interfaces and each first local object, and may include:
s401, the large model determines application program interfaces outside the application program interface subset related to each first local target from available application program interfaces.
S402, the large model determines the supplementary application program interfaces related to the first local targets from the application program interfaces outside the application program interface subset related to the first local targets according to the historical call data of the application program interfaces outside the application program interface subset related to the first local targets and the first local targets.
According to the method and the device, the supplementary application program interfaces related to the first local targets can be rapidly determined from the application program interfaces outside the application program interface subset related to the first local targets according to the historical call data of the application program interfaces outside the application program interface subset related to the first local targets and the first local targets, so that the efficiency of determining the application program interfaces corresponding to the first local targets is further improved.
In some possible embodiments, the large model may update other first local targets according to the first local target that has received the call result.
The above embodiments introduce an application program interface calling method from the perspective of a large model. Corresponding to the application program interface calling method provided in the foregoing embodiment, the embodiment of the present disclosure further provides an application program interface calling method, which may be applied to an artificial intelligence system.
For example, fig. 5 is a schematic flow chart of another method for calling an application program interface according to an embodiment of the disclosure. As shown in fig. 5, the application program interface calling method may include:
s501, the artificial intelligence system sends a first global target input by a user to the large model.
S502, the artificial intelligence system receives identification information of an application program interface corresponding to the first local target.
The first local targets are obtained by dividing the large model into first global targets according to the description information of the available application program interfaces, and the first local targets comprise at least two.
S503, the artificial intelligence system calls the application program interfaces corresponding to the first local targets according to the identification information of the application program interfaces corresponding to the first local targets, and the first global targets are achieved.
S504, in response to detecting that the first global target is changed to the second global target, the artificial intelligence system sends the second global target to the large model.
S505, the artificial intelligence system receives the identification information of the application program interfaces corresponding to the third local target and the fourth local target.
The third local target is the same as at least one first local target, the fourth local target is different from any one first local target, the third local target and the fourth local target are second local targets obtained by dividing the second global target by the large model according to the description information of the available application program interfaces, and the second local targets comprise at least two.
S506, the artificial intelligence system calls the application program interfaces corresponding to the third local targets and the fourth local targets according to the identification information of the application program interfaces corresponding to the third local targets and the fourth local targets, and the second global targets are achieved.
Optionally, after determining the subset of application program interfaces related to each first local target from available application program interfaces for the large model, determining the subset of application program interfaces related to each first local target from the subset of application program interfaces related to each first local target, where the subset of application program interfaces includes one or more application program interfaces.
Illustratively, fig. 6 is a schematic flow chart of another method for calling an application program interface according to an embodiment of the disclosure. As shown in fig. 6, the application program interface calling method may further include:
s601, the artificial intelligence system sends a calling result of an application program interface corresponding to a first local target to the large model.
And sending a calling result of the application program interface corresponding to the first local target to the large model, wherein the calling result is used for the large model to calibrate the calling result and the first local target corresponding to the calling result, so that when the calling result does not meet the first local target corresponding to the calling result, identification information of the application program interface corresponding to the first local target which is redetermined according to the calling result is sent to the artificial intelligent system.
S602, when the artificial intelligence system receives the identification information of the application program interface corresponding to the first local target redetermined by the large model, calling the application program interface corresponding to the first local target according to the redetermined identification information of the application program interface corresponding to the first local target, and realizing the first global target.
For example, the artificial intelligence system may not perform the step when the identification information of the application program interface corresponding to the first local object determined by the large model is not received.
Optionally, the subset of application program interfaces related to each first local target is obtained by updating the subset of application program interfaces related to each first local target according to the supplementary application program interfaces related to each first local target after determining the supplementary application program interfaces related to each first local target from the available application program interfaces according to the historical call data of the available application program interfaces and each first local target by using the large model.
Optionally, after determining the application program interfaces outside the application program interface subset related to each first local target from the available application program interfaces for the large model, determining the application program interfaces outside the application program interface subset related to each first local target from the application program interfaces outside the application program interface subset related to each first local target according to the historical call data of the application program interfaces outside the application program interface subset related to each first local target and each first local target.
The above embodiment of the application program interface calling method applied to the artificial intelligence system has the beneficial effects and specific implementation manner, reference may be made to the application program interface calling method applied to the large model in the foregoing embodiment, and details are not repeated here.
The foregoing description of the embodiments of the present disclosure has been presented primarily in terms of methods. To achieve the above functions, it includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. The technical aim may be to use different methods to implement the described functions for each particular application, but such implementation should not be considered beyond the scope of the present disclosure.
In an exemplary embodiment, the embodiment of the present disclosure further provides an application program interface calling device, which may be used to implement the application program interface calling method applied to the large model as in the foregoing embodiment.
Fig. 7 is a schematic diagram of the composition of an application program interface calling device according to an embodiment of the disclosure. As shown in fig. 7, the apparatus may include: a partitioning module 701 and a processing module 702.
The partitioning module 701 is configured to partition a first global object from the artificial intelligence system into at least two first local objects according to the description information of the available application program interfaces.
The processing module 702 is configured to determine an application program interface corresponding to each first local target from available application program interfaces, and send identification information of the application program interface corresponding to each first local target to the artificial intelligence system, where the identification information of the application program interface corresponding to each first local target is used to indicate to the artificial intelligence system that the application program interface that needs to be invoked to implement the first global target.
The processing module 702 is further configured to, in response to detecting that the first global target from the artificial intelligence system is changed to a second global target, divide the second global target into at least two second local targets according to the description information of the available application program interfaces, where the second local targets include a third local target and a fourth local target, the third local target is the same as at least one first local target, and the fourth local target is different from any one of the first local targets; determining application program interfaces corresponding to the third local targets according to the application program interfaces corresponding to the first local targets, determining the application program interfaces corresponding to the fourth local targets from the available application program interfaces, and sending identification information of the third local targets and the application program interfaces corresponding to the fourth local targets to the artificial intelligent system, wherein the identification information of the application program interfaces corresponding to the third local targets and the fourth local targets is used for indicating the application program interfaces required to be called for realizing the second global targets to the artificial intelligent system.
In a possible implementation manner, the dividing module 701 is further configured to:
after dividing a first global object from the artificial intelligence system into at least two first local objects according to the description information of the available application program interfaces, determining an application program interface subset related to each first local object from the available application program interfaces, wherein the application program interface subset comprises one or more application program interfaces.
The processing module 702 is specifically configured to:
and determining the application program interfaces corresponding to the first local targets from the application program interface subset related to the first local targets.
In a possible implementation, the processing module 702 is further configured to:
after the identification information of the application program interfaces corresponding to the first local targets is sent to the artificial intelligent system, receiving a calling result of the application program interfaces corresponding to the first local targets from the artificial intelligent system; checking the calling result and a first local target corresponding to the calling result; when the calling result does not meet the first local target corresponding to the calling result, determining the application program interface corresponding to the first local target corresponding to the calling result from the available application program interfaces again according to the calling result, and sending the identification information of the application program interface corresponding to the first local target determined again to the artificial intelligent system.
In a possible implementation, the processing module 702 is further configured to:
before the large model determines the application program interfaces corresponding to the first local targets from the application program interface subsets related to the first local targets, determining the supplementary application program interfaces related to the first local targets from the available application program interfaces according to the historical call data of the available application program interfaces and the first local targets; and updating the subset of the application program interfaces related to each first local target according to the supplementary application program interfaces related to each first local target.
In a possible implementation manner, the processing module 702 is specifically configured to:
determining application program interfaces outside the application program interface subset related to each first local target from available application program interfaces; and determining the supplementary application program interfaces related to the first local targets from the application program interfaces outside the application program interface subset related to the first local targets according to the historical call data of the application program interfaces outside the application program interface subset related to the first local targets and the first local targets.
In an exemplary embodiment, the present disclosure also provides an application program interface calling apparatus that may be used to implement the application program interface calling method applied to the artificial intelligence system as in the foregoing embodiment.
Fig. 8 is a schematic diagram of the composition of an application program interface calling device according to an embodiment of the disclosure. As shown in fig. 8, the apparatus may include: a transmitting module 801, a receiving module 802, and a processing module 803.
A sending module 801, configured to send a first global target input by a user to a large model.
The receiving module 802 is configured to receive identification information of an application program interface corresponding to a first local target, where the first local target is obtained by dividing a first global target by a large model according to description information of available application program interfaces, and the first local target includes at least two first local targets.
And the processing module 803 is configured to call the application program interface corresponding to each first local target according to the identification information of the application program interface corresponding to each first local target, so as to implement the first global target.
The sending module 801 is further configured to send, in response to detecting that the first global object is changed to the second global object, the second global object to the large model.
The receiving module 802 is further configured to receive identification information of application program interfaces corresponding to a third local target and a fourth local target, where the third local target is the same as at least one first local target, the fourth local target is different from any one first local target, the third local target and the fourth local target are second local targets obtained by dividing a second global target by a large model according to description information of the available application program interfaces, and the second local targets include at least two second local targets.
The processing module 803 is further configured to call the application program interfaces corresponding to the third local targets and the fourth local targets according to the identification information of the application program interfaces corresponding to the third local targets and the fourth local targets, so as to implement the second global target.
In one possible implementation manner, after determining the subset of application program interfaces related to each first local target from available application program interfaces for the large model, the subset of application program interfaces is determined from the subset of application program interfaces related to each first local target, and one or more application program interfaces are included in the subset of application program interfaces.
In a possible implementation manner, the sending module 801 is further configured to:
and sending a calling result of the application program interface corresponding to the first local target to the large model, wherein the calling result is used for checking the calling result and the first local target corresponding to the calling result by the large model, so that when the calling result does not meet the first local target corresponding to the calling result, the identification information of the application program interface corresponding to the first local target which is redetermined according to the calling result is sent to the artificial intelligent system.
The processing module 803 is further configured to:
When the receiving module 802 receives the identification information of the application program interface corresponding to the first local target determined again by the large model, the application program interface corresponding to the first local target is called according to the identification information of the application program interface corresponding to the first local target determined again, so as to realize the first global target.
In a possible implementation manner, the subset of application program interfaces related to each first local target is obtained by updating the subset of application program interfaces related to each first local target according to the supplementary application program interfaces related to each first local target after determining the supplementary application program interfaces related to each first local target from the available application program interfaces according to the historical call data of the available application program interfaces and each first local target by using the large model.
In one possible implementation manner, after the supplemental application program interfaces related to the first local targets are determined for the large model from the available application program interfaces and the application program interfaces outside the application program interface subset related to the first local targets, the supplemental application program interfaces are determined from the application program interfaces outside the application program interface subset related to the first local targets according to the historical call data of the application program interfaces outside the application program interface subset related to the first local targets and the first local targets.
It should be noted that the division of the modules in fig. 7 and 8 is illustrative, and is merely a logic function division, and other division manners may be implemented in practice. For example, two or more functions may also be integrated in one processing module. The embodiments of the present disclosure are not limited in this regard. The integrated modules may be implemented in hardware or in software functional modules.
In the technical scheme of the disclosure, the acquisition, storage, application and the like of the related user personal information all conform to the regulations of related laws and regulations, and the public sequence is not violated.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
In an exemplary embodiment, an electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described in the above embodiments. The electronic device may be the computer or server described above.
In an exemplary embodiment, the readable storage medium may be a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method according to the above embodiment.
In an exemplary embodiment, the computer program product comprises a computer program which, when executed by a processor, implements the method according to the above embodiments.
Fig. 9 shows a schematic block diagram of an example electronic device 900 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 9, the electronic device 900 includes a computing unit 901 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other by a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
A number of components in the electronic device 900 are connected to the I/O interface 905, including: an input unit 906 such as a keyboard, a mouse, or the like; an output unit 907 such as various types of displays, speakers, and the like; a storage unit 908 such as a magnetic disk, an optical disk, or the like; and a communication unit 909 such as a network card, modem, wireless communication transceiver, or the like. The communication unit 909 allows the electronic device 900 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunications networks.
The computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the respective methods and processes described above, such as an application program interface call method. For example, in some embodiments, the application program interface invocation method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 900 via the ROM 902 and/or the communication unit 909. When the computer program is loaded into RAM 903 and executed by the computing unit 901, one or more steps of the application program interface invoking method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the application program interface call method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above can be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server) or that includes a middleware component (e.g., an application server) or that includes a front-end component through which a user can interact with an implementation of the systems and techniques described here, or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (23)

1. An application program interface invoking method, the method comprising:
the large model divides a first global target from the artificial intelligent system into at least two first local targets according to the description information of the available application program interfaces;
the large model determines application program interfaces corresponding to the first local targets from the available application program interfaces, and sends identification information of the application program interfaces corresponding to the first local targets to the artificial intelligent system, wherein the identification information of the application program interfaces corresponding to the first local targets is used for indicating the application program interfaces required to be called for realizing the first global targets to the artificial intelligent system;
In response to detecting a change from a first global target to a second global target from an artificial intelligence system, the large model divides the second global target into at least two second local targets according to description information of available application program interfaces, the second local targets including a third local target and a fourth local target, the third local target being identical to at least one of the first local targets, the fourth local target being different from any of the first local targets;
the large model determines application program interfaces corresponding to all third local targets according to the application program interfaces corresponding to the first local targets, determines application program interfaces corresponding to all fourth local targets from the available application program interfaces, and sends identification information of all third local targets and application program interfaces corresponding to all fourth local targets to the artificial intelligent system, wherein the identification information of all third local targets and application program interfaces corresponding to all fourth local targets is used for indicating the application program interfaces required to be called for realizing the second global targets to the artificial intelligent system.
2. The method of claim 1, after the large model divides a first global goal from an artificial intelligence system into at least two first local goals according to the description information of available application program interfaces, the method further comprising:
The large model determines an application program interface subset related to each first local target from the available application program interfaces, wherein the application program interface subset comprises one or more application program interfaces;
the large model determines the application program interfaces corresponding to the first local targets from the available application program interfaces, and the large model comprises the following steps:
the large model determines the application program interfaces corresponding to the first local targets from the application program interface subset related to the first local targets.
3. The method according to claim 1 or 2, after said sending identification information of an application program interface corresponding to each of the first local targets to the artificial intelligence system, the method further comprising:
the large model receives a calling result of an application program interface corresponding to the first local target from the artificial intelligent system;
the large model collates the calling result and a first local target corresponding to the calling result;
when the calling result does not meet the first local target corresponding to the calling result, the large model determines the application program interface corresponding to the first local target corresponding to the calling result from the available application program interfaces again according to the calling result, and sends the identification information of the application program interface corresponding to the first local target determined again to the artificial intelligent system.
4. The method of claim 2, further comprising, prior to the large model determining application program interfaces corresponding to each of the first local objects from the subset of application program interfaces associated with each of the first local objects:
the large model determines supplementary application program interfaces related to each first local target from the available application program interfaces according to the historical call data of the available application program interfaces and each first local target;
and the large model updates the subset of the application program interfaces related to the first local targets according to the supplementary application program interfaces related to the first local targets.
5. The method of claim 4, wherein the large model determines, from the available application interfaces, supplemental application interfaces associated with each of the first local targets based on historical call data for the available application interfaces and each of the first local targets, comprising:
the large model determines application program interfaces outside the application program interface subset related to each first local target from the available application program interfaces;
The large model determines the supplementary application program interfaces relevant to the first local targets from the application program interfaces outside the application program interface subsets relevant to the first local targets according to the historical call data of the application program interfaces outside the application program interface subsets relevant to the first local targets and the first local targets.
6. An application program interface invoking method, the method comprising:
the artificial intelligence system sends a first global target input by a user to the large model;
the artificial intelligence system receives identification information of an application program interface corresponding to a first local target, wherein the first local target is obtained by dividing the first global target by the large model according to description information of the available application program interfaces, and the first local target comprises at least two;
the artificial intelligence system calls the application program interfaces corresponding to the first local targets according to the identification information of the application program interfaces corresponding to the first local targets to realize the first global targets;
in response to detecting that the first global target changes to a second global target, the artificial intelligence system sends the second global target to the large model;
The artificial intelligence system receives identification information of application program interfaces corresponding to a third local target and a fourth local target, wherein the third local target is the same as at least one first local target, the fourth local target is different from any one first local target, the third local target and the fourth local target are second local targets obtained by dividing the second global target by the large model according to the description information of the available application program interfaces, and the second local targets comprise at least two;
the artificial intelligence system calls the application program interfaces corresponding to the third local targets and the fourth local targets according to the identification information of the application program interfaces corresponding to the third local targets and the fourth local targets, and the second global targets are achieved.
7. The method of claim 6, wherein the application program interfaces corresponding to the first local targets are determined from the subset of application program interfaces related to the first local targets after determining, for the large model, a subset of application program interfaces related to the first local targets from the available application program interfaces, and the subset of application program interfaces includes one or more application program interfaces.
8. The method of claim 6 or 7, the method further comprising:
the artificial intelligence system sends a calling result of an application program interface corresponding to the first local target to the large model, and the large model is used for checking the calling result and the first local target corresponding to the calling result, so that when the calling result does not meet the first local target corresponding to the calling result, identification information of the application program interface corresponding to the first local target which is redetermined according to the calling result is sent to the artificial intelligence system;
when the artificial intelligence system receives the identification information of the application program interface corresponding to the first local target which is redetermined by the large model, calling the application program interface corresponding to the first local target according to the identification information of the application program interface corresponding to the redetermined first local target, and realizing the first global target.
9. The method of claim 7, wherein the subset of application program interfaces related to each first local target is obtained by updating the subset of application program interfaces related to each first local target according to the supplemental application program interfaces related to each first local target after determining the supplemental application program interfaces related to each first local target from the available application program interfaces according to the historical call data of the available application program interfaces and each first local target.
10. The method of claim 9, wherein after determining, for the large model, the application interfaces outside the subset of application interfaces related to the first local object from the available application interfaces, the first local object is determined from the application interfaces outside the subset of application interfaces related to the first local object based on historical call data of the application interfaces outside the subset of application interfaces related to the first local object and the first local object.
11. An application program interface invocation apparatus, the apparatus comprising:
the dividing module is used for dividing a first global target from the artificial intelligent system into at least two first local targets according to the description information of the available application program interfaces;
the processing module is used for determining application program interfaces corresponding to the first local targets from the available application program interfaces, sending identification information of the application program interfaces corresponding to the first local targets to the artificial intelligent system, and indicating the application program interfaces required to be called for realizing the first global targets to the artificial intelligent system;
The processing module is further configured to, in response to detecting that a first global target from the artificial intelligence system is changed to a second global target, divide the second global target into at least two second local targets according to description information of available application program interfaces, where the second local targets include a third local target and a fourth local target, the third local target is the same as at least one of the first local targets, and the fourth local target is different from any of the first local targets;
determining application program interfaces corresponding to third local targets according to the application program interfaces corresponding to the first local targets, determining application program interfaces corresponding to fourth local targets from the available application program interfaces, and sending identification information of the third local targets and the application program interfaces corresponding to the fourth local targets to the artificial intelligent system, wherein the identification information of the application program interfaces corresponding to the third local targets and the fourth local targets is used for indicating the application program interfaces required to be called for realizing the second global targets to the artificial intelligent system.
12. The apparatus of claim 11, the partitioning module further to:
After dividing a first global object from an artificial intelligent system into at least two first local objects according to the description information of available application program interfaces, determining an application program interface subset related to each first local object from the available application program interfaces, wherein the application program interface subset comprises one or more application program interfaces;
the processing module is specifically configured to:
and determining the application program interfaces corresponding to the first local targets from the application program interface subset related to the first local targets.
13. The apparatus of claim 11 or 12, the processing module further to:
after the identification information of the application program interfaces corresponding to the first local targets is sent to the artificial intelligent system, receiving a calling result of the application program interfaces corresponding to the first local targets from the artificial intelligent system;
calibrating the calling result and a first local target corresponding to the calling result;
and when the calling result does not meet the first local target corresponding to the calling result, determining the application program interface corresponding to the first local target corresponding to the calling result from the available application program interfaces again according to the calling result, and sending the identification information of the application program interface corresponding to the first local target determined again to the artificial intelligent system.
14. The apparatus of claim 12, the processing module further to:
before determining the application program interfaces corresponding to the first local targets from the application program interface subset related to the first local targets, determining the supplementary application program interfaces related to the first local targets from the available application program interfaces according to the historical call data of the available application program interfaces and the first local targets;
and updating the subset of the application program interfaces related to the first local targets according to the supplementary application program interfaces related to the first local targets.
15. The apparatus of claim 14, the processing module being specifically configured to:
determining application program interfaces outside the application program interface subset related to each first local target from the available application program interfaces;
and determining the supplementary application program interfaces related to the first local targets from the application program interfaces outside the application program interface subsets related to the first local targets according to the historical call data of the application program interfaces outside the application program interface subsets related to the first local targets and the first local targets.
16. An application program interface invocation apparatus, the apparatus comprising:
the sending module is used for sending a first global target input by a user to the large model;
the receiving module is used for receiving the identification information of the application program interface corresponding to a first local target, wherein the first local target is obtained by dividing the first global target by the large model according to the description information of the available application program interfaces, and the first local target comprises at least two;
the processing module is used for calling the application program interfaces corresponding to the first local targets according to the identification information of the application program interfaces corresponding to the first local targets so as to realize the first global targets;
the sending module is further configured to send a second global target to the large model in response to detecting that the first global target is changed to the second global target;
the receiving module is further configured to receive identification information of application program interfaces corresponding to a third local target and a fourth local target, where the third local target is the same as at least one of the first local targets, the fourth local target is different from any one of the first local targets, the third local target and the fourth local target are second local targets obtained by dividing the second global target by the large model according to description information of the available application program interfaces, and the second local targets include at least two of the second local targets;
The processing module is further configured to call the application program interfaces corresponding to the third local targets and the fourth local targets according to the identification information of the application program interfaces corresponding to the third local targets and the fourth local targets, so as to implement the second global target.
17. The apparatus of claim 16, wherein the application program interface corresponding to each of the first local objects is determined for the large model from the subset of application program interfaces associated with each of the first local objects after determining a subset of application program interfaces associated with each of the first local objects from the available application program interfaces, the subset of application program interfaces including one or more application program interfaces.
18. The apparatus of claim 16 or 17, the sending module further configured to:
transmitting a calling result of an application program interface corresponding to the first local target to the large model, wherein the calling result is used for the large model to check the calling result with the first local target corresponding to the calling result, so that when the calling result does not meet the first local target corresponding to the calling result, identification information of the application program interface corresponding to the first local target which is redetermined according to the calling result is transmitted to the artificial intelligent system;
The processing module is further configured to:
when the receiving module receives the identification information of the application program interface corresponding to the first local target redetermined by the large model, calling the application program interface corresponding to the first local target according to the identification information of the application program interface corresponding to the redetermined first local target, and realizing the first global target.
19. The apparatus of claim 17, wherein the subset of application program interfaces related to each first local target is obtained by updating the subset of application program interfaces related to each first local target according to the supplemental application program interfaces related to each first local target after determining the supplemental application program interfaces related to each first local target from the available application program interfaces according to historical call data of the available application program interfaces and each first local target.
20. The apparatus of claim 19, wherein each of the first local object-related supplemental application program interfaces is determined from among the available application program interfaces for the large model from application program interfaces outside of the subset of first local object-related application program interfaces based on historical call data for application program interfaces outside of the subset of first local object-related application program interfaces and each of the first local objects from application program interfaces outside of the subset of first local object-related application program interfaces.
21. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor;
wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-5 or the method of any one of claims 6-10.
22. A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1-5 or the method of any one of claims 6-10.
23. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-5 or the method according to any one of claims 6-10.
CN202310861872.6A 2023-07-13 2023-07-13 Application program interface calling method, device, equipment and storage medium Pending CN116991520A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310861872.6A CN116991520A (en) 2023-07-13 2023-07-13 Application program interface calling method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310861872.6A CN116991520A (en) 2023-07-13 2023-07-13 Application program interface calling method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116991520A true CN116991520A (en) 2023-11-03

Family

ID=88525805

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310861872.6A Pending CN116991520A (en) 2023-07-13 2023-07-13 Application program interface calling method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116991520A (en)

Similar Documents

Publication Publication Date Title
CN114911598A (en) Task scheduling method, device, equipment and storage medium
CN113805962B (en) Application page display method and device and electronic equipment
CN112947916B (en) Method, apparatus, device and storage medium for implementing online canvas
CN113419865A (en) Cloud resource processing method, related device and computer program product
CN115934076B (en) Cross-platform client micro-service providing device and method and electronic equipment
CN112817660A (en) Method, device, equipment and storage medium for expanding small program capacity
CN114374703B (en) Cloud mobile phone information acquisition method, device, equipment and storage medium
CN114816393B (en) Information generation method, device, equipment and storage medium
CN116991520A (en) Application program interface calling method, device, equipment and storage medium
EP4044173A2 (en) Method and apparatus for text to speech, electronic device and storage medium
CN113010285B (en) Method, apparatus, device, medium, and article for processing data
CN114327819B (en) Task management method, device, equipment and storage medium
CN113691937B (en) Method for determining position information, cloud mobile phone and terminal equipment
CN114329164A (en) Method, apparatus, device, medium and product for processing data
CN113535187B (en) Service online method, service updating method and service providing method
CN116561075B (en) Method for generating dynamic link library file, method and device for calling operator
CN113961263B (en) Applet distribution method, device, apparatus and storage medium
CN115858125B (en) Rendering engine calling method and device, electronic equipment and storage medium
CN113032040B (en) Method, apparatus, device, medium, and article for processing tasks
CN115495312B (en) Service request processing method and device
CN114116095B (en) Input method, input device, electronic equipment, medium and product
US20200160840A1 (en) Computer-assisted conversation using addressible conversation segments
CN116931945A (en) Service arrangement processing method and device, electronic equipment and storage medium
CN117933390A (en) Model mixing precision determination method, device, equipment and storage medium
CN117407136A (en) Multitasking method, platform, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination