CN115033233A - Interface calling method and device, electronic equipment and storage medium - Google Patents

Interface calling method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115033233A
CN115033233A CN202210688086.6A CN202210688086A CN115033233A CN 115033233 A CN115033233 A CN 115033233A CN 202210688086 A CN202210688086 A CN 202210688086A CN 115033233 A CN115033233 A CN 115033233A
Authority
CN
China
Prior art keywords
interface
parameter
called
input
configuration
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
CN202210688086.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.)
Beijing Jingdong Zhenshi Information Technology Co Ltd
Original Assignee
Beijing Jingdong Zhenshi Information Technology 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 Beijing Jingdong Zhenshi Information Technology Co Ltd filed Critical Beijing Jingdong Zhenshi Information Technology Co Ltd
Priority to CN202210688086.6A priority Critical patent/CN115033233A/en
Publication of CN115033233A publication Critical patent/CN115033233A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04845Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range for image manipulation, e.g. dragging, rotation, expansion or change of colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The embodiment of the invention discloses an interface calling method and device, electronic equipment and a storage medium. The method comprises the following steps: responding to an interface calling instruction, acquiring an interface to be called and inputting input parameters; performing structure conversion on input parameters based on the parameter description information of the interface to be called to obtain interface parameter, and transmitting the interface parameter to the interface to be called; receiving interface output parameters returned by the interface to be called based on the received interface input parameters, and performing structure conversion on the interface output parameters based on the output parameter description information of the interface to be called to obtain output parameters; the method comprises the steps that an input parameter structure, a configuration input parameter, an output parameter structure and a configuration output parameter of an interface to be called are obtained in the process of configuring the interface to be called, input parameter description information is obtained through analyzing and configuring the input parameter by the input parameter structure, and the output parameter description information is obtained through analyzing and configuring the output parameter by the output parameter structure. The technical scheme of the embodiment of the invention realizes the interface calling function.

Description

