CN117453206A - Interface calling method, device, equipment and medium - Google Patents

Interface calling method, device, equipment and medium Download PDF

Info

Publication number
CN117453206A
CN117453206A CN202311616854.8A CN202311616854A CN117453206A CN 117453206 A CN117453206 A CN 117453206A CN 202311616854 A CN202311616854 A CN 202311616854A CN 117453206 A CN117453206 A CN 117453206A
Authority
CN
China
Prior art keywords
interface
input
message
input message
sending
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
CN202311616854.8A
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.)
Agricultural Bank of China
Original Assignee
Agricultural Bank of China
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 Agricultural Bank of China filed Critical Agricultural Bank of China
Priority to CN202311616854.8A priority Critical patent/CN117453206A/en
Publication of CN117453206A publication Critical patent/CN117453206A/en
Pending legal-status Critical Current

Links

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
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting

Landscapes

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

Abstract

The invention discloses an interface calling method, device, equipment and medium. The interface calling method comprises the following steps: acquiring an input object generated by an interface consumer; performing interface object mapping processing on an input object to obtain an input message, and determining a target interface sending component matched with the input message; and based on the target interface sending component, sending the input message to an interface service side. The technical scheme of the embodiment of the invention greatly reduces the development period of the interface call, reduces the workload of the interface call developer, and ensures that the developer only needs to concentrate on the development of the business logic.

Description

