Interface calling method and device

By setting execution conditions in the interface combination method to realize interface combination execution, the problem that the existing interface combination method cannot meet complex business scenarios is solved, and the intuitive display and flexible configuration of the interface execution path are realized.

CN119718481APending Publication Date: 2025-03-28CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411787329.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing interface combination method cannot intuitively and conveniently display the execution method, and it is difficult to meet flexible and changeable business scenarios and complex business functions.

Method used

By determining the execution conditions of each interface, the combined execution of the interface is realized, the business execution program is generated, and the circular execution, jump execution, combined execution and other methods are supported.

Benefits of technology

It realizes intuitive and efficient display of interface execution paths, meets the business operation needs of complex scenarios, and supports flexible configuration of interface relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718481A_ABST
    Figure CN119718481A_ABST
Patent Text Reader

Abstract

The invention discloses an interface calling method and device, and relates to the technical field of artificial intelligence. A specific embodiment of the method comprises the following steps: receiving a service request, obtaining service information, and calling a start interface set to obtain a corresponding start interface based on service information matching; obtaining all interfaces associated with the starting interface, determining a next interface according to the service information, and configuring an interface relationship between the starting interface and the next interface; all interfaces associated with the next interface are obtained, a next interface is determined according to the service information, and the interface relation between the next interface and the next interface is configured; and completing interface calling configuration and generating a service execution program until the type of the next interface is identified as an ending interface. According to the embodiment, at least flexible and changeable service scenes and complex service functions can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an interface calling method and device. Background Art

[0002] In the current software development process, function combination is a relatively new development model. By combining interfaces to a certain extent, more abundant functions can be obtained. The existing interface combination method cannot display the execution method more intuitively and conveniently, nor can it meet the current flexible and changeable business scenarios and complex business functions. Summary of the invention

[0003] In view of this, an embodiment of the present invention provides an interface calling method and device, which can at least achieve combined execution of interfaces by determining each interface and setting execution conditions, and can meet flexible and diverse business scenarios and complex business functions.

[0004] To achieve the above-mentioned purpose, according to one aspect of an embodiment of the present invention, there is provided an interface calling method, comprising: receiving a service request, obtaining service information, calling a start interface set to obtain a corresponding start interface based on the service information matching; obtaining all interfaces associated with the start interface, determining a next interface according to the service information, and configuring an interface relationship between the start interface and the next interface; looping execution: obtaining all interfaces associated with the next interface, determining the next interface according to the service information, and configuring an interface relationship between the next interface and the next interface; until, in response to identifying that the type of the next interface is an end interface, the interface call configuration is completed and a service execution program is generated.

[0005] Optionally, after receiving the business request, it includes: calling the log record to query whether there is a record of completing the processing of the business request; if so, obtaining the business execution program corresponding to the business request and starting it; if not, obtaining the business information, calling the start interface set to obtain the corresponding start interface based on the business information matching.

[0006] Optionally, the method further includes: obtaining an interface call flowchart corresponding to the business request; and obtaining a business execution program corresponding to the business request in response to confirmation of the interface call flowchart.

[0007] Optionally, calling the start interface set to obtain the corresponding start interface based on business information matching, including: determining the business type according to the business information, and obtaining the business attributes to be matched corresponding to the business type; calling the start interface set to determine the corresponding start interface according to the business attributes to be matched.

[0008] Optionally, before calling the start interface set, the method further includes: determining a corresponding start interface set according to the belonging service type.

[0009] Optionally, determining a corresponding start interface according to the service attribute to be matched includes: obtaining a service condition of the service attribute to be matched, determining a start interface that satisfies the service condition, and using the start interface as a start interface of a branch corresponding to the service condition.

[0010] Optionally, the method further includes: in response to the business information satisfying service conditions of multiple branches, executing branches corresponding to each service condition in parallel.

[0011] Optionally, acquiring all interfaces associated with the start interface includes: in response to selection of an association relationship, acquiring all interfaces having the association relationship with the start interface.

