CN114253633A - 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
CN114253633A
CN114253633A CN202111554121.7A CN202111554121A CN114253633A CN 114253633 A CN114253633 A CN 114253633A CN 202111554121 A CN202111554121 A CN 202111554121A CN 114253633 A CN114253633 A CN 114253633A
Authority
CN
China
Prior art keywords
description information
interface
target interface
target
information
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
CN202111554121.7A
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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111554121.7A priority Critical patent/CN114253633A/en
Publication of CN114253633A publication Critical patent/CN114253633A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The disclosure relates to the technical field of computers, in particular to the technical field of application operation and maintenance, and can be applied to scenes such as interface calling of small programs. The specific implementation scheme is as follows: acquiring interface calling information in a JOSN format, wherein the interface calling information is generated based on the selection operation of a user on a query webpage; determining a target query engine from the at least one query engine based on the interface call information; converting the interface call information into a structured query language request suitable for accessing the target query engine; and sending the structured query language request to a target query engine, and receiving an interface calling result returned by the target query engine. The method can effectively verify the validity of the collected port description information, and can ensure the success rate of port calling to a greater extent and reduce invalid calling events by calling the corresponding port for the applet under the condition that the port description information is legal.

Description

Interface calling method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of computers, in particular to the technical field of application operation and maintenance, and can be applied to scenes such as interface calling of small programs.
Background
In an interface calling scenario during applet running, when an interface needs to be called, a web page view is usually required to call a corresponding interface based on interface description information. However, since whether the interface description information is accurate or not is unknown, if the interface description information is inaccurate, the port call fails, and more invalid call events are generated.
Disclosure of Invention
The disclosure provides an interface calling method, an interface calling device, an electronic device and a storage medium.
According to a first aspect of the present disclosure, there is provided an interface calling method, including:
collecting target interface description information, and injecting the target interface description information into a webpage view frame;
acquiring interface reference description information;
verifying the legality of the target interface description information by comparing the interface reference description information with the target interface description information;
and under the condition that the target interface description information is determined to be legal, responding to a calling event aiming at the target interface during the running of the target applet, and calling the target interface corresponding to the target interface description information based on the webpage view frame.
According to a second aspect of the present disclosure, there is provided an interface calling apparatus including:
the target information collection module is used for collecting target interface description information and injecting the target interface description information into the webpage view frame;
the reference information collection module is used for acquiring interface reference description information;
the information checking module is used for checking the legality of the description information of the target interface by comparing the reference description information of the interface with the description information of the target interface;
and the interface calling module is used for responding to a calling event aiming at the target interface during the running period of the target applet and calling the target interface corresponding to the target interface description information based on the webpage view frame under the condition that the target interface description information is determined to be legal.
According to a third aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the interface call method described above.
According to a fourth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing the computer to execute the above-described interface calling method.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the interface invocation method described above.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
The technical scheme provided by the disclosure has the following beneficial effects:
the technical scheme disclosed by the invention can effectively verify the legality of the collected port description information, and the corresponding port is called for the applet under the condition that the port description information is legal, so that the success rate of port calling can be ensured to a greater extent, and invalid calling events are reduced.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is a schematic flowchart illustrating an interface calling method according to an embodiment of the present disclosure;
fig. 2 is a schematic flowchart illustrating another interface calling method provided in the embodiment of the present disclosure;
fig. 3 is a schematic diagram of an interface calling apparatus according to an embodiment of the present disclosure;
fig. 4 is a second schematic diagram of an interface invoking device according to an embodiment of the present disclosure;
FIG. 5 shows a schematic block diagram of an example electronic device that may be used to implement the interface invocation methods provided by embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
In the existing interface calling scenario, a data analyst needs to master SQL, or a front-end developer needs to perform specialized development for different engines, or a back-end developer needs to master a language with a small use range, which is not friendly enough for development of most back ends.
The interface calling method, device, electronic equipment and storage medium provided by the embodiments of the present disclosure aim to solve at least one of the above technical problems in the prior art.
In an interface calling scenario during applet running, when an interface needs to be called, a web page view is usually required to call a corresponding interface based on interface description information. However, since whether the interface description information is accurate or not is unknown, if the interface description information is inaccurate, the port call fails, and more invalid call events are generated.
The interface calling method provided by the embodiment of the disclosure can be applied to an interface calling scene during the running of a Mini Program. An applet is an application that can be used without download and installation, it being understood that the applet needs to run based on a host application. In some business scenarios, an interface needs to be called during applet run, and a corresponding target interface needs to be called based on a web View (wedview) framework.
It should be noted here that the host application may be a Native App (Native App) installed on the device. The native application is a third-party application program written and run by using a native program based on a local operating system of the intelligent device, such as iOS, Android and WP, and is also called as a local application. The development languages commonly used by the original ecological application are JAVA, C + +, Objective-C and the like.
The webpage view can be embedded in the mobile terminal, and hybrid development of the front end is achieved. Most hybrid development frameworks are developed secondarily based on a web page view mode, such as: APIcloud, uni-app, etc.
The above-mentioned interface may provide corresponding functions for the target applet, such as a positioning function, an image processing function, a text processing function, etc., which are not limited by this disclosure. The Interface may be an Application Programming Interface (API), which is mainly used to provide the capability of an Application program and a developer to access a set of routines without accessing source codes or to understand details of internal working mechanisms, and is mainly classified into a Windows API and a Linux API.
Fig. 1 shows a schematic flowchart of an interface calling method provided by an embodiment of the present disclosure, and as shown in fig. 1, the method mainly includes the following steps:
s110: and collecting target interface description information, and injecting the target interface description information into the webpage view frame.
It is to be understood that, in the system of the execution subject of the interface calling method provided in the embodiment of the present disclosure, a plurality of interfaces may be arranged in advance, and for convenience of understanding and presentation, these interfaces may be defined as candidate interfaces. The embodiment of the disclosure may determine a target interface from the candidate interfaces, and collect description information of the target interface, where information including description content of the target interface is defined as the description information of the target interface. The interface arranged in the system of the execution subject may have inaccurate description information due to some factors, for example, the interface is not updated in time or the information of the interface is modified, which may cause the description information of the collected interface not to match with the corresponding actually correct description information, thereby failing to effectively call the corresponding interface based on the collected description information.
Optionally, in step S110, in the embodiment of the present disclosure, description information meeting a preset condition may be filtered from description information of at least one candidate interface; and collecting the description information meeting the preset conditions as the description information of the target interface.
S120: interface reference description information is acquired.
In the embodiments of the present disclosure, the interface reference description information may be acquired from a specified device. Taking the device as the first device as an example, the embodiment of the present disclosure may store accurate description information of the interface of the latest version in the first device, and for convenience of understanding and expression, the embodiment of the present disclosure defines the description information stored in the first device as the interface reference description information. Here, the execution subject of the interface calling method provided by the embodiment of the present disclosure may communicate with the first device, so as to obtain the interface reference description information. The first device may refer to a terminal or a server, which the present disclosure does not limit.
Optionally, in step S120, the embodiment of the present disclosure may generate a corresponding interface information obtaining request based on the target interface description information, send the interface information obtaining request to the first device, and receive interface reference description information returned by the first device for the interface information obtaining request. Here, when receiving the interface information acquisition request, the first device may determine the interface reference description information corresponding to the interface information acquisition request, and return the interface reference description information to the execution main body of the interface calling method provided in the embodiment of the present disclosure.
S130: and verifying the legality of the description information of the target interface by comparing the reference description information of the interface with the description information of the target interface.
As described above, the embodiment of the present disclosure collects that the description information of the interface does not match with the corresponding actually correct description information, and the interface reference description information acquired from the first device is the actually correct description information, determines a difference between the interface reference description information and the target interface description information by comparing the two description information, and verifies the validity of the target interface description information based on the difference.
Optionally, in step S130, the embodiment of the present disclosure may match the description contents corresponding to the interface reference description information and the target interface description information. When the description contents of the interface reference description information and the target interface description information are the same, determining that the target interface description information is legal; and when at least one item of description content of the interface reference description information and the target interface description information is not identical, determining that the target interface description information is illegal. Here, the description contents include interface names, function comments, and interface parameter specifications, and step S130 may compare the above-mentioned corresponding items of description contents in the interface reference description information and the target interface description information.
S140: and under the condition that the target interface description information is determined to be legal, responding to a calling event aiming at the target interface during the running of the target applet, and calling the target interface corresponding to the target interface description information based on the webpage view frame.
The interface calling method provided by the embodiment of the disclosure can effectively verify the validity of the collected port description information, and can ensure the success rate of port calling to a greater extent and reduce invalid calling events by calling the corresponding port for the applet under the condition that the port description information is legal.
Optionally, before the target interface is called, validity of the target interface may be further checked, and if the target interface is invalid, the calling may be stopped, so as to avoid adding an invalid port calling flow due to the invalid target interface and calling the target interface. Specifically, the embodiment of the present disclosure may check validity of the target interface corresponding to the target interface description information based on the web page view box, and call the target interface when it is determined that the target interface is valid.
Optionally, after obtaining the legality result of the target interface description information, the legality result may be presented to an operator of the host application of the target applet. For example, the validity result may be sent to the operator, so that the operator may modify the target interface description information. Specifically, after step S130, the embodiment of the present disclosure may send, when it is determined that the target interface description information is legitimate, first notification information indicating that the target interface description information is legitimate; and sending second notification information for indicating that the target interface description information is illegal when the target interface description information is determined to be illegal. Optionally, the first notification information and the second notification information may be sent to a specified device, and the specified device may be used to provide a running service for a host application of the target applet. The specified device may be a first device or may be a second device different from the first device. Optionally, the operator may obtain the first notification information or the second notification information at the second device through the terminal thereof, and when obtaining the second notification information, the operator may modify the relevant target interface according to the second notification information.
Optionally, after step S130, when it is determined that the target interface description information is legal, the embodiment of the present disclosure may send, to the second device, first notification information for indicating that the target interface description information is legal; and when the target interface description information is determined to be illegal, sending second notification information for indicating that the target interface description information is illegal to the second device. The operator may obtain the first notification information or the second notification information at the second device through the terminal thereof, and may modify the related target interface according to the second notification information when obtaining the second notification information.
Fig. 2 shows a schematic flowchart of another interface invoking method provided in the embodiment of the present disclosure, and as shown in fig. 2, the method mainly includes the following steps:
s201: and screening the description information meeting the preset condition from the description information of at least one candidate interface.
It is to be understood that, in the system of the execution subject of the interface calling method provided by the embodiment of the present disclosure, a plurality of candidate interfaces may be arranged in advance, and the embodiment of the present disclosure may determine a target interface from the candidate interfaces based on a preset condition, and collect description information of the target interface, where information including description content of the target interface is defined as description information of the target interface. The preset condition may be determined based on actual design requirements. For example, a preset condition may be set to determine whether the description information of the candidate interface includes a function annotation; when the description information of the candidate interface includes the function annotation, the candidate interface may be determined as a target interface, and it is determined that the description information of the target interface meets a preset condition. The steps can exclude the description information of the irregular interface in advance, ensure that the collected description information has the description information with higher probability of being legal, and reduce the calculation amount of the subsequent verification work.
It is understood that the interface disposed in the system of the executing entity may have inaccurate description information due to some factors, for example, the interface is not updated in time or the information of the interface is modified, which may cause the description information of the collected interface not to match with the corresponding actually correct description information, thereby resulting in a failure to effectively call the corresponding interface based on the collected description information.
S202: and collecting the description information meeting the preset conditions as the description information of the target interface.
It is understood that after the target interface and its corresponding description information are determined in step S201, these description information may be collected as the target interface description information.
S203: and injecting the target interface description information into the webpage view frame.
S204: and generating a corresponding interface information acquisition request based on the target interface description information.
In step S203, a Compatibility Test (CTS) applet is started in the host application, and the target interface description information generates a corresponding interface information acquisition request by running the Compatibility Test (CTS) applet.
S205: and sending the interface information acquisition request to the first equipment.
S206: and receiving interface reference description information returned by the first equipment aiming at the interface information acquisition request.
In this disclosure, when receiving an interface information acquisition request, a first device may determine interface reference description information corresponding to the interface information acquisition request, and return the interface reference description information to an execution main body of an interface calling method provided in this disclosure. According to the embodiment of the disclosure, the interface reference description information is acquired in an active request manner, so that the security of the information in the first device can be ensured.
S207: and matching the description contents corresponding to the interface reference description information and the target interface description information.
As described above, the embodiment of the present disclosure collects that the description information of the interface does not match with the corresponding actually correct description information, and the interface reference description information acquired from the first device is the actually correct description information, determines a difference between the interface reference description information and the target interface description information by comparing the two description information, and verifies the validity of the target interface description information based on the difference. Here, the description contents include interface names, function comments, and interface parameter specifications, and step S207 may compare the above-mentioned corresponding description contents in the interface reference description information and the target interface description information.
After step S207, step S208 may be performed when the description contents of the interface reference description information and the target interface description information are the same, and step S212 may be performed when the description contents of the interface reference description information and the target interface description information are different.
S208: and when the description contents of the interface reference description information and the target interface description information are the same, determining that the target interface description information is legal.
After step S208, at least one of step S209 and step S211 may be performed. Alternatively, when both steps S209 and S211 need to be performed, the relative execution order of steps S209 and S211 may not be limited.
S209: and under the condition that the target interface description information is determined to be legal, responding to a calling event aiming at the target interface during the running of the target applet, and checking the validity of the target interface corresponding to the target interface description information based on the webpage view frame.
Step S210 may be performed after step S209.
S210: and when the target interface is determined to be effective, calling the target interface.
S211: and when the target interface description information is determined to be legal, sending first notification information for indicating that the target interface description information is legal to the second equipment.
Wherein the second device is used for providing running service for the host application of the target applet
S212: and when at least one item of description content of the interface reference description information and the target interface description information is not identical, determining that the target interface description information is illegal.
S213: and when the target interface description information is determined to be illegal, sending second notification information for indicating that the target interface description information is illegal to the second device.
Optionally, after obtaining the legality result of the target interface description information, the legality result may be presented to an operator of the host application of the target applet. For example, the validity result may be sent to the second device, so that the operator may modify the target interface description information. The second device is used for providing running service for the host application of the target small program. The operator may obtain the first notification information or the second notification information at the second device through the terminal thereof, and may modify the related target interface according to the second notification information when obtaining the second notification information.
Based on the same principle as the interface calling method, an interface calling device is further provided in the embodiments of the present disclosure, fig. 3 shows one schematic diagram of an interface calling device provided in the embodiments of the present disclosure, and fig. 4 shows a second schematic diagram of an interface calling device provided in the embodiments of the present disclosure. As shown in fig. 3, the interface calling device 300 includes a target information collecting module 310, a reference information collecting module 320, an information verifying module 330, and an interface calling module 340.
The target information collecting module 310 is used for collecting target interface description information and injecting the target interface description information into the web page view frame.
The reference information collection module 320 is used for acquiring the interface reference description information.
The information checking module 330 is configured to check validity of the target interface description information by comparing the interface reference description information with the target interface description information.
The interface calling module 340 is configured to, in response to a calling event for the target interface during the running of the target applet, call the target interface corresponding to the target interface description information based on the web view frame, under the condition that it is determined that the target interface description information is legal.
The interface calling device provided by the embodiment of the disclosure can effectively verify the validity of the collected port description information, and can call the corresponding port for the applet under the condition that the port description information is legal, thereby ensuring the success rate of port calling to a greater extent and reducing invalid calling events.
In the embodiment of the present disclosure, the information checking module 330, when configured to check the validity of the target interface description information by comparing the interface reference description information with the target interface description information, is specifically configured to:
matching the description contents corresponding to the interface reference description information and the target interface description information;
when the description contents of the interface reference description information and the target interface description information are the same, determining that the target interface description information is legal;
and when at least one item of description content of the interface reference description information and the target interface description information is not identical, determining that the target interface description information is illegal.
In the embodiment of the present disclosure, the description content includes an interface name, a function comment, and an interface parameter specification.
In the embodiment of the present disclosure, as shown in fig. 4, the interface invoking device 300 further includes a result notifying module 350 on the basis of including the target information collecting module 310, the reference information collecting module 320, the information verifying module 330, and the interface invoking module 340, where the result notifying module 350 is configured to:
and when the target interface description information is determined to be legal, sending first notification information for indicating that the target interface description information is legal.
And when the target interface description information is determined to be illegal, sending second notification information for indicating that the target interface description information is illegal.
In the embodiment of the present disclosure, when the interface invoking module 340 is configured to invoke a target interface corresponding to target interface description information based on a web view frame, specifically, to:
checking the validity of a target interface corresponding to the target interface description information based on the webpage view frame;
and when the target interface is determined to be effective, calling the target interface.
In the embodiment of the present disclosure, when the target information collecting module 310 is used to collect target interface description information, it is specifically configured to:
screening description information meeting preset conditions from the description information of at least one candidate interface;
and collecting the description information meeting the preset conditions as the description information of the target interface.
In the embodiment of the present disclosure, when the reference information collection module 320 is configured to obtain the interface reference description information from the first device, it is specifically configured to:
generating a corresponding interface information acquisition request based on the target interface description information;
sending an interface information acquisition request to first equipment;
and receiving interface reference description information returned by the first equipment aiming at the interface information acquisition request.
It is understood that each module of the interface calling device in the embodiment of the present disclosure has a function of implementing a corresponding step of the interface calling method. The function can be realized by hardware, and can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the functions described above. The modules can be software and/or hardware, and each module can be implemented independently or by integrating a plurality of modules. For the functional description of each module of the interface calling apparatus, reference may be specifically made to the corresponding description of the interface calling method, which is not described herein again.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 5 illustrates a schematic block diagram of an example electronic device that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the apparatus 500 comprises a computing unit 501 which may perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The calculation unit 501, the ROM 502, and the RAM 503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
A number of components in the device 500 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, or the like; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508, such as a magnetic disk, optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general-purpose and/or special-purpose processing components having processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 501 executes the various methods and processes described above, such as interface call methods. For example, in some embodiments, the interface call method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the interface call method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the interface call method in any other suitable manner (e.g., by way 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.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user 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), and the Internet.
The computer 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 may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
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 disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. 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 disclosure should be included in the scope of protection of the present disclosure.