Interface calling method, device, equipment and medium
Technical Field
The present invention relates to the field of interface calling technologies, and in particular, to an interface calling method, apparatus, device, and medium.
Background
When the interface is called between the systems, an interface call developer, such as an interface consumer developer, needs to master the contents of an interface name, an interface field, an interface address, an interface communication mode and the like of an interface service side, and assembles an interface message to send the message according to the communication mode (http, webservice, dubbo, streaming message and the like) of the interface. In the development process, the interface calling developer needs to pay attention to the specific content and format of the interface, and needs to write a large amount of interface message assembly codes, interface sending codes and the like, so that the interface calling has the problems of long development period and high requirement on the professional knowledge of the interface calling developer.
Disclosure of Invention
The invention provides an interface calling method, device, equipment and medium, which are used for solving the problems that the development period is long and the professional knowledge requirement of interface calling developers is high in the conventional interface calling.
According to an aspect of the present invention, there is provided an interface calling method, including:
acquiring an input object generated by an interface consumer;
performing interface object mapping processing on an input object to obtain an input message, and determining a target interface sending component matched with the input message;
and based on the target interface sending component, sending the input message to an interface service side.
According to another aspect of the present invention, there is provided an interface calling device including:
the input object acquisition module is used for acquiring an input object generated by an interface consumer;
the target interface sending component determining module is used for carrying out interface object mapping processing on the input object to obtain an input message and determining a target interface sending component matched with the input message;
and the input message sending module is used for sending the input message to the interface service side based on the target interface sending component.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the interface calling method of any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the interface calling method according to any of the embodiments of the present invention when executed.
According to the technical scheme, the input object generated by the interface consumer is obtained, so that interface object mapping processing is carried out on the input object to obtain the input message, a target interface sending component matched with the input message is determined, and the input message is sent to the interface server based on the target interface sending component. In the scheme, the operation of the interface is converted into the operation of the object, the interface call is completed in an object-oriented mode, the interface call of different communication modes is supported, an interface call developer can not need to know interface contents such as message formats of the interface, call modes of the interface and the like, only need to concentrate on the development of service logic, also does not need to carry out the development of codes such as interface message assembly, interface transmission and the like, the workload of the interface call developer is reduced, the problems that the development period is long in the conventional interface call and the professional knowledge requirement of the interface call developer is high are solved, the development period of the interface call is greatly reduced, the workload of the interface call developer is reduced, and the developer only needs to concentrate on the development of the service logic.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of an interface calling method according to a first embodiment of the present invention;
FIG. 2 is a flowchart of an interface calling method according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of an interface call framework according to a second embodiment of the present invention;
fig. 4 is a session processing timing diagram of an interface call according to a second embodiment of the present invention;
fig. 5 is a schematic structural diagram of an interface calling device according to a third embodiment of the present invention;
fig. 6 shows a schematic diagram of an electronic device that may be used to implement an embodiment of the invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the term "object" and the like in the description of the present invention and the claims and the above drawings are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described 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.
Example 1
Fig. 1 is a flowchart of an interface calling method according to an embodiment of the present invention, where the method may be performed by an interface calling device, the interface calling device may be implemented in hardware and/or software, and the interface calling device may be configured in an electronic device. As shown in fig. 1, the method includes:
step 110, an input object generated by the interface consumer is obtained.
The interface consumer can be one end with interface call requirement, and the opposite end is the interface service side. The interface service may be the end that provides the information needed by the interface consumer. The input object may be a program element provided at the interface consumer. Input objects may include, but are not limited to, data of the object and functions of the operational data. For example, if the interface consumer needs to call identity information of a person through the interface, the data of the object in the input object generated by the interface consumer may include age, gender and name of the person, and the function of the operation data may include, but is not limited to, a function of data query modification, and the like.
In the embodiment of the invention, the input object generated by the interface consumer can be acquired first, so that the interface call is carried out in an object-oriented mode based on the input object.
And 120, performing interface object mapping processing on the input object to obtain an input message, and determining a target interface sending component matched with the input message.
The interface object mapping process may be used to map an object (such as an input object) to be converted with an interface packet. The input message may be a send message corresponding to the input object. The target interface sending component may be an interface calling component that sends the message according to the interface communication type of the input message.
In the embodiment of the invention, the input object can be subjected to interface object mapping processing to obtain the input message corresponding to the input object, and then the interface communication type of the input message transmission interface is determined, so that the target interface sending component matched with the input message is obtained based on the determined interface communication type.
And 130, transmitting the input message to an interface service side based on the target interface transmitting component.
In the embodiment of the invention, the interface can be called through the target interface sending component, and the input message is sent to the interface service side through the interface, so that the interface call can be completed in an object-oriented mode.
According to the technical scheme, the input object generated by the interface consumer is obtained, so that interface object mapping processing is carried out on the input object to obtain the input message, a target interface sending component matched with the input message is determined, and the input message is sent to the interface server based on the target interface sending component. In the scheme, the operation of the interface is converted into the operation of the object, the interface call is completed in an object-oriented mode, the interface call of different communication modes is supported, an interface call developer can not need to know interface contents such as message formats of the interface, call modes of the interface and the like, only need to concentrate on the development of service logic, also does not need to carry out the development of codes such as interface message assembly, interface transmission and the like, the workload of the interface call developer is reduced, the problems that the development period is long in the conventional interface call and the professional knowledge requirement of the interface call developer is high are solved, the development period of the interface call is greatly reduced, the workload of the interface call developer is reduced, and the developer only needs to concentrate on the development of the service logic.
Example two
Fig. 2 is a flowchart of an interface calling method according to a second embodiment of the present invention, where the embodiment is based on the foregoing embodiment, and a specific alternative implementation manner of generating an output object after an input packet is sent to an interface service side based on a target interface sending component is provided. As shown in fig. 2, the method includes:
step 210, an input object generated by the interface consumer is obtained.
In an alternative embodiment of the present invention, the interface consumer may be configured to obtain an interface call request and generate an input object according to the interface call request; or generating the input object based on the input object configuration parameters set by the interface calling developer.
The interface call request may be a call instruction of the interface issued by the information query user. The input object configuration parameters may be data related to the output object configured by the interface caller.
Correspondingly, in the service application stage, the information inquiry user can be acquired to send an interface call request, and then the interface call request is analyzed to determine the service which the information inquiry user needs to inquire, so that an input object is generated based on the inquiry service. In the service logic development stage, the configuration parameters of the input object input by the interface calling developer can be obtained, and then the configuration of the input object is carried out according to the configuration parameters of the input object, so that the input object is obtained.
In an alternative embodiment of the present invention, before obtaining the input object generated by the interface consumer, the method may further include: configuring an interceptor by using a tangent plane mode; based on the interceptor, fusing and current limiting are performed before and after the input message is sent to the interface service side.
Wherein the interceptor may be for intercepting interface calls.
In the embodiment of the invention, before the input object generated by the interface consumer is acquired, at least one tangent point can be determined in a tangent plane mode, and the dynamic addition of the interceptor is performed based on the tangent point, so that the functions of fusing and limiting current can be added on the basis of not changing the program corresponding to the original interface calling method, namely, the fusing and limiting current processing is performed on the interface calling based on the interceptor before the input message is sent to the interface server and after the input message is sent to the interface server.
In an alternative embodiment of the present invention, the interface calling method may further include: support is in invoke mode.
The invoke mode can be used for calling any type of object, and can specifically call the object when the program is compiled and run.
In the embodiment of the invention, the interface call can be performed in an invoke mode.
Step 220, performing interface object mapping processing on the input object to obtain an input message, and determining a target interface sending component matched with the input message.
In an optional embodiment of the present invention, performing interface object mapping processing on an input object to obtain an input packet may include: acquiring object association annotation data; and carrying out object mapping processing and object variable mapping processing on the input object according to the object associated annotation data to obtain an input message.
Wherein the object associated annotation data may be annotation data upon which the interface object mapping process is based. The object mapping process may be used to set the properties of the corresponding interface of the input object. The object variable mapping process may be used to map variables of an input object with a newspaper field.
In the embodiment of the invention, the object association annotation data representing the mapping relation between the input object and the input message can be obtained, so that the input object is subjected to object mapping processing and object variable mapping processing based on the object association annotation data, the attribute setting of the interface corresponding to the input object and the mapping of the data and the message field in the input object are realized, and the input message is obtained.
In an optional embodiment of the present invention, performing object mapping processing and object variable mapping processing on the input object according to the object association annotation data to obtain an input message may include: setting interface association data corresponding to the input object according to the object annotation data in the object association annotation data, and establishing mapping between the object variable of the input object and the message field according to the object variable annotation data in the object association annotation data to obtain the input message.
Wherein the object annotation data may be used to describe a mapping of the input object to the interface attribute. The object variable annotation data may be used to describe the mapping of object variables of the input object to the message fields. The interface association data may be data describing attributes of the interface. The interface association data may include, but is not limited to, interface name, interface version, interface address, interface common header, interface communication type, etc. The interface message may include the contents, address, communication means, etc. of the interface to ensure that each component correctly reads, interprets, and uses the data. The message field comprises an interface input field and an output field, and each part comprises a public header field such as an interface name, an interface address and the like and a service field needed by the interface. The interface address is an entry for providing services to the outside of the interface, and includes an IP (Internet Protocol, network layer protocol) or domain name of the interface service, a service name of the interface, a version of the interface, and the like.
In the embodiment of the invention, the object association annotation data can be analyzed to obtain the object annotation data and the object variable annotation data, so that the interface association data corresponding to the input object is set based on the object annotation data to complete the attribute configuration of the transmission interface corresponding to the input object, and the mapping of the object variable of the input object and the message field is established according to the object variable annotation data to obtain the input message.
Step 230, based on the target interface sending component, the input message is sent to the interface service side.
Step 240, obtaining the output message sent by the interface service side.
The output message may be message data fed back from the interface service to the interface consumer.
In the embodiment of the invention, the interface service party can determine the service data required by the interface consumer according to the received input message, and generate the output message based on the service data required by the interface consumer.
Step 250, performing interface object mapping processing on the output message to obtain an output object, and sending the output object to an interface consumer.
The output object may be an object identifiable by an interface consumer corresponding to the output message.
In the embodiment of the invention, the output message can be subjected to interface object mapping processing to obtain the output object corresponding to the output message, the output object is sent to an interface consumer, and the required message is received in an object-oriented manner through the interface consumption aspect.
Fig. 3 is a schematic diagram of an interface calling framework according to a second embodiment of the present invention. As shown in fig. 3, the interface call framework includes a consumer business layer, an interface object mapping module, an interface processing module, and a server interface. The consumer business layer processes business logic, generates an input object when an interface is required to be called, and completes interface calling through the component. The interface object mapping module is used for converting the input object or the output object into corresponding interface messages and filling the contents such as interface names, interface versions, interface addresses, interface public message headers, interface communication types and the like. The interface processing module comprises different interface sending components, can select different interface sending components to send interface messages according to the interface communication type, and simultaneously supports the processes of fusing, current limiting and the like when the interface is called. The interface service side receives the input message through the service side interfaces 1 and … … and the service side interface n, processes the input message and returns an output message.
Fig. 4 is a session processing timing diagram of an interface call according to a second embodiment of the present invention. As shown in fig. 4, an interface consumer generates an input object, invokes an invoke mode of an interface processing module, sends the input object to the interface processing module (supporting processing such as fusing and current limiting), sends the input object to the interface object mapping module, converts the input object into an input message through the interface object mapping module, further invokes an interface according to an interface communication mode adapted to the input message through the interface processing module, sends the input message to an interface server, performs service processing on the interface server, returns an output message to the interface processing module, sends the output message to the interface object mapping module through the interface processing module, converts the output message to obtain an output object, and transmits the output object to the interface consumer through the interface processing module.
At present, each interface calling developer needs to be familiar with the interface definition of a service side, and different interface communication types need to be called in any mode, in the development process, the interface calling developer needs to assemble the messages of the interface after being familiar with the interface definition, and calls the interface in different modes according to the communication type of the interface, so that the workload of the interface calling developer is increased, and meanwhile, the development flow is complex and program errors easily occur. If the process of interface call requires other processing, the code needs to be invasively modified. Based on the interface calling method of the scheme, the interface calling developer performs interface access in an object-oriented mode, supports object-oriented combination, inheritance, polymorphism and the like, shields the content of the interface, and can concentrate the interface calling developer on service development. For interface upgrading and field adjustment, an interface call developer does not need to modify program service codes, such as field renaming, only needs to modify mapping relation, and only needs to inherit the original interface object to add corresponding fields after adding new version of the interface to add fields.
By packaging the interface processing module and the interface object mapping module, an interface calling developer does not need to assemble a large number of written messages or check sentences, so that the development efficiency is greatly improved, and control such as fusing and current limiting of the interface is not needed to be considered.
According to the technical scheme, the input object generated by the interface consumer is obtained, so that interface object mapping processing is carried out on the input object to obtain an input message, a target interface sending component matched with the input message is determined, the input message is sent to the interface server based on the target interface sending component, the output message sent by the interface server is obtained, interface object mapping processing is carried out on the output message to obtain an output object, and the output object is sent to the interface consumer. In the scheme, the operation of the interface is converted into the operation of the object, the interface call is completed in an object-oriented mode, the interface call of different communication modes is supported, an interface call developer can not need to know interface contents such as message formats of the interface, call modes of the interface and the like, only need to concentrate on the development of service logic, also does not need to carry out the development of codes such as interface message assembly, interface transmission and the like, the workload of the interface call developer is reduced, the problems that the development period is long in the conventional interface call and the professional knowledge requirement of the interface call developer is high are solved, the development period of the interface call is greatly reduced, the workload of the interface call developer is reduced, and the developer only needs to concentrate on the development of the service logic.
In the technical scheme of the embodiment of the invention, the acquisition, storage, application and the like of the related user personal information (such as face information, identity information, personal credit information and the like) accords with the regulations of related laws and regulations, and does not violate the popular regulations.
Example III
Fig. 5 is a schematic structural diagram of an interface calling device according to a third embodiment of the present invention. As shown in fig. 5, the apparatus includes:
an input object acquisition module 310, configured to acquire an input object generated by an interface consumer;
the target interface sending component determining module 320 is configured to perform interface object mapping processing on an input object to obtain an input message, and determine a target interface sending component that matches the input message;
the input message sending module 330 is configured to send an input message to the interface service party based on the target interface sending component.
According to the technical scheme, the input object generated by the interface consumer is obtained, so that interface object mapping processing is carried out on the input object to obtain the input message, a target interface sending component matched with the input message is determined, and the input message is sent to the interface server based on the target interface sending component. In the scheme, the operation of the interface is converted into the operation of the object, the interface call is completed in an object-oriented mode, the interface call of different communication modes is supported, an interface call developer can not need to know interface contents such as message formats of the interface, call modes of the interface and the like, only need to concentrate on the development of service logic, also does not need to carry out the development of codes such as interface message assembly, interface transmission and the like, the workload of the interface call developer is reduced, the problems that the development period is long in the conventional interface call and the professional knowledge requirement of the interface call developer is high are solved, the development period of the interface call is greatly reduced, the workload of the interface call developer is reduced, and the developer only needs to concentrate on the development of the service logic.
Optionally, the interface calling device may include an output object determining and sending module, configured to obtain an output message sent by the interface service side; and performing interface object mapping processing on the output message to obtain an output object, and sending the output object to the interface consumer.
Optionally, the interface consumer is configured to obtain an interface call request, and generate the input object according to the interface call request; or generating the input object based on the input object configuration parameters set by the interface calling developer.
Optionally, the target interface sending component determining module 320 is configured to obtain object association annotation data; and carrying out object mapping processing and object variable mapping processing on the input object according to the object associated annotation data to obtain the input message.
Optionally, the target interface sending component determining module 320 is configured to set interface association data corresponding to the input object according to the object annotation data in the object association annotation data, and establish a mapping between an object variable of the input object and a message field according to the object variable annotation data in the object association annotation data, so as to obtain the input message.
Optionally, the interface calling device further comprises a fusing and current limiting module, which is used for configuring the interceptor by using a tangent plane mode; based on the interceptor, fusing and current limiting are performed before the input message is sent to an interface service side and after the input message is sent to the interface service side.
Optionally, the interface calling device supports invoke mode.
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 the corresponding functional modules and beneficial effects of the executing method.
Example IV
Fig. 6 shows a schematic diagram of an electronic device that may be used to implement an embodiment of the 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. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, 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. 6, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may 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.
Various 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, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an 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.
The 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, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as interface call methods.
In some embodiments, the interface invocation method may be implemented as a computer program tangibly embodied on 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 calling method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the interface call method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out 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 implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of 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. The 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) through 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 may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (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 background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server 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 hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. An interface calling method, comprising:
acquiring an input object generated by an interface consumer;
performing interface object mapping processing on the input object to obtain an input message, and determining a target interface sending component matched with the input message;
and based on the target interface sending component, sending the input message to an interface service side.
2. The method according to claim 1, further comprising, after said transmitting said input message to an interface service based on said target interface transmitting component:
obtaining an output message sent by the interface service side;
and performing interface object mapping processing on the output message to obtain an output object, and sending the output object to the interface consumer.
3. The method of claim 1, wherein the interface consumer is configured to obtain an interface call request and generate the input object according to the interface call request; or,
and generating the input object based on the input object configuration parameters set by the interface calling developer.
4. The method of claim 1, wherein the performing interface object mapping on the input object to obtain an input message includes:
acquiring object association annotation data;
and carrying out object mapping processing and object variable mapping processing on the input object according to the object associated annotation data to obtain the input message.
5. The method of claim 4, wherein performing object mapping and object variable mapping on the input object according to the object associated annotation data to obtain the input message comprises:
setting interface association data corresponding to the input object according to the object annotation data in the object association annotation data, and establishing mapping between the object variable of the input object and the message field according to the object variable annotation data in the object association annotation data to obtain the input message.
6. The method of claim 1, further comprising, prior to the obtaining the interface consumer generated input object:
configuring an interceptor by using a tangent plane mode;
based on the interceptor, fusing and current limiting are performed before the input message is sent to an interface service side and after the input message is sent to the interface service side.
7. The method as recited in claim 1, further comprising: and supports invoke mode.
8. An interface calling device, comprising:
the input object acquisition module is used for acquiring an input object generated by an interface consumer;
the target interface sending component determining module is used for carrying out interface object mapping processing on the input object to obtain an input message and determining a target interface sending component matched with the input message;
and the input message sending module is used for sending the input message to an interface service side based on the target interface sending component.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the interface call method of any one of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the interface invocation method of any of claims 1-7 when executed.
CN202311616854.8A 2023-11-29 2023-11-29 Interface calling method, device, equipment and medium Pending CN117453206A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311616854.8A CN117453206A (en) 2023-11-29 2023-11-29 Interface calling method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311616854.8A CN117453206A (en) 2023-11-29 2023-11-29 Interface calling method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN117453206A true CN117453206A (en) 2024-01-26

Family

ID=89593006

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311616854.8A Pending CN117453206A (en) 2023-11-29 2023-11-29 Interface calling method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN117453206A (en)

Similar Documents

Publication Publication Date Title
CN110457144B (en) Method, device, medium and equipment for realizing front-end application
CN111722947A (en) Service calling method and system
CN108279987A (en) The method for edition management and device of application program
WO2020248383A1 (en) Cross-platform-based data processing method and apparatus, and computer device
CN112507005B (en) Method and device for processing message
WO2023142911A1 (en) Service processing method and device
US8020051B2 (en) Message handling in a service-oriented architecture
WO2020185891A1 (en) Methods, systems, and computer readable media for data translation using a representational state transfer (rest) application programming interface (api)
WO2016107120A1 (en) Application programming interface calling method and device
CN114745449B (en) Message processing method and device, storage medium and electronic equipment
CN109388388B (en) Information interaction method, device, equipment and storage medium between function modules
CN113806104A (en) Interface access request processing method, API gateway, server and system
CN112732547B (en) Service testing method and device, storage medium and electronic equipment
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
CN117453206A (en) Interface calling method, device, equipment and medium
CN113779018A (en) Data processing method and device
CN110262912B (en) Calling method and device for procedure call gRPC
CN112905273A (en) Service calling method and device
CN112650601B (en) Method, apparatus, device, storage medium, and program for opening applet across hosts
CN111625866A (en) Authority management method, system, equipment and storage medium
CN109376023B (en) Method and equipment for generating calling information and issuing return code group
CN114202046B (en) Method, device, equipment and medium for generating two-dimension code based on SAP system
CN112882711B (en) Rendering method, device, equipment and storage medium
CN116521279A (en) Service calling method, service generating method, device, equipment and medium
CN111770007A (en) Custom service testing tool and method based on power system universal service protocol

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