[0012] Optionally, determining the next interface according to the business information includes: determining label data of the business information, and matching all interfaces associated with the start interface according to the label data to determine the next interface.

[0013] Optionally, determining the label data of the business information includes: obtaining each attribute type in the business information, and determining the label corresponding to the attribute type; obtaining interval data corresponding to the label according to the business scenario of the business request, and using the label and the interval data as label data.

[0014] Optionally, the method further includes: generating a corresponding expression according to the tag data; using the expression to operate on all interfaces associated with the start interface to obtain a return result; and in response to the return result being true, determining it as the next interface.

[0015] Optionally, configuring the interface relationship between the start interface and the next interface includes: respectively acquiring configuration information of the start interface and the next interface, determining the relationship type between the start interface and the next interface; and determining the interface protocol between the start interface and the next interface according to the business information.

[0016] Optionally, identifying the type of the next interface as an end interface includes: determining the business type to which it belongs based on business information, and calling an end interface set corresponding to the business type; in the end interface set, querying whether the next interface exists, then determining that the next interface is an end interface.

[0017] Optionally, it also includes: obtaining the execution count of the interface, and determining whether the execution count is greater than a preset executable count; if so, throwing an exception and terminating the interface call configuration; if not, determining that the interface is the next interface.

[0018] To achieve the above-mentioned purpose, according to another aspect of an embodiment of the present invention, an interface calling device is provided, including: a startup module, used to receive a business request, obtain business information, call a start interface set based on business information matching to obtain a corresponding start interface; a first generation module, used to obtain all interfaces associated with the start interface, determine the next interface according to the business information, and configure the interface relationship between the start interface and the next interface; a second generation module, used to execute in a loop: obtain all interfaces associated with the next interface, determine the next interface according to the business information, and configure the interface relationship between the next interface and the next interface; until in response to identifying that the type of the next interface is an end interface, the interface call configuration is completed and a business execution program is generated.

[0019] Optionally, after the startup module receives the business request, it includes: calling the log record to query whether there is a record of completing the processing of the business request; if so, obtaining the business execution program corresponding to the business request and starting it; if not, obtaining the business information, calling the start interface set to obtain the corresponding start interface based on the business information matching.

[0020] Optionally, the startup module is further used to obtain an interface call flowchart corresponding to the business request; in response to confirmation of the interface call flowchart, obtain a business execution program corresponding to the business request.

[0021] Optionally, the startup module calls the start interface set to obtain the corresponding start interface based on the business information matching, including: determining the business type according to the business information, and obtaining the business attributes to be matched corresponding to the business type; calling the start interface set to determine the corresponding start interface according to the business attributes to be matched.

[0022] Optionally, before the startup module calls the start interface set, the method further includes: determining a corresponding start interface set according to the service type.

[0023] Optionally, the startup module determines the corresponding start interface according to the service attribute to be matched, including: obtaining the service condition of the service attribute to be matched, determining the start interface that meets the service condition, and using the start interface as the start interface of the branch corresponding to the service condition.

[0024] Optionally, the starting module is further configured to execute branches corresponding to each service condition in parallel in response to the business information satisfying service conditions of multiple branches.

[0025] Optionally, the first generating module obtains all interfaces associated with the start interface, including: in response to the selection of the association relationship, obtaining all interfaces having the association relationship with the start interface.

[0026] Optionally, the first generating module determines the next interface according to the business information, including: determining label data of the business information, and matching all interfaces associated with the start interface according to the label data to determine the next interface.

[0027] Optionally, the first generation module determines the label data of the business information, including: obtaining each attribute type in the business information, determining the label corresponding to the attribute type; obtaining the interval data corresponding to the label according to the business scenario of the business request, and using the label and the interval data as label data.

[0028] Optionally, the first generation module is further used to generate a corresponding expression based on the label data; use the expression to operate on all interfaces that have an associated relationship with the start interface to obtain a return result; in response to the return result being true, determine it as the next interface.

[0029] Optionally, the first generation module configures the interface relationship between the start interface and the next interface, including: obtaining configuration information of the start interface and the next interface respectively, determining the relationship type between the start interface and the next interface; and determining the interface protocol between the start interface and the next interface based on the business information.