Interface calling method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to an interface calling method and device, electronic equipment and a storage medium.
Background
In recent years, with the development of enterprise digital transformation and cloud computing, the low-code platform becomes a hot topic, and each large internet company also successively launches its own low-code platform. Compared with the prior native development mode of manually written codes, the low-code development can obviously improve the development efficiency.
In the process of implementing the invention, the inventor finds that the following technical problems exist in the prior art: the existing low-code development platform cannot support interface calling, which has a certain influence on development efficiency.
Disclosure of Invention
The embodiment of the invention provides an interface calling method, an interface calling device, electronic equipment and a storage medium, so as to realize an interface calling function.
According to an aspect of the present invention, there is provided an interface calling method, which may include:
responding to an interface calling instruction, acquiring an interface to be called and inputting input parameters;
performing structure conversion on input parameters based on the parameter description information of the interface to be called to obtain interface parameter, and transmitting the interface parameter to the interface to be called;
receiving interface output parameters returned by the interface to be called based on the received interface input parameters, and performing structure conversion on the interface output parameters based on the output parameter description information of the interface to be called to obtain output parameters;
the method comprises the steps that a parameter entering structure, a parameter configuration entering structure, a parameter exiting structure and a parameter configuration exiting structure of an interface to be called are obtained in the process of configuring the interface to be called, parameter entering description information is obtained through parameter entering structure analysis configuration parameter entering, and parameter exiting description information is obtained through parameter exiting structure analysis configuration parameter exiting.
Optionally, the parameter embedding structure includes a parameter embedding nested structure, and parameter embedding path information configured with parameters is stored in the parameter embedding description information;
performing structure conversion on the input parameter based on the parameter description information of the interface to be called to obtain an interface parameter, which may include:
and acquiring a parameter input final-stage path according to parameter input path information in parameter input description information of the interface to be called, and filling input parameters into the parameter input final-stage path configured with parameters to obtain interface parameters.
On this basis, optionally, at least two pieces of entry path information are stored in the entry description information;
obtaining a parameter input last-stage path according to parameter input path information in parameter input description information of an interface to be called, and filling input parameters into a parameter input last-stage path configured with parameters to obtain interface parameters, which may include:
for each piece of entry path information in entry description information of an interface to be called, acquiring an entry final-stage path according to the entry path information;
filling matched input parameters matched with the input parameter path information in the input parameters into a parameter final stage path configured with the input parameters to obtain the filled input parameters;
and merging the filling input parameters to obtain the interface input parameters.
Optionally, the interface call instruction is generated when the bound component that has completed the interface binding is triggered;
responding to the interface calling instruction, acquiring the interface to be called, which may include:
responding to the interface calling instruction, and acquiring a bound component corresponding to the interface calling instruction;
and determining a binding interface bound for the bound component in the process of configuring the interface to be called, and taking the binding interface as the interface to be called.
On the basis, optionally, when the bound component is composed of the search condition input component, the search component and the search result presentation component, the interface call instruction is generated under the condition that the search component in the bound component is triggered.
Optionally, the interface to be called is configured by the following steps:
responding to an interface registration instruction aiming at an interface to be registered and called, and acquiring interface registration information, wherein the interface registration information comprises configuration input parameters and configuration output parameters;
taking an interface to be called to be registered as an interface to be registered;
and registering the interface to be registered based on the interface registration information to obtain a registered interface, so as to obtain a configured interface to be called according to the registered interface.
On this basis, an optional registration of the interface to be registered based on the interface registration information may include:
acquiring a parameter entering structure input aiming at an interface to be registered in advance;
and responding to the verification that the configuration format of the configuration embedded parameter is correct based on the parameter embedding structure, and registering the interface to be registered based on the interface registration information.
On this basis, optionally, after responding to verification that the configuration format of the configuration join is correct based on the join structure, the interface invoking method may further include:
analyzing the configuration access parameter through the access parameter structure to obtain access parameter description information, and displaying the obtained access parameter description information;
and responding to an information adjusting instruction acted on the displayed participation description information, adjusting the participation description information, and updating the participation description information according to an adjusting result.
Optionally, the interface registration information may further include an interface path of the interface to be registered, and the interface calling method may further include:
acquiring an interface registration application;
registering the interface to be registered based on the interface registration information may include:
and registering the interface to be registered based on the interface registration information in response to the interface path not being registered under the interface registration application.
Still optionally, obtaining the configured to-be-called interface according to the registered interface may include:
and responding to the interface binding instruction aiming at the registered interface, acquiring the component to be bound, and binding the component to be bound and the registered interface to obtain the configured interface to be called.
On this basis, optionally, before responding to the interface binding instruction for the registered interface, the interface calls the method, which may further include:
acquiring an object role of an interface configuration object configuring an interface to be called, determining a controllable component which can be controlled by the object role, and displaying the controllable component;
and responding to a component dragging instruction triggered by the interface configuration object, determining a component to be dragged from the displayed controllable components, and displaying the component to be dragged on a target position of a target page, wherein the component to be bound belongs to the component to be dragged displayed on the target position.
According to another aspect of the present invention, there is provided an interface calling apparatus, which may include:
the input parameter acquiring module is used for responding to the interface calling instruction, acquiring the interface to be called and inputting parameters;
the interface input parameter transferring module is used for performing structure conversion on input parameters based on the input parameter description information of the interface to be called to obtain interface input parameters and transferring the interface input parameters to the interface to be called;
the output parameter obtaining module is used for receiving the interface parameter of the interface to be called returned based on the received interface parameter, and performing structure conversion on the interface parameter based on the parameter description information of the interface to be called to obtain the output parameter;
the method comprises the steps that a parameter entering structure, a parameter configuration entering structure, a parameter exiting structure and a parameter exiting structure of an interface to be called are obtained in the process of configuring the interface to be called, parameter entering description information is obtained through parameter entering structure analysis configuration parameter entering, and parameter exiting description information is obtained through parameter exiting structure analysis configuration parameter exiting.
According to another aspect of the present invention, there is provided an electronic device, which may include:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform the interface call method provided by any of the embodiments of the present invention when executed.
According to another aspect of the present invention, there is provided a computer readable storage medium having stored thereon computer instructions for causing a processor to implement an interface invocation method provided by any of the embodiments of the present invention when executed.
According to the technical scheme of the embodiment of the invention, the interface to be called and the input parameter are obtained by responding to the interface calling instruction; the input parameter description information of the interface to be called is obtained by analyzing the configuration parameter of the interface to be called through the parameter structure of the interface to be called, so that the input parameter is subjected to structure conversion based on the parameter description information, the interface parameter which can be directly applied by the interface to be called is obtained, and the interface parameter is transmitted to the interface to be called; and similarly, because the parameter output description information of the interface to be called is obtained by analyzing the configuration parameter output of the interface to be called through the parameter output structure of the interface to be called, the structure conversion is carried out on the parameter output of the interface based on the parameter output description information, so that the output parameter output which can be directly applied by the interface calling party of the interface to be called is obtained, and the interface calling process is completed. According to the technical scheme, the access parameter description information is used as an intermediate medium, the structure conversion of input access parameters and interface access parameters is realized, so that the interface calling process is realized, and particularly, the unified calling process of various interfaces is realized under the condition that the access parameter structures of various interfaces possibly have differences.
It should be understood that the statements in this section do not necessarily identify key or critical features of any embodiment of the present invention, nor do they necessarily limit the scope of the present invention. Other features of the present invention will become apparent from the following description.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart of an interface calling method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another interface calling method provided in accordance with an embodiment of the present invention;
fig. 3 is a schematic diagram of interface registration in another interface calling method according to an embodiment of the present invention;
FIG. 4 is a flow chart of another interface calling method provided in accordance with an embodiment of the present invention;
FIG. 5 is a diagram illustrating component authority control in another interface calling method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of component dragging in another interface calling method according to an embodiment of the present invention;
FIG. 7a is a flow diagram of an alternative example of another interface invocation method provided in accordance with an embodiment of the present invention;
FIG. 7b is a framework diagram providing an alternative example of another interface invocation method according to an embodiment of the present invention;
fig. 8 is a block diagram illustrating an interface calling apparatus according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of an electronic device implementing the interface calling method according to the embodiment of the present invention.
Detailed Description
In order to make those skilled in the art better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, shall fall within the protection scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. The cases of "target", "original", etc. are similar and will not be described in detail herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Fig. 1 is a flowchart of an interface calling method provided in an embodiment of the present invention. The embodiment can be suitable for the condition of interface calling, and is particularly suitable for the condition of uniformly calling various interfaces. The method can be executed by the interface calling device provided by the embodiment of the invention, the device can be realized by software and/or hardware, the device can be integrated on electronic equipment, and the equipment can be various user terminals or servers.
Referring to fig. 1, the method of the embodiment of the present invention specifically includes the following steps:
and S110, responding to the interface calling instruction, acquiring the interface to be called and inputting the input parameter.
The interface call instruction may be an instruction for calling the interface to be called, and in an actual application, optionally, the interface call instruction may be generated when a page, a component, an event, or the like bound to the interface to be called is triggered. The Interface to be called may be understood as an Application Programming Interface (API) to be called. The input parameter may be understood as a parameter input by the interface calling object of the interface to be called to call the interface to be called, and for example, assuming that the backend service connected to the interface to be called is a search service, the input parameter may be a search condition, such as a commodity keyword input on an e-commerce platform. And responding to the interface calling instruction, and acquiring the interface to be called and the input parameter.
And S120, performing structure conversion on input access parameters based on the access parameter description information of the interface to be called to obtain interface access parameters, and transmitting the interface access parameters to the interface to be called, wherein the access parameter description information is obtained by analyzing the configuration access parameters of the interface to be called through the access parameter structure of the interface to be called, and the access parameter structure and the configuration access parameters are obtained in the process of configuring the interface to be called.
The study finds that the parameter input structure of the input parameter and the parameter input structure of the interface parameter capable of being applied by the interface to be called may have differences, for example, the input parameter is a flattened structure, that is, a structure without nesting relation, and the interface parameter is a nested structure, for example, a structure of an object nested object or an object nested array; furthermore, there may be differences in the parameter structures of the interface parameters of different interfaces, for example, the interface parameter of interface 1 may be a three-layer nested structure, and the interface parameter of interface 2 may be a four-layer nested structure. On the basis, in order to realize the unified calling process of various interfaces, the technical scheme is provided for performing structure conversion on input parameters based on the parameter description information of the interface to be called to obtain the interface parameters of the interface to be called, so that the calling process of the interface to be called is realized based on the interface parameters. In particular, the method comprises the following steps of,
the parameter configuration description information can be obtained by analyzing the parameter configuration through a parameter configuration structure. The entry structure may be obtained in the process of configuring the interface to be called, for example, a structure of the interface configuration object for configuring the entry for entry in the process of configuring the interface to be called is used as the entry structure. In practical applications, the reference structure may be identical to the reference structure understood by the interface to be called, or may be one or more of the reference structures understood by the interface to be called, and the like, and is not specifically limited herein. The configuration entry parameter may be an entry parameter configured by the interface configuration object according to an entry parameter structure of the interface to be called in the process of configuring the interface to be called, so that the entry parameter description information obtained by analyzing the configuration entry parameter through the entry parameter structure can accurately describe detailed information of the configuration entry parameter, for example, the configuration entry parameter includes several paths (paths), several layers of nesting under each path, what type of information under each layer is, or whether information under each layer is default information or blank information.
As can be seen from the above, the entry parameter description information may be understood as description information of a configuration entry parameter, and the configuration entry parameter is obtained by configuring an entry parameter structure that can be understood by an interface to be called, so that the interface entry parameter obtained by performing structure conversion on the input entry parameter based on the entry parameter description information may be considered as an entry parameter that can be directly applied by the interface to be called.
And transferring the interface input parameters to the interface to be called so that the interface to be called transfers the received interface input parameters to the background service connected with the interface to be called, and then returning the service result returned by the received rear service to the interface caller of the interface to be called as the interface output parameters.
S130, receiving interface output parameters returned by the interface to be called based on the received interface input parameters, and performing structure conversion on the interface output parameters based on the output parameter description information of the interface to be called to obtain output parameters, wherein the output parameter description information is obtained by analyzing the configuration output parameters of the interface to be called through the output parameter structure of the interface to be called, and the output parameter structure and the configuration output parameters are obtained in the process of configuring the interface to be called.
Similar to the entry-participation related content stated in the previous step, the entry-participation structure of the interface exit participation returned by the interface to be called may be different from the entry-participation structure understandable by the interface caller, so that the structure of the interface exit participation is converted based on the entry-participation description information of the interface to be called, and the output entry participation matched with the entry-participation structure understandable by the interface caller is obtained. In particular, the method comprises the following steps of,
the parameter configuration description information can be obtained by analyzing the configuration parameters through a parameter configuration structure. The parameter configuration structure may be obtained in the process of configuring the interface to be called, for example, a structure of the interface configuration object for configuring the parameter input in the process of configuring the interface to be called is used as the parameter configuration structure. In practical applications, the out-reference structure may be completely the same as the out-reference structure understood by the to-be-called interface, or one or more out-reference structures understood by the to-be-called interface, and the like, and is not specifically limited herein. The configuration parameter may be a parameter configured by the interface configuration object according to a parameter structure of the interface to be called in the process of configuring the interface to be called, so that the parameter description information obtained by analyzing the configuration parameter through the parameter structure can accurately describe detailed information of the configuration parameter, for example, the configuration parameter includes several paths (paths), several layers of nesting under each path, what type of information under each layer is, or whether information under each layer is default information or blank information.
As can be seen from the above, the configuration parameter description information may be understood as configuration parameter description information, and the configuration parameter is obtained by configuring a parameter output structure that can be understood by an interface to be called, so that the interface parameter obtained by performing structure conversion on the output parameter based on the parameter output description information may be considered as a parameter that can be directly applied by a called interface.
And after the output parameter is obtained, ending the calling process of the interface to be called.
According to the technical scheme of the embodiment of the invention, the interface to be called and the input parameter are obtained by responding to the interface calling instruction; the input parameter description information of the interface to be called is obtained by analyzing the configuration parameter of the interface to be called through the parameter structure of the interface to be called, so that the input parameter is subjected to structure conversion based on the parameter description information, the interface parameter which can be directly applied by the interface to be called is obtained, and the interface parameter is transmitted to the interface to be called; and similarly, because the parameter output description information of the interface to be called is obtained by analyzing the configuration parameter output of the interface to be called through the parameter output structure of the interface to be called, the structure conversion is carried out on the parameter output of the interface based on the parameter output description information, so that the output parameter output which can be directly applied by the interface calling party of the interface to be called is obtained, and the interface calling process is completed. According to the technical scheme, the access parameter description information is used as an intermediate medium, and the structure conversion of input access parameters and interface access parameters is realized, so that the interface calling process is realized, and particularly, the unified calling process of various interfaces is realized under the condition that the access parameter structures of various interfaces possibly have differences.
According to an optional technical scheme, the parameter embedding structure comprises a parameter embedding nested structure, and parameter embedding path information for configuring parameter embedding is stored in parameter embedding description information; performing structure conversion on input parameters based on the parameter description information of the interface to be called to obtain interface parameter, which may include: and acquiring a parameter input final-stage path according to parameter input path information in parameter input description information of the interface to be called, and filling input parameters into the parameter input final-stage path configured with parameters to obtain interface parameters. The parameter-entering path information can describe paths of information of each layer configured in parameters with an embedded structure (i.e., parameter-entering embedded structure), and if the parameter-entering embedded structure is an apple element embedded under a fruit object and a variety attribute under the apple element, the parameter-entering path description information can describe paths of information under the fruit object, paths of information under the apple element and paths of information under the variety attribute. And acquiring a reference final-stage path according to the reference path information, such as the path of the information under the variety attribute in the above example. Considering that most input parameters input by the interface calling object are information to be filled into the parameter input final-stage path, the input parameters are filled into the parameter input final-stage path of the configuration parameters, so that the interface parameters matched with the parameter input structure of the configuration parameters are obtained, and the structure conversion process of the input parameters is realized. In practical application, optionally, after the input entry parameter is filled under the entry parameter last-stage path of the configured entry parameter, the filling result can be converted into a json character string by adding quotation marks and curly brackets, and then the json character string is converted into an object by using json.
On this basis, optionally, at least two pieces of parameter entry path information can be stored in the parameter entry description information; obtaining a parameter input last-stage path according to parameter input path information in parameter input description information of an interface to be called, and filling input parameters into a parameter input last-stage path configured with parameters to obtain interface parameters, which may include: for each piece of entry path information in entry description information of an interface to be called, acquiring an entry final-stage path according to the entry path information; filling the matched input parameter matched with the input parameter path information in the input parameter into the parameter final stage path configured with the input parameter to obtain the filled input parameter; and merging the filling input parameters to obtain the interface input parameters. When at least two pieces of parameter input path information are stored in the parameter input description information, for each piece of parameter input path information, matching parameters which are input parameters and matched with the parameter input path information can be filled into a parameter input final-stage path obtained according to the parameter input path information. After the information of each entry path is processed correspondingly, the filling results can be merged to obtain the interface entry. For example, assuming that the fruit object includes an apple element and a pear element, the apple element includes a variety attribute, and the pear element includes a weight attribute, the fruit object-apple element-variety attribute is one parameter entry path, the fruit object-pear element-weight attribute is another parameter entry path, and each parameter entry path corresponds to respective parameter entry path information. On the basis, if the input entered parameter comprises red fuji and 1 kg, the red fuji can be filled in the path of the variety attribute, the 1 kg is filled in the path of the weight attribute, and the two filling results are combined to obtain the interface entered parameter.
It should be noted that, the structure conversion process of input and input references is taken as an example for explanation, the structure conversion process of interface output references is similar, for example, the output reference structure includes a reference nested structure, and reference description information stores reference path information for configuring reference output; performing structure conversion on the interface output parameter based on the output parameter description information of the interface to be called to obtain an output parameter, which may include: and acquiring a parameter last-stage path according to parameter path information in parameter description information of the interface to be called, and taking the last-stage parameter stored under the parameter last-stage path as an output parameter. On this basis, when at least two pieces of parameter information are stored in the parameter description information, obtaining a parameter last stage path according to the parameter last stage information in the parameter description information of the interface to be called, and taking a last stage parameter stored in the parameter last stage path as an output parameter, may include: for each piece of parameter-removing path information in parameter-removing description information of the interface to be called, obtaining a parameter-removing final-stage path according to the parameter-removing path information, and obtaining a final-stage parameter stored under the parameter-removing final-stage path; and combining all final-stage output parameters to obtain output parameters. This pertains to the process of transitioning from a nested structure to a flattened structure of a reference, as opposed to the process of transitioning from a flattened structure to a nested structure of a reference.
Another optional technical scheme is that the interface call instruction is generated under the condition that a bound component which finishes interface binding is triggered; responding to the interface calling instruction, acquiring the interface to be called, which may include: responding to the interface calling instruction, and acquiring a bound component corresponding to the interface calling instruction; and determining a binding interface bound for the bound component in the process of configuring the interface to be called, and taking the binding interface as the interface to be called. In an actual application, the component that is bound with the interface to be called in advance may be a basic component or a basic component in a business component composed of at least two basic components, which is not specifically limited herein. On the basis, when the interface calling instruction is generated under the condition that the bound component which finishes interface binding is triggered, the bound component corresponding to the interface calling instruction can be obtained, then the bound interface which is bound for the bound component in the process of configuring the interface to be called is determined, and the bound interface is used as the interface to be called, so that the effect of accurately determining the interface to be called is achieved.
On this basis, in view of application scenarios that may be involved in the embodiments of the present invention, for example, when the bound component is composed based on the search condition input component, the search component, and the search result presentation component, the interface call instruction is generated in a case where the search component in the bound component is triggered. For example, the user enters a commodity keyword (i.e., enters a reference) in a search condition input component (e.g., a search box) of the e-commerce platform and then clicks a search component (e.g., a search button). In this way, after the interface calling device detects the click event of the search component, it can generate an interface calling instruction for calling the commodity search interface, and after the commodity information (i.e. output parameter) matched with the commodity keyword returned by the commodity search interface is obtained, it can be displayed in the search result display component (e.g. search result display list) for the user to view.
Fig. 2 is a flowchart of another interface calling method provided in the embodiment of the present invention. The present embodiment is optimized based on the above technical solutions. In this embodiment, optionally, the interface to be called may be configured by the following steps: responding to an interface registration instruction aiming at an interface to be registered and called, and acquiring interface registration information, wherein the interface registration information comprises configuration input parameters and configuration output parameters; taking an interface to be called to be registered as an interface to be registered; and registering the interface to be registered based on the interface registration information to obtain a registered interface, so as to obtain a configured interface to be called according to the registered interface. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
Referring to fig. 2, the method of the present embodiment may specifically include the following steps:
s210, responding to the interface registration instruction, and acquiring the interface to be registered and interface registration information of the interface to be registered, wherein the interface registration information comprises configuration in-participation and configuration out-participation.
In practical application, if an interface needs to be called on a certain platform, the interface may be registered on the platform first, or information of the interface (i.e., interface registration information) may be registered on the platform first. Specifically, the interface registration instruction may be an instruction for registering the interface to be registered, and the interface registration information of the interface to be registered and the interface to be registered is obtained in response to the interface registration instruction. In practical applications, the interface registration information may optionally include configuration in-parameter and configuration out-parameter, and may further include an interface name, a request type, and the like, which are not specifically limited herein.
S220, registering the interface to be registered based on the interface registration information to obtain a registered interface, and obtaining a configured callable interface according to the registered interface.
The interface to be registered is registered based on the interface registration information to obtain a registered interface, and then a configured interface which can be called and is configured can be obtained according to the registered interface, so that the interface configuration process is completed. The configured interface described above may also be referred to as a callable interface. In practical applications, optionally, in order to ensure the security of interface calling, when at least two applications are developed on the platform, the interface registration application may be obtained from the at least two applications according to the interface registration instruction, and then the interface to be registered is registered in the interface registration application, so that the interface to be called corresponding to the interface to be registered can only be called by the interface registration application and cannot be called by other applications, thereby ensuring the calling security of the interface to be called.
And S230, responding to the interface calling instruction, and acquiring the interface to be called and the input parameter, wherein the interface to be called is the interface to be called in each interface.
S240, carrying out structure conversion on input entry parameters based on entry parameter description information to obtain interface entry parameters, and transmitting the interface entry parameters to an interface to be called, wherein the entry parameter description information is obtained by analyzing the configuration entry parameters of the interface to be called through an entry parameter structure of the interface to be called obtained in the process of configuring the interface to be called.
The configuration entry of the interface to be called can be understood as the configuration entry of the interface to be registered obtained in the process of registering the interface to be registered corresponding to the interface to be called.
And S250, receiving interface output parameters returned by the to-be-called interface based on the received interface input parameters, and performing structure conversion on the interface output parameters based on the output parameter description information to obtain output parameters, wherein the output parameter description information of the to-be-called interface is obtained by analyzing the configuration output parameters of the to-be-called interface through the output parameter structure of the to-be-called interface obtained in the process of configuring the to-be-called interface.
The configuration parameter of the interface to be called can be understood as the configuration parameter of the interface to be registered obtained in the process of registering the interface to be registered corresponding to the interface to be called.
According to the technical scheme of the embodiment of the invention, the interface to be registered is registered according to the interface registration information of the interface to be registered by responding to the interface registration instruction to obtain the registered interface, so that the configured callable interface is obtained according to the registered interface, and the interface configuration process is realized.
An optional technical solution, registering an interface to be registered based on interface registration information, may include: acquiring a parameter entering structure input aiming at an interface to be registered in advance; and registering the interface to be registered based on the interface registration information in response to the fact that the configuration format of the configuration embedded parameter is correct based on the embedded parameter structure verification. The parameter configuration structure may be a parameter configuration structure matched with the interface to be registered, which is input by the interface configuration object in the interface configuration process, and is used to verify whether the configuration format of the subsequently input configuration parameter is correct. Therefore, after the configuration access parameter is acquired, the configuration format of the configuration access parameter can be verified based on the previously acquired access parameter structure, and after the verification is passed, the subsequent interface registration process is executed. Considering the application scenarios that may be involved in the embodiments of the present invention, for example, assuming that the configuration arguments are represented by Josn objects, the pre-input argument structures may be placed in Json Editr, so as to verify whether the configuration format of the Josn objects is correct based on the argument structures in the Json Editr. If the configuration format is incorrect, the corresponding line number in the Json Editr can be marked and prompted; if the configuration format is correct, the subsequent interface registration process is executed. After the interface registration is completed, the corresponding interface registration information can be stored in a database.
It should be noted that, the configuration format verification process of the configuration entry is described as an example, and the configuration format verification process of the configuration exit is similar, for example, registering the to-be-registered interface based on the interface registration information may include: acquiring a parameter output structure input aiming at an interface to be registered in advance; and registering the interface to be registered based on the interface registration information in response to the fact that the configuration format of the configured parameter is correct based on the parameter configuration structure. In practical application, optionally, the subsequent interface registration process may be executed under the condition that both the configuration format of the configuration entry participant and the configuration format of the configuration exit participant are correct.
On this basis, optionally, after verifying that the configuration format of the configuration join is correct based on the join structure, the interface invoking method may further include: analyzing the configured access parameter through the access parameter structure to obtain access parameter description information, and displaying the obtained access parameter description information; and responding to an information adjusting instruction acted on the displayed participation description information, adjusting the participation description information, and updating the participation description information according to an adjusting result. The displayed parameter entering description information can enable the interface configuration object to very intuitively determine the specific condition of the configuration parameter entered by the interface configuration object, so that the configuration parameter entering can be adjusted by adjusting (such as adding, deleting and modifying) the parameter entering description information according to the actual configuration requirement of the interface configuration object, and the flexibility is good. Illustratively, when the interface configuration object needs to bold the input entry parameter, the no in the bold attribute can be adjusted to the yes, so as to achieve the purpose of bold display of the input entry parameter. In practical applications, the parsing and displaying process described above may be implemented based on a Json Schema that may be used to describe the data structure of the Json object.
To more visually understand the interface registration process set forth above, for example, referring to the interface registration diagram shown in fig. 3, the top half of the diagram shows interface registration information that needs to be input by an interface configuration object, such as an interface name, a request type, an interface path, a configuration entry and a configuration exit, and the bottom half of the diagram shows Json Editr for showing an entry structure, Json Schema Editor for showing a configuration entry and Json Schema View for showing entry description information.
Another optional technical solution is that the interface registration information further includes an interface path of an interface to be registered, and the interface calling method may further include: acquiring an interface registration application; registering the interface to be registered based on the interface registration information may include: and responding to the interface path which is not registered under the interface registration application, and registering the interface to be registered based on the interface registration information. The interface to be registered only needs to be registered once under the interface registration application, so that before the interface registration, whether the interface path of the interface to be registered is registered under the interface registration application can be determined, and if so, prompt information can be given to avoid repeated registration; otherwise, a subsequent interface registration procedure may be performed.
Fig. 4 is a flowchart of another interface calling method provided in the embodiment of the present invention. The present embodiment is optimized based on the above technical solutions. In this embodiment, optionally, obtaining the configured interface to be called according to the registered interface may include: and responding to the interface binding instruction aiming at the registered interface, acquiring the component to be bound, and binding the component to be bound and the registered interface to obtain the configured interface to be called. The same or corresponding terms as those in the above embodiments are not explained in detail herein.
Referring to fig. 4, the method of this embodiment may specifically include the following steps:
s310, responding to the interface registration instruction, and acquiring the interface to be registered and interface registration information of the interface to be registered, wherein the interface registration information comprises configuration in-participation and configuration out-participation.
And S320, registering the interface to be registered based on the interface registration information to obtain a registered interface.
S330, responding to the interface binding instruction aiming at the registered interface, acquiring the component to be bound, and binding the component to be bound and the registered interface to obtain the configured interface to be called.
The interface binding instruction is used for binding the registered interface and the to-be-bound component, the to-be-bound component needing to call the registered interface is obtained in response to the interface binding instruction, and then the to-be-bound component and the registered interface are bound, so that the configured to-be-called interface is obtained. In practical applications, optionally, the component to be bound may be a basic component or a basic component in a business component composed of at least two basic components. Optionally, when the component to be bound and the registered interface are bound, the registered interface may be directly bound to the component to be bound, or may be bound to a certain trigger event of the component to be bound, and the like, which is not specifically limited herein. Illustratively, as in the search example described above, the item search interface can be tied to click events of the search component.
And S340, responding to the interface calling instruction, and acquiring the interface to be called and the input parameter, wherein the interface to be called is the interface to be called in each interface.
And S350, performing structure conversion on the input access parameters based on the access parameter description information to obtain interface access parameters, and transmitting the interface access parameters to the interface to be called, wherein the access parameter description information is obtained by analyzing the configuration access parameters of the interface to be called through the access parameter structure of the interface to be called obtained in the process of configuring the interface to be called.
And S360, receiving interface output parameters returned by the interface to be called based on the received interface input parameters, and performing structure conversion on the interface output parameters based on the output parameter description information to obtain output parameters, wherein the output parameter description information of the interface to be called is obtained by analyzing the configuration output parameters of the interface to be called through the output parameter structure of the interface to be called obtained in the process of configuring the interface to be called.
According to the technical scheme of the embodiment of the invention, the registered interface is bound with the component to be bound, which needs to call the registered interface, so that the configured callable interface is obtained.
Before the following technical solutions are introduced, an application scenario of the following technical solutions is exemplarily described. For example, to implement the interface binding process, the interface configuration object may first determine what components the registered interface needs to be bound to, and then drag the components onto the target page to interface the components exposed on the target page. The components may be pre-developed and/or interface configuration object-customized components, and are not specifically limited herein. To implement the component drag function, the first premise is that the component can be browsed by the interface configuration object. In practical application, optionally, the related code of the component may be uploaded to the component library, and then the component and the component attribute thereof are registered, so that the component may be presented in the component library, so that the interface configuration object may browse the component. On the basis, in order to realize the safety management of the components, the authority control can be carried out on the components, for example, the control authority is distributed to the components, and the control authority is associated with the object role, so that the object role of the object can be configured according to the interface, and the control of the components can be determined. Illustratively, referring to FIG. 5, a component entitlement control process is illustrated, where a component is entitlement controlled by configuring the component with a role name, role fields, and component attributes that may be selected.
An optional technical solution, where before responding to an interface binding instruction for a registered interface, the interface calls a method, may further include: acquiring an object role of an interface configuration object configuring an interface to be called, determining a controllable component which can be controlled by the object role, and displaying the controllable component; and responding to an assembly dragging instruction triggered by the interface configuration object, determining an assembly to be dragged from the displayed controllable assemblies, and displaying the assembly to be dragged on a target position of a target page, wherein the assembly to be bound belongs to the assembly to be dragged displayed on the target position. As described above, in order to implement the secure management of the components, control rights may be assigned to each component, and the control rights may be associated with the object roles. On the basis, when the object role of the interface configuration object is obtained, the controllable components which can be controlled by the object role can be determined, namely the controllable components which can be controlled by the interface configuration object are determined, and the controllable components are shown, so that the interface configuration object can browse to and control the controllable components. The component dragging instruction may be an instruction triggered by the interface configuration object and used for dragging a component to be dragged among the controllable components to a target position of the target page, and the component to be dragged is dragged and displayed on the target position in response to the component dragging instruction. The above-described target page may also be understood as a page generated by component drag. Illustratively, still taking the search example above as an example, see fig. 6, this is a schematic diagram of dragging and presenting the search condition input component, the search component, and the search result presentation component onto the target page. On the basis, the interface configuration object can perform interface binding on the displayed component to be dragged (namely the component to be bound).
It should be noted that the nature of the above related expressions, such as the interface to be called, the interface to be registered, and the registered interface, is an interface, and here, different names are only performed to distinguish the interfaces in different application scenarios, and the substance content of the interfaces is not specifically limited. The nature of the above related expressions of the bound component, the component to be bound, the component to be dragged, the controllable component and the like is the component, and the situation is similar.
In order to better understand the above technical solution as a whole, the flowchart shown in fig. 7a and the frame diagram shown in fig. 7b are combined for exemplary explanation. It should be noted that, for simplicity of description, interfaces or components in different application scenarios are not distinguished, and are collectively described as interfaces or components. For example, referring to fig. 7a, to implement the interface registration function, interface registration information input by an interface configuration object is obtained, and json verification is performed on configuration entry and configuration exit in the interface registration information. If the verification fails, outputting a prompt message of a json format error; otherwise, it may be verified whether an interface has been registered based on the interface path in the interface registration information. If yes, outputting the registered prompt information of the interface; otherwise, registering the interface into the database, thereby completing the interface registration function. And generating a page based on the component dragged by the interface configuration object, and binding an interface for the component dragged to the page, thereby completing the interface configuration process. In the interface calling process, input parameters input by an interface calling object are obtained, the input parameters are placed into the whereBy object, the input parameters in the whereBy object are converted into interface input parameters really required by an interface by a node-based middleware, and then the interface is called by the node. If the interface calling fails, outputting prompt information of wrong interface calling; otherwise, interface output parameters returned by the interface are obtained, the interface output parameters are continuously flattened based on the middleware, and the processing result is returned to the front end for page rendering, so that the unified calling flow of various interfaces is realized. It should be noted that the middleware illustrated in the example can be understood as an intermediate conversion method for performing structural conversion of access references based on the description information.
Further exemplarily, as shown in fig. 7b, the interface calling system includes three parts, namely a presentation end, an implementation layer and a database, wherein the implementation layer includes two parts, namely a front-end service part and a back-end service part. Specifically, in the implementation layer, for the business components and the basic components stored in the component library, functions such as dragging, visual editing, authority control and the like of the components can be triggered based on related operations of the interface configuration object; besides, the functions of version management, import and export, middleware calling and the like of the interface can be realized. The database stores interface registration information, which can be used during interface calling. The output parameter obtained after flattening processing is carried out on the interface output parameter returned after the interface calling can be displayed on the PC end for the user to check. Therefore, all parts in the interface calling system are matched with each other, and the unified calling flow and the component authority control function of various interfaces are effectively realized.
Fig. 8 is a block diagram illustrating an interface calling apparatus according to an embodiment of the present invention, where the apparatus is configured to execute an interface calling method according to any of the above embodiments. The device and the interface calling method of the embodiments belong to the same inventive concept, and details which are not described in detail in the embodiments of the interface calling device may refer to the embodiments of the interface calling method. Referring to fig. 8, the apparatus may specifically include: an input parameter acquiring module 410, an interface parameter transferring module 420 and an output parameter acquiring module 430. Wherein the content of the first and second substances,
an input parameter acquiring module 410, configured to respond to an interface calling instruction, acquire an interface to be called and input parameters;
the interface input parameter transferring module 420 is configured to perform structure conversion on input parameters based on the input parameter description information of the interface to be called, obtain interface input parameters, and transfer the interface input parameters to the interface to be called;
an output parameter obtaining module 430, configured to receive an interface parameter returned by the to-be-called interface based on the received interface parameter, and perform structure conversion on the interface parameter based on parameter description information of the to-be-called interface to obtain an output parameter;
the method comprises the steps that a parameter entering structure, a parameter configuration entering structure, a parameter exiting structure and a parameter exiting configuration of an interface to be called are obtained in the process of configuring the interface to be called, parameter entering description information is obtained through parameter entering structure analysis configuration parameter entering, and parameter exiting description information is obtained through parameter exiting structure analysis configuration parameter exiting.
Optionally, the parameter embedding structure includes a parameter embedding nested structure, and parameter embedding path information configured with parameters is stored in the parameter embedding description information; the interface entry transfer module 420 may include:
and the interface parameter obtaining unit is used for obtaining a parameter input final-stage path according to parameter input path information in parameter input description information of the interface to be called, and filling input parameters into the parameter input final-stage path configured with the parameters to obtain the interface parameter.
On this basis, optionally, at least two pieces of entry path information are stored in the entry description information;
the interface access unit may include:
the parameter last-stage path obtaining subunit is used for obtaining a parameter last-stage path according to parameter last-stage path information for each parameter last-stage path information in the parameter description information of the interface to be called;
the parameter filling acquisition subunit is used for filling the matched parameter input in the parameter input path matched with the parameter input path information into a parameter filling final-stage path configured with the parameter input to acquire a parameter filling parameter;
and the interface parameter input acquisition subunit is used for merging the input parameters to obtain the interface parameter input.
Optionally, the interface call instruction is generated when the bound component that has completed the interface binding is triggered;
the input parameter acquiring module 410 may include:
the bound component acquiring unit is used for responding to the interface calling instruction and acquiring a bound component corresponding to the interface calling instruction;
and the first obtaining unit of the interface to be called is used for determining a binding interface bound for the bound component in the process of configuring the interface to be called and taking the binding interface as the interface to be called.
On the basis, optionally, when the bound component is composed of the search condition input component, the search component and the search result presentation component, the interface call instruction is generated under the condition that the search component in the bound component is triggered.
Optionally, the interface to be called is configured through the following modules:
the interface registration information acquisition module is used for responding to an interface registration instruction aiming at an interface to be registered and called and acquiring interface registration information, wherein the interface registration information comprises configuration input parameters and configuration output parameters;
the interface to be registered obtaining module is used for taking the interface to be registered and called as the interface to be registered;
and the interface to be called obtaining module is used for registering the interface to be registered based on the interface registration information to obtain a registered interface so as to obtain a configured interface to be called according to the registered interface.
On this basis, an optional interface obtaining module to be called may include:
the device comprises a parameter configuration acquisition unit, a parameter configuration acquisition unit and a parameter configuration acquisition unit, wherein the parameter configuration acquisition unit is used for acquiring a parameter configuration input aiming at an interface to be registered in advance;
and the interface registration first unit is used for registering the interface to be registered based on the interface registration information in response to the fact that the configuration format of the configuration access parameter is correct based on the access parameter structure verification.
On this basis, optionally, the interface to be called obtains the module, and may further include:
the parameter configuration description information display unit is used for analyzing the configuration parameter through the parameter configuration structure after responding to the condition that the configuration format of the configuration parameter is correct based on the parameter configuration structure verification, obtaining parameter configuration description information and displaying the obtained parameter configuration description information;
and the parameter description information updating unit is used for responding to the information adjusting instruction acted on the displayed parameter description information, adjusting the parameter description information and updating the parameter description information according to the adjusting result.
Optionally, the interface registration information further includes an interface path of the interface to be registered, and the module for obtaining the interface to be called may include:
an interface registration application acquisition unit for acquiring an interface registration application;
and the interface registration second unit is used for registering the interface to be registered based on the interface registration information in response to the fact that the interface path is not registered under the interface registration application.
Still optionally, the interface to be called obtaining module may include:
and the second obtaining unit of the interface to be called is used for responding to the interface binding instruction aiming at the registered interface, obtaining the component to be bound, and binding the component to be bound and the registered interface to obtain the configured interface to be called.
On this basis, optionally, the interface to be called obtains the module, and may further include:
the controllable component display unit is used for acquiring an object role of an interface configuration object configuring the interface to be called before responding to the interface binding instruction aiming at the registered interface, determining a controllable component which can be controlled by the object role, and displaying the controllable component;
and the to-be-dragged component display unit is used for responding to a component dragging instruction triggered by the interface configuration object, determining a to-be-dragged component from the displayed controllable components, and displaying the to-be-dragged component on a target position of a target page, wherein the to-be-bound component belongs to the to-be-dragged component displayed on the target position.
The interface calling device provided by the embodiment of the invention responds to an interface calling instruction through the input access parameter acquisition module to acquire an interface to be called and input access parameters; the input parameter description information of the interface to be called is obtained by analyzing the configuration parameter of the interface to be called through the parameter structure of the interface to be called, so that the input parameter is subjected to structural conversion through the interface parameter transmission module based on the parameter description information, thereby obtaining the interface parameter which can be directly applied by the interface to be called, and transmitting the interface parameter to the interface to be called; and similarly, because the parameter output description information of the interface to be called analyzes the configuration parameter output of the interface to be called through the parameter output structure of the interface to be called, the structure conversion is carried out on the parameter output of the interface based on the parameter output description information, so that the output parameter which can be directly applied by the interface calling party of the interface to be called is obtained, and the interface calling process is completed. The device realizes the structure conversion of input parameter and interface parameter by taking the input parameter description information as an intermediate medium, thereby realizing the interface calling process, and particularly realizing the uniform calling flow of various interfaces under the condition that the input parameter and the output parameter structures of various interfaces possibly have differences.
The interface calling device provided by the embodiment of the invention can execute the interface calling method provided by any embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method.
It should be noted that, in the embodiment of the interface invoking device, each included unit and module are only divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
FIG. 9 illustrates a schematic diagram of an electronic device 10 that may be used to implement embodiments of the present invention. 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 assistants, cellular phones, smart phones, wearable devices (e.g., helmets, glasses, watches, etc.), 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 inventions described and/or claimed herein.
As shown in fig. 9, the electronic device 10 includes at least one processor 11, and a memory communicatively connected to the at least one processor 11, such as a Read Only Memory (ROM)12, a Random Access Memory (RAM)13, and the like, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM)12 or the computer program loaded from a storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data necessary for the operation of the electronic apparatus 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
A number of components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, or the like; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
Processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 11 performs the various methods and processes described above, such as interface call methods.
In some embodiments, the interface call method may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the interface call method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the interface call method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a 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 that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. A computer program can execute entirely on a machine, partly on a machine, as a stand-alone software package partly on a machine and partly on a remote machine or entirely on a remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable storage 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. Alternatively, the computer readable storage medium may be a machine readable signal medium. 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 an electronic device 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 a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end 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 (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, 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), blockchain networks, and the internet.
The computing system may include clients and servers. A client and server are generally 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 can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service are overcome.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present invention may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solution of the present invention can be achieved.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. An interface calling method, comprising:
responding to an interface calling instruction, acquiring an interface to be called and inputting input parameters;
performing structure conversion on the input parameters based on the parameter description information of the interface to be called to obtain interface input parameters, and transmitting the interface input parameters to the interface to be called;
receiving interface output parameters returned by the interface to be called based on the received interface input parameters, and performing structure conversion on the interface output parameters based on the output parameter description information of the interface to be called to obtain output parameters;
the method comprises the steps that a parameter entering structure, a parameter configuration entering structure, a parameter exiting structure and a parameter configuration exiting structure of an interface to be called are obtained in the process of configuring the interface to be called, parameter entering description information is obtained by analyzing configuration parameter entering through the parameter entering structure, and parameter exiting description information is obtained by analyzing configuration parameter exiting through the parameter exiting structure.
2. The method according to claim 1, wherein the parameter embedding structure comprises a parameter embedding nesting structure, and parameter embedding path information of the configuration parameter is stored in the parameter embedding description information;
the structural conversion is carried out on the input parameter based on the parameter description information of the interface to be called to obtain an interface parameter, and the method comprises the following steps:
and acquiring a parameter input final-stage path according to the parameter input path information in the parameter input description information of the interface to be called, and filling the input parameter input into the parameter input final-stage path of the configuration parameter input to obtain interface parameter input.
3. The method according to claim 2, wherein at least two pieces of the entry path information are stored in the entry description information;
the obtaining a parameter input final-stage path according to the parameter input path information in the parameter input description information of the interface to be called, and filling the input parameter input into the parameter input final-stage path of the configuration parameter input, to obtain an interface parameter input, including:
acquiring a parameter input final-stage path according to the parameter input path information aiming at each parameter input path information in the parameter input description information of the interface to be called;
filling the matched input parameter matched with the input parameter path information in the input parameter under the parameter final stage path configured with the input parameter to obtain a filled input parameter;
and merging the filling parameters to obtain interface input parameters.
4. The method of claim 1, wherein the interface call instruction is generated if a bound component that has completed an interface binding is triggered;
the step of responding to the interface calling instruction and acquiring the interface to be called comprises the following steps:
responding to an interface calling instruction, and acquiring the bound assembly corresponding to the interface calling instruction;
and determining a binding interface bound for the bound component in the process of configuring the interface to be called, and taking the binding interface as the interface to be called.
5. The method of claim 4, wherein when the bound components are composed based on a search condition input component, a search component, and a search result presentation component, the interface call instruction is generated if the search component in the bound components is triggered.
6. The method of claim 1, wherein the interface to be called is configured by:
responding to an interface registration instruction aiming at the interface to be registered and called, and acquiring interface registration information, wherein the interface registration information comprises the configuration input parameter and the configuration output parameter;
taking the interface to be called to be registered as an interface to be registered;
and registering the interface to be registered based on the interface registration information to obtain a registered interface, so as to obtain the configured interface to be called according to the registered interface.
7. The method according to claim 6, wherein the registering the interface to be registered based on the interface registration information comprises:
acquiring the parameter entering structure input aiming at the interface to be registered in advance;
and in response to the fact that the configuration format of the configuration embedded parameter is correct based on the parameter configuration structure, registering the interface to be registered based on the interface registration information.
8. The method of claim 7, further comprising, after the responding to the verification that the configuration format of the configuration arguments is correct based on the argument structure:
analyzing the configured embedded parameters through the parameter embedding structure to obtain parameter embedding description information, and displaying the obtained parameter embedding description information;
responding to an information adjusting instruction acting on the displayed entry description information, adjusting the entry description information, and updating the entry description information according to an adjusting result.
9. The method according to claim 6, wherein the interface registration information further includes an interface path of the interface to be registered, and the method further includes:
acquiring an interface registration application;
registering the interface to be registered based on the interface registration information includes:
and in response to the interface path not being registered under the interface registration application, registering the interface to be registered based on the interface registration information.
10. The method according to claim 6, wherein the interface to be called configured according to the registered interface comprises:
and responding to an interface binding instruction aiming at the registered interface, acquiring a component to be bound, and binding the component to be bound and the registered interface to obtain the configured interface to be called.
11. The method of claim 10, wherein prior to said responding to the interface binding instruction for the registered interface, further comprising:
acquiring an object role of an interface configuration object configuring the interface to be called, determining a controllable component which can be controlled by the object role, and displaying the controllable component;
and responding to a component dragging instruction triggered by the interface configuration object, determining a component to be dragged from the displayed controllable components, and displaying the component to be dragged on a target position of a target page, wherein the component to be bound belongs to the component to be dragged displayed on the target position.
12. An interface invocation apparatus, comprising:
the input parameter acquiring module is used for responding to the interface calling instruction, acquiring the interface to be called and inputting parameters;
the interface input parameter transmission module is used for carrying out structure conversion on the input parameters based on the input parameter description information of the interface to be called to obtain interface input parameters and transmitting the interface input parameters to the interface to be called;
an output parameter obtaining module, configured to receive an interface parameter returned by the to-be-called interface based on the received interface parameter, and perform structure conversion on the interface parameter based on parameter description information of the to-be-called interface to obtain an output parameter;
the method comprises the steps that a parameter entering structure, a configuration parameter entering structure, a parameter exiting structure and a configuration parameter exiting structure of an interface to be called are obtained in the process of configuring the interface to be called, parameter entering description information is obtained by analyzing the configuration parameter entering through the parameter entering structure, and parameter exiting description information is obtained by analyzing the configuration parameter exiting through the parameter exiting structure.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to cause the at least one processor to perform the interface call method of any of claims 1-11.
14. A computer program product, characterized in that the computer program product comprises a computer program which, when being executed by a processor, implements the interface call method according to any one of claims 1-11.
CN202210688086.6A 2022-06-16 2022-06-16 Interface calling method and device, electronic equipment and storage medium Pending CN115033233A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210688086.6A CN115033233A (en) 2022-06-16 2022-06-16 Interface calling method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210688086.6A CN115033233A (en) 2022-06-16 2022-06-16 Interface calling method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115033233A true CN115033233A (en) 2022-09-09