Claims (17)

1. An interface calling method, comprising:
collecting target interface description information, and injecting the target interface description information into a webpage view frame;
acquiring interface reference description information;
verifying the legality of the target interface description information by comparing the interface reference description information with the target interface description information;
and under the condition that the target interface description information is determined to be legal, responding to a calling event aiming at a target interface during the running of a target applet, and calling the target interface corresponding to the target interface description information based on the webpage view frame.
2. The method of claim 1, wherein said checking the validity of said target interface description information by comparing said interface reference description information with said target interface description information comprises:
matching the description contents corresponding to the interface reference description information and the target interface description information;
when the interface reference description information and the description contents of the target interface description information are the same, determining that the target interface description information is legal;
and when at least one item of description content of the interface reference description information and the target interface description information is different, determining that the target interface description information is illegal.
3. The method of claim 2, wherein the descriptive content includes interface names, function annotations, and interface parameter specifications.
4. The method of claim 1, further comprising, after said checking the validity of said target interface description information by comparing said interface reference description information with said target interface description information:
when the target interface description information is determined to be legal, sending first notification information for indicating that the target interface description information is legal;
and when the target interface description information is determined to be illegal, sending second notification information for indicating that the target interface description information is illegal.
5. The method of claim 1, wherein the invoking a target interface corresponding to the target interface description information based on the web page view frame comprises:
checking the validity of a target interface corresponding to the target interface description information based on the webpage view frame;
and calling the target interface when the target interface is determined to be effective.
6. The method of claim 1, wherein the collecting target interface description information comprises:
screening description information of the candidate interface meeting preset conditions from description information of at least one candidate interface;
and collecting the description information of the candidate interface meeting the preset condition as the description information of the target interface.
7. The method of claim 1, wherein the fetching of the interface reference description information comprises:
generating a corresponding interface information acquisition request based on the target interface description information;
sending the interface information acquisition request to first equipment;
and receiving interface reference description information returned by the first equipment aiming at the interface information acquisition request.
8. An interface invocation apparatus, comprising:
the target information collection module is used for collecting target interface description information and injecting the target interface description information into a webpage view frame;
the reference information collection module is used for acquiring interface reference description information;
the information checking module is used for checking the legality of the target interface description information by comparing the interface reference description information with the target interface description information;
and the interface calling module is used for responding to a calling event aiming at a target interface during the running period of the target applet and calling the target interface corresponding to the target interface description information based on the webpage view frame under the condition that the target interface description information is determined to be legal.
9. The apparatus according to claim 8, wherein the information checking module, when configured to check the validity of the target interface description information by comparing the interface reference description information with the target interface description information, is specifically configured to:
matching the description contents corresponding to the interface reference description information and the target interface description information;
when the interface reference description information and the description contents of the target interface description information are the same, determining that the target interface description information is legal;
and when at least one item of description content of the interface reference description information and the target interface description information is different, determining that the target interface description information is illegal.
10. The apparatus of claim 9, wherein the descriptive content includes interface names, function annotations, and interface parameter specifications.
11. The apparatus of claim 8, further comprising a result notification module to:
when the target interface description information is determined to be legal, sending first notification information for indicating that the target interface description information is legal;
and when the target interface description information is determined to be illegal, sending second notification information for indicating that the target interface description information is illegal.
12. The apparatus according to claim 8, wherein the interface invoking module, when configured to invoke the target interface corresponding to the target interface description information based on the web view frame, is specifically configured to:
checking the validity of a target interface corresponding to the target interface description information based on the webpage view frame;
and calling the target interface when the target interface is determined to be effective.
13. The apparatus of claim 8, wherein the target information collection module, when configured to collect target interface description information, is specifically configured to:
screening description information of the candidate interface meeting preset conditions from description information of at least one candidate interface;
and collecting the description information of the candidate interface meeting the preset condition as the description information of the target interface.
14. The apparatus according to claim 8, wherein the reference information collecting module, when configured to obtain the interface reference description information, is specifically configured to:
generating a corresponding interface information acquisition request based on the target interface description information;
sending the interface information acquisition request to first equipment;
and receiving interface reference description information returned by the first equipment aiming at the interface information acquisition request.
15. 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 instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-7.
CN202111554121.7A 2021-12-17 2021-12-17 Interface calling method and device, electronic equipment and storage medium Pending CN114253633A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111554121.7A CN114253633A (en) 2021-12-17 2021-12-17 Interface calling method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111554121.7A CN114253633A (en) 2021-12-17 2021-12-17 Interface calling method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114253633A true CN114253633A (en) 2022-03-29