[0030] Optionally, the second generation module identifies the type of the next interface as an end interface, including: determining the business type according to the business information, and calling the end interface set corresponding to the business type; in the end interface set, querying whether the next interface exists, then determining that the next interface is an end interface.

[0031] Optionally, the first generation module or the second generation module is also used to obtain the execution count of the interface and determine whether the execution count is greater than a preset executable count; if so, throw an exception and terminate the interface call configuration; otherwise, determine that the interface is the next interface.

[0032] To achieve the above objective, according to another aspect of an embodiment of the present invention, an interface calling electronic device is provided.

[0033] The electronic device of an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement any of the above-mentioned interface calling methods.

[0034] To achieve the above object, according to another aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, any of the above-mentioned interface calling methods is implemented.

[0035] To achieve the above object, according to another aspect of an embodiment of the present invention, a computer program product is provided. A computer program product according to an embodiment of the present invention includes a computer program, and when the program is executed by a processor, the interface calling method provided by the embodiment of the present invention is implemented.

[0036] According to the solution provided by the present invention, an embodiment of the above invention has the following advantages or beneficial effects: it can realize intuitive and efficient display of the interface execution path, and realize loop execution, jump execution, combined execution and the like; there is no need to expose interface functions, and the interface relationship can be flexibly configured to support business operations in complex scenarios.

[0037] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0039] Figure 1 This is a schematic diagram of the main flow of an interface calling method according to an embodiment of the present invention;

[0040] Figure 2 is a diagram of a graph structure of an example interface call according to an embodiment of the present invention;

[0041] Figure 3 is a main flow chart of another interface calling method according to an embodiment of the present invention;

[0042] Figure 4 This is a schematic diagram of main modules of an interface calling device according to an embodiment of the present invention;

[0043] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0044] Figure 6 It is a schematic diagram of the structure of a computer system of a mobile device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0045] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0046] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0047] In the absence of conflict, the embodiments and features of the embodiments of the present invention can be combined with each other. The acquisition, transmission, storage, use, and processing of data in the technical solution of the present invention are in compliance with the relevant provisions of national laws and regulations, and are used for legal and reasonable purposes, and are not shared, disclosed, or sold outside of these legal uses, and are subject to supervision and management by regulatory authorities.

[0048] For user information, necessary measures should be taken to prevent illegal access to such personal information data, ensure that persons who have access to personal information data comply with relevant laws and regulations, and ensure the security of user personal information. Once such user personal information data is no longer needed, risks should be minimized by limiting or even prohibiting data collection and / or deleting data. When applicable, including in certain relevant applications, protect user privacy by de-identifying data, such as by removing specific identifiers (e.g., date of birth, etc.), controlling the amount or specificity of stored data (e.g., collecting location data at the city level rather than at the specific address level), controlling how data is stored, and / or other methods of de-identification.

[0049] See also Figure 1 , which shows a main flow chart of an interface calling method provided by an embodiment of the present invention, including the following steps:

[0050] S101: receiving a service request, obtaining service information, and calling a start interface set to obtain a corresponding start interface based on the service information.

[0051] In a further embodiment, for step S101, the interface call flowchart generated by the present invention can be checked and can be called directly. The specific implementation process includes: calling the log record, querying whether there is a record of the completion of the business request processing, if so, obtaining the business execution program corresponding to the business request and starting it, if not, obtaining the business information, calling the start interface set to obtain the corresponding start interface based on the business information matching. It can be seen that the present invention cleverly does not need to query the database storing the interface call flowchart, query through the log record, and call it when it is determined that the business request can be well processed and completed, and the interface call flowchart corresponding to the business will not be exposed.

[0052] In a preferred embodiment, for step S101, the interface call flowchart corresponding to the business request can be obtained, and after obtaining the interface call flowchart, the business execution program corresponding to the business request can be obtained in response to the confirmation of the interface call flowchart. In other words, with the adjustment of business needs or the processing of business requests, the interface call flowchart may be adjusted and selected, so after obtaining the interface call flowchart, it can be executed in response to the confirmation of the interface call flowchart, thereby avoiding the reduction of the efficiency of executing business requests.