Family

ID=83124841

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210688086.6A Pending CN115033233A (en) 2022-06-16 2022-06-16 Interface calling method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115033233A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115470770A (en) * 2022-10-31 2022-12-13 思创数码科技股份有限公司 Electronic form template filling method and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115470770A (en) * 2022-10-31 2022-12-13 思创数码科技股份有限公司 Electronic form template filling method and system

Similar Documents

Publication Publication Date Title
US10025567B2 (en) Bot creation with workflow development system
TWI757743B (en) Mini program generation method and device
US11797273B2 (en) System and method for enhancing component based development models with auto-wiring
CN110619555A (en) Unified management method and device for order information, terminal equipment and medium
CN113110963A (en) Service processing method, service processing device, electronic equipment and readable storage medium
CN110070394A (en) Data processing method, system, medium and calculating equipment
Chaudhary et al. The Astounding Relationship: Middleware, Frameworks, and API
CN115509522A (en) Interface arranging method and system for low-code scene and electronic equipment
CN115033233A (en) Interface calling method and device, electronic equipment and storage medium
CN110688581A (en) Information real-time pushing method and device, computing equipment and medium
CN113448570A (en) Data processing method and device, electronic equipment and storage medium
CN113378346A (en) Method and device for model simulation
CN112052152A (en) Simulation test method and device
CN108804442B (en) Serial number generation method and device
CN109840073B (en) Method and device for realizing business process
CN112925519A (en) Workflow creating method and device
EP3912058A1 (en) Profile data store automation via bots
CN113157360B (en) Method, apparatus, device, medium, and article for processing an API
CN112988576B (en) Method and device for determining development process of software project
CN113360460B (en) Favorites sharing method and device
CN115525276A (en) Callback verification method and device
CN113779468A (en) Method and device for processing page interface data
CN115758026A (en) Interaction method and device of application program and network page
CN116071112A (en) Advertisement putting service processing method and device, electronic equipment and storage medium
CN115248768A (en) Test method and device

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