Family

ID=80792808

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111554121.7A Pending CN114253633A (en) 2021-12-17 2021-12-17 Interface calling method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114253633A (en)

Similar Documents

Publication Publication Date Title
CN108427705B (en) Electronic device, distributed system log query method and storage medium
CN114090113B (en) Method, device, equipment and storage medium for dynamically loading data source processing plug-in
CN114389969A (en) Client test method and device, electronic equipment and storage medium
CN113535565B (en) Interface use case generation method, device, equipment and medium
CN114253633A (en) Interface calling method and device, electronic equipment and storage medium
CN110554892A (en) Information acquisition method and device
CN114205156A (en) Message detection method and device for tangent plane technology, electronic equipment and medium
CN114637672A (en) Automatic data testing method and device, computer equipment and storage medium
CN114416895A (en) Map data processing method and device, electronic equipment and storage medium
CN113176907A (en) Interface data calling method and device, computer system and readable storage medium
CN112261072A (en) Service calling method, device, equipment and storage medium
CN112068814A (en) Method, device, system and medium for generating executable file
CN113535568B (en) Verification method, device, equipment and medium for application deployment version
CN116431108B (en) Object type processing method and device, electronic equipment and storage medium
CN115509543A (en) Method and device for determining document validity, electronic equipment and storage medium
EP4174639A1 (en) Auxiliary processing method and device for software development, storage medium and program product
CN109376023B (en) Method and equipment for generating calling information and issuing return code group
CN117931202A (en) Method for generating byte code replacement configuration file and byte code replacement method
CN115525521A (en) Log data verification method and device, electronic equipment, storage medium and product
CN114218059A (en) Page stability evaluation method and device, electronic equipment and readable storage medium
CN115729561A (en) Abnormality detection method, abnormality detection device, electronic apparatus, and storage medium
CN115525614A (en) Data access method, device, equipment, system and storage medium
CN116382640A (en) Method, device, equipment and storage medium for managing micro-service
CN117609064A (en) Unit test method and device, electronic equipment and storage medium
CN117453747A (en) Data quality detection method and device, electronic equipment and storage medium

Legal Events

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