[0053] In a further embodiment, for step S101, the present invention configures a start interface set for the start interface, and maps the start interface set by the business type, and the specific implementation process includes: determining the corresponding start interface set according to the business type. It is worth noting that the present invention creatively describes the start interface through business attributes, and the specific implementation process includes: determining the business type according to the business information, obtaining the business attributes to be matched corresponding to the business type, calling the start interface set, and determining the corresponding start interface according to the business attributes to be matched. Therefore, the present invention can not only flexibly describe and configure the business type through business attributes, but also obtain the corresponding start interface through business attribute matching. In a further embodiment, the present invention can select the business attributes corresponding to the business type according to the business requirements of the current business request to obtain the business attributes to be matched, that is, dynamically determine the business attributes used to describe the start interface according to the current business requirements, so as to obtain a more flexible and adaptable start interface. For example, such as Figure 2 As shown, the service attributes to be matched are determined from the start interface set to obtain related interfaces: interface 1 and interface 4.

[0054] More importantly, various service conditions can be set for business attributes, and different service conditions lead to different interfaces. The specific implementation process involved is, for example, obtaining the service conditions for the business attributes to be matched, determining the start interface that satisfies the service conditions, and using the start interface as the start interface for the branch corresponding to the service conditions. Figure 2 As shown, there are two service conditions for business attribute N: N<10 and N>=10, that is, two call branches can be formed. For example, when the service parameter of business attribute N is 9, the conditional branch N<10 is selected, and when the service parameter of business attribute N is 13, the conditional branch N>=10 is selected.

[0055] Preferably, in response to the business information satisfying the service conditions of multiple branches, the branches corresponding to each service condition are executed in parallel. It can be seen that the present invention can realize parallel execution based on multiple branches in the figure. When there are multiple selected interfaces, the selected multiple interfaces can be executed, and the subsequent interfaces will continue to be selected until the next interface is the end interface. In addition, the execution mode, that is, whether to execute one branch or multiple branches, is based on the judgment of the service conditions. There may be multiple branch interfaces. For example: there are two branches: N<25 and N<20. When N=15, two branches are satisfied at the same time and the two branches are executed in parallel.

[0056] According to the above embodiments, the present invention searches for the start interface to obtain all interfaces related to the start interface, and makes conditional judgments based on relevant contents such as service conditions and business information. If the conditions are met, the interface is selected as the start interface.

[0057] S102: Acquire all interfaces associated with the start interface, determine the next interface according to the service information, and configure the interface relationship between the start interface and the next interface.

[0058] In a further embodiment, for step S102, when obtaining all interfaces associated with the starting interface, different association relationships between interfaces can be configured, and corresponding association relationships can be selected according to different business needs, and then the next interface can be determined. In other words, in response to the selection of the association relationship, all interfaces that have the association relationship with the starting interface can be obtained.

[0059] In some other embodiments, in step S102, when determining the next interface according to the business information, the tag data of the business information can be determined, and then the tag data can be matched among all interfaces associated with the start interface to determine the next interface. Therefore, the embodiments of the present invention can describe the business information through tags, so as to configure the business information and the interface through tags.

[0060] In a preferred embodiment, determining the tag data of the business information in step S102 may include obtaining each attribute type in the business information, determining the tag corresponding to the attribute type, and then obtaining the interval data corresponding to the tag according to the business scenario of the business request, and using the tag and the interval data as tag data. It can be seen that the tag is generated according to the attributes of the business information, and different attributes may correspond to different business processing scenarios. The tags corresponding to different attributes are selected to determine the interface. At the same time, the attributes can have attribute parameters, and different attribute parameter intervals can realize different scenario processing. Therefore, the embodiment of the present invention uses the attribute corresponding tag and the interval data together as tag data to determine the interface. For example, Figure 2The label shown is N, and the interval data is N>=10.

[0061] In a preferred embodiment, the present invention generates a corresponding expression according to the tag data, uses the expression to operate on all interfaces associated with the start interface, obtains a return result, and if the return result is true, determines it as the next interface, and if the return result is false, discards the interface. It can be seen that the service condition can be judged by expression. When the service condition judgment returns true, the interface is selected as the next interface. When the condition judgment returns false, other associated interfaces continue to be selected. When no interface is selected, an exception is thrown to terminate the service execution.

[0062] In some other embodiments, in step S102, after determining the next interface, the interface relationship between the start interface and the next interface can be configured, which can specifically include: respectively obtaining the configuration information of the start interface and the next interface, determining the relationship type between the start interface and the next interface, exemplified by: single inheritance relationship, multiple inheritance relationship, etc. And configuring the interface relationship between the start interface and the next interface can specifically include: determining the interface protocol between the start interface and the next interface according to the business information, exemplified by: HTTP, RPC, RMI and other interface protocols, and of course, the information transmitted in the interface protocol can also be determined according to the business information.

[0063] It is worth noting that step S102 may also include obtaining the execution times of the interface, determining whether the execution times are greater than the preset executable times, and if so, throwing an exception to terminate the interface call configuration, and if not, determining the interface as the next interface. It can be seen that in order to avoid an infinite loop, the maximum executable times of the interface can be set, and when the interface is executed to the maximum times, an exception needs to be thrown to terminate the execution of the service.

[0064] S103: Loop execution: obtain all interfaces associated with the next interface, determine the next interface according to the service information, and configure the interface relationship between the next interface and the next interface.

[0065] It is worth noting that step S103 is still a process of determining the next interface, but the current interface is not the starting interface at this time, so please refer to the various embodiments involved in step S102.

[0066] In addition, both step S102 and step S103 are the configuration process of executing the next interface, and all interfaces related to the current interface are obtained, and the conditions are judged according to the service parameters. If the conditions are met, the service is selected as the next interface.

[0067] S104: until the next interface type is identified as an end interface in response, the interface call configuration is completed and a service execution program is generated.

[0068] In a further embodiment, when the type of the next interface is identified as an end interface in step S104, it may include: determining the business type according to the business information, calling the end interface set corresponding to the business type, and then querying the end interface set to determine that the next interface exists and the next interface is the end interface. It can be seen that when the next interface is the end interface, the current interface is the end interface, and the end interface can be configured as a special interface type.

[0069] In addition, it should be noted that in order to better express the service situation, the ELSE condition can be added to the relationship between the interfaces. That is, when other conditions are not met, the branch condition can be selected to avoid problems in the program due to failure to select the next interface.

[0070] The methods provided in the above-mentioned embodiments, the interface execution mode based on graph combination of the present invention can not only realize sequential execution, but also realize interface execution modes of complex scenarios such as loop execution, arbitrary jump execution, and combined execution, which can meet the execution modes of various scenarios; the interface service based on graph combination, in terms of interface search, involves start interface search, end interface search, and next interface search, and also configures two types of interfaces on the interface type: start interface and end interface, and adds the conditional relationship of interface jump on the interface relationship. In addition, the graph structure of the interface call has natural readability, and combining services through the graph structure is more intuitive and clear.

[0071] See also Figure 3 , shows a schematic flow chart of an optional interface calling method according to an embodiment of the present invention, comprising the following steps:

[0072] S301: Receive a business request, call the log record, and check whether there is a record of the business request processing completion. If so, execute step S302 and then step S303. If not, execute step S304.

[0073] S302: Obtain an interface call flow chart corresponding to the business request.

[0074] S303: In response to the confirmation of the interface call flowchart, the service execution program corresponding to the service request is obtained, and the process is exited.

[0075] S304: Acquire service information, determine the service type, and acquire the to-be-matched service attribute corresponding to the service type.

[0076] S305: Determine a corresponding start interface set according to the assigned service type.

[0077] S306: calling the start interface set, obtaining the service condition of the business attribute to be matched, determining the start interface that meets the service condition, and using the start interface as the start interface of the branch corresponding to the service condition.

[0078] In a further embodiment, step S306 may be responsive to the business information satisfying the service conditions of multiple branches, and branches corresponding to each service condition may be executed in parallel.

[0079] S307: In response to the selection of the association relationship, all interfaces having the association relationship with the start interface are acquired.

[0080] S308: Acquire each attribute type in the business information, and determine a label corresponding to the attribute type.

[0081] S309: According to the business scenario of the business request, obtain the interval data corresponding to the tag, and use the tag and the interval data as tag data.

[0082] S310: Determine the next interface by matching all interfaces associated with the start interface according to the tag data.

[0083] In a further embodiment, step S710 can generate a corresponding expression based on the label data; then use the expression to operate on all interfaces that have an association relationship with the start interface to obtain a return result; if the return result is true, it is determined to be the next interface, and if the return result is false, the interface is discarded.

[0084] In some further embodiments, step S310 may obtain the execution count of the interface and determine whether the execution count is greater than a preset executable count; if so, an exception is thrown to terminate the interface call configuration; if not, the interface is determined to be the next interface.

[0085] S311: respectively acquiring configuration information of the start interface and the next interface, and determining the relationship type between the start interface and the next interface; and determining the interface protocol between the start interface and the next interface according to the service information.

[0086] S312: Loop execution: obtain all interfaces associated with the next interface, determine the next interface according to the service information, and configure the interface relationship between the next interface and the next interface.

[0087] In a further embodiment, step S712 may obtain the execution count of the interface and determine whether the execution count is greater than a preset executable count; if so, an exception is thrown to terminate the interface call configuration; if not, the interface is determined to be the next interface.

[0088] S313: until the next interface type is identified as an end interface, the interface call configuration is completed and a service execution program is generated.

[0089] In a further embodiment, step S313 can determine the service type according to the service information, call the end interface set corresponding to the service type, and then query the end interface set to find out whether the next interface exists, and determine that the next interface is the end interface.

[0090] Through the above embodiments, the present invention proposes a service execution method based on graph combination, which solves the technical problem that the existing method of sequential execution of interfaces cannot realize the re-execution of interfaces, that is, the executed interface cannot be executed again, and therefore cannot be realized by configuring the execution conditions of the interface. The present invention satisfies both the sequential execution method and the service combination method of the above scenarios through the graph execution method, and can realize the service combination of combined execution, jump execution, loop execution and sequential execution to meet the business scenarios. The execution conditions of the interfaces are converted to the execution branches between the interfaces, and the conditions are set on the execution branches. Flexible service conditions are configured between the interfaces, and the service combination method is also more intuitive.

[0091] See also Figure 4 , shows a schematic diagram of main modules of an interface calling device 400 provided in an embodiment of the present invention, including:

[0092] The start module 401 is used to receive a service request, obtain service information, and call the start interface set to obtain a corresponding start interface based on the service information.

[0093] The first generating module 402 is used to obtain all interfaces associated with the starting interface, determine the next interface according to the service information, and configure the interface relationship between the starting interface and the next interface.

[0094] The second generation module 403 is used for loop execution: obtaining all interfaces associated with the next interface, determining the next interface according to the business information, and configuring the interface relationship between the next interface and the next interface; until the type of the next interface is identified as the end interface, the interface call configuration is completed and the business execution program is generated.

[0095] In the implementation device of the present invention, after the start module 401 receives the service request, it includes: calling the log record to check whether there is a record of the completion of the service request processing; if so, obtaining the service execution program corresponding to the service request and starting it; if not, obtaining the service information, calling the start interface set to obtain the corresponding start interface based on the service information matching.

[0096] In the implementation device of the present invention, the startup module 401 is also used to obtain the interface call flow chart corresponding to the business request; in response to the confirmation of the interface call flow chart, obtain the business execution program corresponding to the business request.

[0097] In the implementation device of the present invention, the startup module 401 calls the start interface set to obtain the corresponding start interface based on the business information matching, including: determining the business type according to the business information, and obtaining the business attributes to be matched corresponding to the business type; calling the start interface set to determine the corresponding start interface according to the business attributes to be matched.

[0098] In the implementation device of the present invention, before the start module 401 calls the start interface set, it also includes: determining a corresponding start interface set according to the belonging service type.

[0099] In the implementation device of the present invention, the startup module 401 determines the corresponding start interface according to the service attributes to be matched, including: obtaining the service conditions of the service attributes to be matched, determining the start interface that meets the service conditions, and using the start interface as the start interface of the branch corresponding to the service conditions.

[0100] In the implementation device of the present invention, the start module 401 is further used to execute the branch corresponding to each service condition in parallel in response to the business information satisfying the service conditions of multiple branches.

[0101] In the implementation device of the present invention, the first generation module 402 obtains all interfaces associated with the start interface, including: in response to the selection of the association relationship, obtaining all interfaces having the association relationship with the start interface.

[0102] In the implementation device of the present invention, the first generation module 402 determines the next interface according to the business information, including: determining the label data of the business information, matching all interfaces associated with the start interface according to the label data, and determining the next interface.

[0103] In the implementation device of the present invention, the first generation module 402 determines the label data of the business information, including: obtaining each attribute type in the business information, and determining the label corresponding to the attribute type; according to the business scenario of the business request, obtaining the interval data corresponding to the label, and using the label and the interval data as label data.

[0104] In the implementation device of the present invention, the first generation module 402 is also used to generate a corresponding expression based on the label data; use the expression to operate all interfaces that have an associated relationship with the start interface to obtain a return result; in response to the return result being true, determine it as the next interface.

[0105] In the implementation device of the present invention, the first generation module 402 configures the interface relationship between the start interface and the next interface, including: obtaining the configuration information of the start interface and the next interface respectively, determining the relationship type between the start interface and the next interface; and determining the interface protocol between the start interface and the next interface based on the business information.

[0106] In the implementation device of the present invention, the second generation module 403 identifies the type of the next interface as an end interface, including: determining the business type to which it belongs based on the business information, and calling the end interface set corresponding to the business type; in the end interface set, querying whether the next interface exists, then determining that the next interface is an end interface.

[0107] In the implementation device of the present invention, the first generation module 402 or the second generation module 403 is also used to obtain the execution times of the interface and determine whether the execution times are greater than the preset executable times; if so, an exception is thrown to terminate the interface call configuration; otherwise, the interface is determined to be the next interface.

[0108] In addition, the specific implementation content of the device described in the embodiment of the present invention has been described in detail in the method described above, so the repeated content will not be described again here.

[0109] Figure 5 An exemplary system architecture 500 to which embodiments of the present invention may be applied is shown, including terminal devices 501 , 502 , 503 , a network 504 and a server 505 (only an example).

[0110] Terminal devices 501, 502, 503 can be various electronic devices with display screens and supporting web browsing, and various communication client applications are installed. Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc.

[0111] The network 504 is used to provide a medium for communication links between the terminal devices 501, 502, 503 and the server 505. The network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables.

[0112] The server 505 may be a server that provides various services, such as a backend management server that provides support for shopping websites browsed by users using terminal devices 501, 502, and 503 (for example only). The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as target push information, product information - for example only) to the terminal device. It should be noted that the method provided in the embodiment of the present invention is generally executed by the server 505, and accordingly, the device is generally set in the server 505.

[0113] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0114] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device suitable for implementing an embodiment of the present invention. Figure 6 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0115] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0116] The following components are connected to the I / O interface 605: an input section 1006 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0117] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.

[0118] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0119] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0120] The modules involved in the embodiments of the present invention may be implemented in software or hardware. The modules described may also be set in a processor. For example, they may be described as: a processor including a step extraction module, a task workflow generation module, and a scenario workflow generation module. The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, the scenario workflow generation module may also be described as an "operation and maintenance scenario workflow generation module."

[0121] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device executes any of the above interface calling methods.

[0122] The computer program product of the present invention comprises a computer program, and when the computer program is executed by a processor, the interface calling method in the embodiment of the present invention is implemented.

[0123] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. An interface calling method, characterized in that: include: Receive business requests, obtain business information, call the start interface set to obtain the corresponding start interface based on the business information match; Acquire all interfaces associated with the start interface, determine the next interface according to the service information, and configure the interface relationship between the start interface and the next interface; Loop execution: obtaining all interfaces associated with the next interface, determining the next interface according to the service information, and configuring the interface relationship between the next interface and the next interface; Until the next interface type is identified as an end interface in response, the interface call configuration is completed and the service execution program is generated.

2. The method according to claim 1, characterized in that After receiving the business request, it includes: Call the log record to check whether there is a record of completion of the business request processing; If yes, the service execution program corresponding to the service request is obtained and started; if no, the service information is obtained, and the start interface set is called to obtain the corresponding start interface based on the service information matching.

3. The method according to claim 2, characterized in that Also includes: Obtain an interface call flow chart corresponding to the business request; In response to confirmation of the interface call flow chart, a service execution program corresponding to the service request is obtained.

4. The method according to claim 1, characterized in that: The call start interface set is matched based on the business information to obtain the corresponding start interface, including: Determine the service type based on the service information, and obtain the service attribute to be matched corresponding to the service type; Call the start interface set and determine the corresponding start interface according to the business attributes to be matched.

5. The method according to claim 4, characterized in that Before calling the start interface collection, it also includes: According to the service type, a corresponding start interface set is determined.

6. The method according to claim 4, characterized in that Determine the corresponding start interface based on the attributes of the service to be matched, including: The service condition of the service attribute to be matched is obtained, a start interface satisfying the service condition is determined, and the start interface is used as the start interface of the branch corresponding to the service condition.

7. The method according to claim 6, characterized in that Also includes: In response to the business information satisfying service conditions of multiple branches, branches corresponding to each service condition are executed in parallel.

8. The method according to claim 1, characterized in that Get all interfaces associated with the start interface, including: In response to the selection of the association relationship, all interfaces having the association relationship with the start interface are acquired.

9. The method according to claim 1, characterized in that: Determine the next interface based on business information, including: The tag data of the service information is determined, and a next interface is determined by matching all interfaces associated with the start interface according to the tag data.

10. The method according to claim 9, characterized in that Determine the tag data of the business information, including: Obtain each attribute type in the business information and determine the label corresponding to the attribute type; According to the business scenario of the business request, the interval data corresponding to the tag is obtained, and the tag and the interval data are used as tag data.

11. The method according to claim 10, characterized in that: Also includes: Generate a corresponding expression according to the label data; Using the expression to operate on all interfaces associated with the start interface, to obtain a return result; In response to the returned result being true, the next interface is determined.

12. The method according to claim 1, characterized in that Configure the interface relationship between the start interface and the next interface, including: Obtain configuration information of the start interface and the next interface respectively, and determine the relationship type between the start interface and the next interface; And according to the service information, the interface protocols of the starting interface and the next interface are determined.

13. The method according to claim 1, characterized in that Identify the next interface type as an end interface, including: Determine the service type based on the service information, and call the end interface set corresponding to the service type; In the end interface set, if the next interface exists in the query, the next interface is determined to be the end interface.

14. The method according to any one of claims 1 to 13, characterized in that: Also includes: Obtain the execution count of the interface, and determine whether the execution count is greater than the preset executable count; If yes, an exception is thrown to terminate the interface call configuration; if no, the interface is determined to be the next interface.

15. An interface calling device, characterized in that: include: The startup module is used to receive a service request, obtain service information, and call the start interface set to obtain the corresponding start interface based on the service information match; A first generating module is used to obtain all interfaces associated with the starting interface, determine the next interface according to the service information, and configure the interface relationship between the starting interface and the next interface; The second generation module is used to execute cyclically: obtaining all interfaces associated with the next interface, determining the next interface according to the service information, and configuring the interface relationship between the next interface and the next interface; Until the next interface type is identified as an end interface in response, the interface call configuration is completed and the service execution program is generated.

16. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 14.

17. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.

18. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 14 is implemented.