CN111638983A - Interface calling method, interface calling device and terminal equipment - Google Patents

Interface calling method, interface calling device and terminal equipment Download PDF

Info

Publication number
CN111638983A
CN111638983A CN202010467362.7A CN202010467362A CN111638983A CN 111638983 A CN111638983 A CN 111638983A CN 202010467362 A CN202010467362 A CN 202010467362A CN 111638983 A CN111638983 A CN 111638983A
Authority
CN
China
Prior art keywords
interface
analysis result
preset
service system
calling
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
CN202010467362.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.)
OneConnect Smart Technology Co Ltd
OneConnect Financial Technology Co Ltd Shanghai
Original Assignee
OneConnect Financial Technology Co Ltd Shanghai
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 OneConnect Financial Technology Co Ltd Shanghai filed Critical OneConnect Financial Technology Co Ltd Shanghai
Priority to CN202010467362.7A priority Critical patent/CN111638983A/en
Publication of CN111638983A publication Critical patent/CN111638983A/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/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides an interface calling method, which comprises the following steps: acquiring a first interface configuration file through a preset service system; analyzing the first interface configuration file to obtain a first analysis result, wherein the first analysis result comprises at least one piece of first configuration information and corresponding relations between each preset interface in the preset service system and each first configuration information; storing the first analysis result in a first storage address in the preset service system; if a first enabling instruction for the first analysis result is detected, determining that the first analysis result is in an effective state; when the first analysis result is in an effective state, if a calling request for a target interface is detected, calling the target interface according to corresponding first configuration information, wherein the target interface is at least one interface in the preset interfaces.

Description

Interface calling method, interface calling device and terminal equipment
Technical Field
The present application belongs to the field of information processing technologies, and in particular, to an interface calling method, an interface calling apparatus, a terminal device, and a computer-readable storage medium.
Background
Currently, when various service systems are developed, due to various specific application fields and types of specific services, it is often necessary to implement specific functions or obtain data through a specific interface, for example, it may be necessary to implement functions such as face recognition and network verification through a specific interface. Due to the fact that standards of the interfaces are often inconsistent, the corresponding service systems need customized development, development efficiency is low, and maintenance difficulty is high.
Disclosure of Invention
The embodiment of the application provides an interface calling method, an interface calling device, a terminal device and a computer readable storage medium, which can solve the problem that due to the fact that standards of various interfaces are often inconsistent, a corresponding service system needs to be developed in a customized mode, and development efficiency is low.
In a first aspect, an embodiment of the present application provides an interface calling method, including:
acquiring a first interface configuration file through a preset service system;
analyzing the first interface configuration file to obtain a first analysis result, wherein the first analysis result comprises at least one piece of first configuration information and corresponding relations between each preset interface in the preset service system and each first configuration information;
storing the first analysis result in a first storage address in the preset service system;
if a first enabling instruction for the first analysis result is detected, determining that the first analysis result is in an effective state;
when the first analysis result is in an effective state, if a calling request for a target interface is detected, calling the target interface according to corresponding first configuration information, wherein the target interface is at least one interface in the preset interfaces.
In a second aspect, an embodiment of the present application provides an interface invoking device, including:
the acquisition module is used for acquiring a first interface configuration file through a preset service system;
the analysis module is used for analyzing the first interface configuration file to obtain a first analysis result, wherein the first analysis result comprises at least one piece of first configuration information and corresponding relations between each preset interface in the preset service system and each piece of first configuration information;
the storage module is used for storing the first analysis result in a first storage address in the preset service system;
a determining module, configured to determine that the first parsing result is in an effective state if a first enabling instruction for the first parsing result is detected;
and the calling module is used for calling the target interface according to corresponding first configuration information if a calling request for the target interface is detected when the first analysis result is in an effective state, wherein the target interface is at least one interface in the preset interfaces.
In a third aspect, an embodiment of the present application provides a terminal device, which includes a memory, a processor, a display, and a computer program stored in the memory and executable on the processor, where the processor implements the interface calling method according to the first aspect when executing the computer program.
In a fourth aspect, the present application provides a computer-readable storage medium, where a computer program is stored, and when executed by a processor, the computer program implements the interface calling method according to the first aspect.
In a fifth aspect, an embodiment of the present application provides a computer program product, which, when running on a terminal device, causes the terminal device to execute the interface calling method described in the first aspect.
Compared with the prior art, the embodiment of the application has the advantages that: in the embodiment of the application, a first interface configuration file is obtained through a preset service system, the first interface configuration file is analyzed, a first analysis result is obtained, at least one piece of first configuration information and the corresponding relation between each preset interface in the preset service system and each first configuration information can be obtained, and at this time, the first analysis result can be used for configuring each preset interface; further, the first parsing result may be stored in a first storage address in the preset service system, so that when a first enabling instruction for the first parsing result is detected, it is determined that the first parsing result is in an effective state, and the target interface is called according to the stored first parsing result. According to the embodiment of the application, each preset interface in the preset service system can be flexibly called according to the stored first analysis result through the first starting instruction, and development and maintenance can be conveniently realized through the first interface configuration file, so that the development efficiency is improved, and the maintenance cost is reduced.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of an interface calling method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of step S102 according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an interface invoking device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The interface calling method provided by the embodiment of the application can be applied to terminal devices such as a server, a desktop computer, a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, a super-mobile personal computer (UMPC), a netbook, and a Personal Digital Assistant (PDA), and the embodiment of the application does not limit the specific types of the terminal devices at all.
Specifically, fig. 1 shows a flowchart of an interface calling method provided in an embodiment of the present application, where the interface calling method may be applied to a terminal device.
The interface calling method may include:
step S101, a first interface configuration file is obtained through a preset service system.
In this embodiment of the application, the preset service system may be an application system for processing an online service in a specific application field. In the actual service processing, when a service is processed through a preset service system, data communication with at least one interface is often required to implement a specific function and the like. Each interface may be developed by a user or by a third party, and therefore, communication rules, interface standards, and the like corresponding to each interface may be inconsistent. Therefore, each interface needs to be configured. In this embodiment of the application, the first interface configuration file may include relevant configuration information of one or more preset interfaces corresponding to the preset service system.
Step S102, parsing the first interface configuration file to obtain a first parsing result, where the first parsing result includes at least one first configuration information and a corresponding relationship between each preset interface in the preset service system and each first configuration information.
In this embodiment of the present application, the interface configuration file may store information in a certain structure and form, and therefore, parsing the first interface configuration file may include reading the first interface configuration file based on a specific rule (for example, reading the first interface configuration file by using a specific parsing method such as regular parsing, xpath parsing, or bs4 parsing through C language, python, or the like), so as to obtain information in the first interface configuration file, that is, obtain the first parsing result. The specific way of parsing the first interface configuration file may be various, and may be determined according to a programming language, a service requirement, and the like adopted by the preset service system. The obtained first analysis result may be used to configure each preset interface in the preset service system.
In some embodiments, any one of the first configuration information includes at least one of interface call opportunity information, interface call address information, interface type information, parameter encapsulation mode information, information acquisition mode information, and interface call associated event handling mode information.
The interface calling time information is used for describing when the corresponding preset interface is called, and the interface calling time can be hooked with a built-in hook of a preset service system, so that the time for calling the first configuration information corresponding to the preset interface through a preset pointer is determined through a preset flow in the preset service system.
The interface call address information may include a Uniform Resource Locator (URL) of the service party corresponding to the corresponding preset interface, an ip address and/or port information of the service party, and the like.
Illustratively, the interface type may include an http interface or a socket interface, etc.
The parameter encapsulation manner information may be used to describe an encapsulation manner of the first configuration information, and for example, the parameter encapsulation manner information may be xml analysis, fixed-length data analysis, json analysis, or the like.
For example, the information acquisition mode information may include an acquisition mode of an input parameter of the corresponding preset interface, an acquisition mode of an output parameter of the corresponding preset interface, and the like.
The interface call associated event processing mode information is used for indicating the checksum processing and the like of the interface call associated event. The interface call associated events may include, for example, pre-call events, post-call events, and surround events. The event before the call is an event triggered before the preset interface is called, the event after the call is an event triggered after the preset interface is called, and the surrounding event simultaneously comprises the event before the call and the event after the call.
In some embodiments, the step S102 specifically includes:
step S201, checking whether the format of the first interface configuration file is correct;
step S202, if the format of the first interface configuration file is correct, the first interface configuration file is analyzed to obtain a first analysis result.
In the embodiment of the present application, the specific manner of checking the format of the first interface configuration file may be various, for example, whether the extension name of the first interface configuration file is a preset extension name may be detected; alternatively, it may be detected whether the header file and the file structure of the first interface configuration file meet preset structural requirements, and the like. Through the verification, whether the first interface configuration file is the configuration file for the preset service system or not can be preliminarily judged, so that the situations that the file is not matched with the system and the like are reduced.
Step S103, storing the first parsing result in a first storage address in the preset service system.
In this embodiment of the application, the first parsing result is stored in the first storage address of the preset service system, so that the preset service system can conveniently and quickly repeatedly obtain the first parsing result from the first storage address to configure one or more of the preset interfaces when needed. Illustratively, the first storage address may be in a preset database.
Step S104, if a first enabling instruction for the first analysis result is detected, determining that the first analysis result is in an effective state.
In this embodiment, for example, the first enabling instruction may be pointed to the first parsing result according to a first storage address corresponding to the first parsing result or information such as a storage name, an encoding, and the like of the first parsing result, so as to indicate that the first parsing result is set to a valid state.
In the embodiment of the present application, the first enabling instruction may be generated in various ways. For example, the first enabling instruction may be generated after a specific operation (such as a touch operation on a preset virtual key, and the like) on the preset service system by a user is detected; or, the first enabling instruction may be automatically generated by the preset application system at a preset specific time.
In some embodiments, the interface calling method further comprises:
and after the first analysis result is stored in a first storage address in the preset service system, generating a first enabling instruction for the first analysis result at a target moment according to a preset timing starting mode.
In this embodiment of the present application, the timing starting manner may be preset by a user. At this time, the first parsing result may be in an effective state for a certain period of time, and may not be in an effective state for other periods of time. Correspondingly, the preset interface in the preset service system can have different configuration modes in different time periods, so that the application of the preset service system and the interface calling modes in scenes such as testing, development and the like are more flexible, the requirements of different scenes are met, and the adaptability and the availability of the preset service system are improved.
Step S105, when the first parsing result is in an effective state, if a call request for a target interface is detected, calling the target interface according to corresponding first configuration information, where the target interface is at least one interface in the preset interfaces.
In the embodiment of the application, when the first analysis result is in an effective state, a corresponding target interface can be configured according to the first analysis result to be called, so that operations such as information transmission and the like can be realized through the target interface.
In the conventional service processing method, when a service is processed through an associated service system, data communication with at least one interface is often required. To implement a particular function, etc. Each interface may be developed by the user or developed by a third party. Therefore, communication rules, interface standards, and the like corresponding to each interface are often inconsistent, so that in the prior art, a specific service system is often required to be customized and developed for a specific service, and the specific service system cannot be used for other users and has no universality.
In this embodiment, the corresponding preset interfaces may be rapidly configured through the interface configuration file, meanwhile, each preset interface in the preset service system may be flexibly called according to the stored first parsing result through the first enabling instruction, and development and maintenance may be conveniently implemented through the first interface configuration file, so that development efficiency is improved, and maintenance cost is reduced.
The following is a specific example illustrating a specific application of the embodiments of the present application in a usage scenario.
In an application scenario, the preset service system may be configured to execute an intelligent incoming service. The intelligent piece-entering can realize on-line piece-entering through a computing device.
Based on the embodiment of the application, in practical application, when a third-party developer develops the intelligent incoming system for each bank, software codes of the intelligent incoming systems corresponding to each bank can be the same, namely the intelligent incoming systems are the same, but for each bank, a corresponding first interface configuration file can be preset, so that personalized configuration can be performed on the interfaces related to the bank when the intelligent incoming system is applied. At the moment, for different banks, third-party developers only need to respectively develop and maintain corresponding first interface configuration files, and can conveniently configure through the first interface configuration files, so that the installation, the maintenance and the updating are convenient, and the development and maintenance efficiency is greatly improved. In addition, the first analysis result corresponding to the first interface configuration file can be used for configuration in an effective state, so that the corresponding interface of the intelligent article entering system can be specifically and flexibly set based on different time periods and application scenes, and the adaptability and the availability of the intelligent article entering system are improved.
In some embodiments, each of the preset interfaces is uniquely identified by a corresponding interface code.
The corresponding relationship may be established with each first configuration information based on the interface code corresponding to each preset interface, respectively, for subsequent searching and configuration.
In some embodiments, when the first parsing result is in an effective state, if a call request for a target interface is detected, calling the target interface according to corresponding first configuration information includes:
when the first analysis result is in an effective state, if a calling request for a target interface is detected, searching first configuration information corresponding to the target interface according to the first storage address and an interface code corresponding to the target interface;
and calling the target interface according to the corresponding first configuration information through an interface calling engine.
In the embodiment of the application, the first configuration information corresponding to the target interface can be quickly found through the interface code, so that the target interface is configured according to the first configuration information, and calling is performed.
In some embodiments, the preset service system stores at least one second analysis result, and each second analysis result is respectively stored in each second storage address of the preset service system;
the interface calling method further comprises the following steps:
if a configuration enabling instruction is detected, acquiring a storage address pointed by a pointer in the configuration enabling instruction;
determining that the first enable instruction is detected if the pointer points to the first memory address;
if the pointer points to any second storage address, determining that a second enabling instruction related to a second analysis result corresponding to the second storage address pointed by the pointer is detected, and determining that the second analysis result corresponding to the second storage address pointed by the pointer is in a valid state.
In this embodiment, the preset service system may include one or more analysis results, that is, a first analysis result and/or one or more second analysis results, and each analysis result may be stored in a different storage address, and each storage address may be located in the same or a different database. At this time, the preset service system may select the analysis result in the valid state for configuration of the corresponding preset interface according to actual needs, for example, the preset service system may be updated and maintained without restarting the preset service system by updating the analysis result.
For example, in some specific examples, when a third party developer needs to update a preset interface or update a configuration mode in a preset service system for a user, the third party developer may locally generate a new interface configuration file, that is, a second interface configuration file, and then send the second interface configuration file to the user.
And after receiving the second interface configuration file, the user may analyze the second interface configuration file to obtain a second analysis result, and store the second analysis result in a second storage address in the preset service system.
In this embodiment, the storage address pointed by the pointer in the configuration enabling instruction may be adjusted to the second storage address, that is, the analysis result in the valid state may be adjusted to the second analysis result, so that the target interface is configured according to the second analysis result to implement the call.
At this time, the user can maintain the interface configuration mode of the preset service system by modifying the storage address pointed by the pointer in the configuration enabling instruction, and third-party developers do not need to develop the interface again.
In addition, in some cases, in the embodiment of the present application, the first analysis result and the second analysis result may exist in the preset service system at the same time, so that the problems that the preset service system cannot be used at all due to the fact that the updated interface configuration file is wrong and the preset service system cannot be corrected in time can be avoided.
In the embodiment of the application, a first interface configuration file is obtained through a preset service system, the first interface configuration file is analyzed, a first analysis result is obtained, at least one piece of first configuration information and the corresponding relation between each preset interface in the preset service system and each first configuration information can be obtained, and at this time, the first analysis result can be used for configuring each preset interface; further, the first parsing result may be stored in a first storage address in the preset service system, so that when a first enabling instruction for the first parsing result is detected, it is determined that the first parsing result is in an effective state, and the target interface is called according to the stored first parsing result. According to the embodiment of the application, each preset interface in the preset service system can be flexibly called according to the stored first analysis result through the first starting instruction, and development and maintenance can be conveniently realized through the first interface configuration file, so that the development efficiency is improved, and the maintenance cost is reduced.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Fig. 3 shows a structural block diagram of an interface calling device provided in the embodiment of the present application, corresponding to the interface calling method described in the foregoing embodiment, and only the relevant parts to the embodiment of the present application are shown for convenience of description.
Referring to fig. 3, the interface calling apparatus 3 includes:
an obtaining module 301, configured to obtain a first interface configuration file through a preset service system;
an analyzing module 302, configured to analyze the first interface configuration file to obtain a first analysis result, where the first analysis result includes at least one first configuration information and a corresponding relationship between each preset interface in the preset service system and each first configuration information;
a storage module 303, configured to store the first analysis result in a first storage address in the preset service system;
a determining module 304, configured to determine that the first parsing result is in an effective state if a first enabling instruction for the first parsing result is detected;
a calling module 305, configured to, when the first parsing result is in an effective state, if a call request for a target interface is detected, call the target interface according to corresponding first configuration information, where the target interface is at least one interface of the preset interfaces.
Optionally, the parsing module 302 specifically includes:
the verification unit is used for verifying whether the format of the first interface configuration file is correct or not;
and the analysis unit is used for analyzing the first interface configuration file to obtain a first analysis result if the format of the first interface configuration file is correct.
Optionally, the interface invoking device 3 further includes:
and the generating module is used for generating a first enabling instruction for the first analysis result at a target moment according to a preset timing starting mode after the first analysis result is stored in a first storage address in the preset service system.
Optionally, each preset interface is uniquely identified by a corresponding interface code.
Optionally, the invoking module 305 specifically includes:
the searching unit is used for searching first configuration information corresponding to a target interface according to the first storage address and an interface code corresponding to the target interface when the first analysis result is in an effective state and if a calling request for the target interface is detected;
and the calling unit is used for calling the engine through the interface and calling the target interface according to the corresponding first configuration information.
Optionally, any one of the first configuration information includes at least one of interface call opportunity information, interface call address information, interface type information, parameter encapsulation mode information, information acquisition mode information, and interface call associated event processing mode information.
Optionally, at least one second analysis result is stored in the preset service system, and each second analysis result is stored in each second storage address in the preset service system;
the interface calling device 3 further includes:
the second obtaining module is used for obtaining a storage address pointed by a pointer in the configuration enabling instruction if the configuration enabling instruction is detected;
a second determining module, configured to determine that the first enabling instruction is detected if the pointer points to the first storage address;
a third determining module, configured to determine that a second enabling instruction related to a second resolution result corresponding to a second storage address pointed to by the pointer is detected and determine that the second resolution result corresponding to the second storage address pointed to by the pointer is in a valid state, if the pointer points to any of the second storage addresses.
In the embodiment of the application, a first interface configuration file is obtained through a preset service system, the first interface configuration file is analyzed, a first analysis result is obtained, at least one piece of first configuration information and the corresponding relation between each preset interface in the preset service system and each first configuration information can be obtained, and at this time, the first analysis result can be used for configuring each preset interface; further, the first parsing result may be stored in a first storage address in the preset service system, so that when a first enabling instruction for the first parsing result is detected, it is determined that the first parsing result is in an effective state, and the target interface is called according to the stored first parsing result. According to the embodiment of the application, each preset interface in the preset service system can be flexibly called according to the stored first analysis result through the first starting instruction, and development and maintenance can be conveniently realized through the first interface configuration file, so that the development efficiency is improved, and the maintenance cost is reduced.
It should be noted that, for the information interaction, execution process, and other contents between the above-mentioned devices/units, the specific functions and technical effects thereof are based on the same concept as those of the embodiment of the method of the present application, and specific reference may be made to the part of the embodiment of the method, which is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
Fig. 4 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 4, the terminal device 4 of this embodiment includes: at least one processor 40 (only one is shown in fig. 4), a memory 41, and a computer program 42 stored in the memory 41 and executable on the at least one processor 40, wherein the processor 40 implements the steps in any of the various interface calling method embodiments when the computer program 42 is executed.
The terminal device 4 may be a server, a mobile phone, a wearable device, an Augmented Reality (AR)/Virtual Reality (VR) device, a desktop computer, a notebook, a desktop computer, a palmtop computer, or other computing devices. The terminal device may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is merely an example of the terminal device 4, and does not constitute a limitation of the terminal device 4, and may include more or less components than those shown, or combine some of the components, or different components, such as may also include input devices, output devices, network access devices, etc. The input device may include a keyboard, a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of a fingerprint), a microphone, a camera, and the like, and the output device may include a display, a speaker, and the like.
The Processor 40 may be a Central Processing Unit (CPU), and the Processor 40 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 41 may be an internal storage unit of the terminal device 4, such as a hard disk or a memory of the terminal device 4. In other embodiments, the memory 41 may also be an external storage device of the terminal device 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like provided on the terminal device 4. Further, the memory 41 may include both an internal storage unit and an external storage device of the terminal device 4. The memory 41 is used for storing an operating system, an application program, a Boot Loader (Boot Loader), data, and other programs, such as program codes of the computer programs. The above-mentioned memory 41 may also be used to temporarily store data that has been output or is to be output.
In addition, although not shown, the terminal device 4 may further include a network connection module, such as a bluetooth module Wi-Fi module, a cellular network module, and the like, which is not described herein again.
In this embodiment, when the processor 40 executes the computer program 42 to implement the steps in any of the interface calling method embodiments, a first interface configuration file is obtained through a preset service system, and the first interface configuration file is analyzed to obtain a first analysis result, so as to obtain at least one piece of first configuration information and a corresponding relationship between each preset interface in the preset service system and each first configuration information, where at this time, the first analysis result may be used to configure each preset interface; further, the first parsing result may be stored in a first storage address in the preset service system, so that when a first enabling instruction for the first parsing result is detected, it is determined that the first parsing result is in an effective state, and the target interface is called according to the stored first parsing result. According to the embodiment of the application, each preset interface in the preset service system can be flexibly called according to the stored first analysis result through the first starting instruction, and development and maintenance can be conveniently realized through the first interface configuration file, so that the development efficiency is improved, and the maintenance cost is reduced.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above method embodiments.
The embodiments of the present application provide a computer program product, which when running on a terminal device, enables the terminal device to implement the steps in the above method embodiments when executed.
The integrated unit may be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as a separate product. Based on such understanding, all or part of the processes in the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. The computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file or some intermediate form. The computer-readable medium may include at least: any entity or device capable of carrying computer program code to a photographing apparatus/terminal apparatus, a recording medium, computer Memory, Read-Only Memory (ROM), random-access Memory (RAM), an electrical carrier signal, a telecommunications signal, and a software distribution medium. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In certain jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and patent practice.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other ways. For example, the above-described apparatus/network device embodiments are merely illustrative, and for example, the division of the above modules or units is only one logical function division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. An interface calling method, comprising:
acquiring a first interface configuration file through a preset service system;
analyzing the first interface configuration file to obtain a first analysis result, wherein the first analysis result comprises at least one piece of first configuration information and corresponding relations between each preset interface in the preset service system and each first configuration information;
storing the first analysis result in a first storage address in the preset service system;
if a first enabling instruction for the first analysis result is detected, determining that the first analysis result is in an effective state;
when the first analysis result is in an effective state, if a calling request for a target interface is detected, calling the target interface according to corresponding first configuration information, wherein the target interface is at least one interface in the preset interfaces.
2. The interface call method as claimed in claim 1, wherein said parsing said first interface configuration file to obtain a first parsing result comprises:
checking whether the format of the first interface configuration file is correct;
and if the format of the first interface configuration file is correct, analyzing the first interface configuration file to obtain a first analysis result.
3. The interface call method as recited in claim 1, further comprising:
and after the first analysis result is stored in a first storage address in the preset service system, generating a first enabling instruction for the first analysis result at a target moment according to a preset timing starting mode.
4. The interface call method as claimed in claim 1, wherein each of the predetermined interfaces is uniquely identified by a corresponding interface code.
5. The interface calling method according to claim 4, wherein the calling the target interface according to the corresponding first configuration information if the calling request for the target interface is detected when the first parsing result is in an effective state, comprises:
when the first analysis result is in an effective state, if a calling request for a target interface is detected, searching first configuration information corresponding to the target interface according to the first storage address and an interface code corresponding to the target interface;
and calling the target interface according to the corresponding first configuration information through an interface calling engine.
6. The interface calling method according to claim 1, wherein any of the first configuration information includes at least one of interface call opportunity information, interface call address information, interface type information, parameter encapsulation mode information, information acquisition mode information, and interface call associated event handling mode information.
7. The interface calling method according to any one of claims 1 to 6, wherein at least one second analysis result is stored in the preset service system, and each second analysis result is stored in each second storage address in the preset service system;
the interface calling method further comprises the following steps:
if a configuration enabling instruction is detected, acquiring a storage address pointed by a pointer in the configuration enabling instruction;
determining that the first enable instruction is detected if the pointer points to the first memory address;
if the pointer points to any second storage address, determining that a second enabling instruction related to a second analysis result corresponding to the second storage address pointed by the pointer is detected, and determining that the second analysis result corresponding to the second storage address pointed by the pointer is in a valid state.
8. An interface invocation apparatus, comprising:
the acquisition module is used for acquiring a first interface configuration file through a preset service system;
the analysis module is used for analyzing the first interface configuration file to obtain a first analysis result, wherein the first analysis result comprises at least one piece of first configuration information and corresponding relations between each preset interface in the preset service system and each piece of first configuration information;
the storage module is used for storing the first analysis result in a first storage address in the preset service system;
a determining module, configured to determine that the first parsing result is in an effective state if a first enabling instruction for the first parsing result is detected;
and the calling module is used for calling the target interface according to corresponding first configuration information if a calling request for the target interface is detected when the first analysis result is in an effective state, wherein the target interface is at least one interface in the preset interfaces.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the interface call method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the interface call method according to any one of claims 1 to 7.
CN202010467362.7A 2020-05-28 2020-05-28 Interface calling method, interface calling device and terminal equipment Pending CN111638983A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010467362.7A CN111638983A (en) 2020-05-28 2020-05-28 Interface calling method, interface calling device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010467362.7A CN111638983A (en) 2020-05-28 2020-05-28 Interface calling method, interface calling device and terminal equipment

Publications (1)

Publication Number Publication Date
CN111638983A true CN111638983A (en) 2020-09-08

Family

ID=72328761

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010467362.7A Pending CN111638983A (en) 2020-05-28 2020-05-28 Interface calling method, interface calling device and terminal equipment

Country Status (1)

Country Link
CN (1) CN111638983A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422566A (en) * 2020-11-18 2021-02-26 青岛海尔科技有限公司 Remote call processing method and device, storage medium and electronic device
CN113238817A (en) * 2021-05-20 2021-08-10 上海销氪信息科技有限公司 Interface transparent transmission method and device, electronic equipment and storage medium
CN114374727A (en) * 2022-01-13 2022-04-19 平安付科技服务有限公司 Data calling method and device based on artificial intelligence, electronic equipment and medium
CN115185717A (en) * 2022-09-14 2022-10-14 北京达佳互联信息技术有限公司 Interface calling method and device, electronic equipment and storage medium
CN115378996A (en) * 2022-08-25 2022-11-22 北京分贝通科技有限公司 Method, device, equipment and storage medium for intersystem data transmission

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112422566A (en) * 2020-11-18 2021-02-26 青岛海尔科技有限公司 Remote call processing method and device, storage medium and electronic device
CN113238817A (en) * 2021-05-20 2021-08-10 上海销氪信息科技有限公司 Interface transparent transmission method and device, electronic equipment and storage medium
CN114374727A (en) * 2022-01-13 2022-04-19 平安付科技服务有限公司 Data calling method and device based on artificial intelligence, electronic equipment and medium
CN114374727B (en) * 2022-01-13 2024-04-02 平安付科技服务有限公司 Data calling method and device based on artificial intelligence, electronic equipment and medium
CN115378996A (en) * 2022-08-25 2022-11-22 北京分贝通科技有限公司 Method, device, equipment and storage medium for intersystem data transmission
CN115378996B (en) * 2022-08-25 2023-12-15 北京分贝通科技有限公司 Method, device, equipment and storage medium for data transmission between systems
CN115185717A (en) * 2022-09-14 2022-10-14 北京达佳互联信息技术有限公司 Interface calling method and device, electronic equipment and storage medium
CN115185717B (en) * 2022-09-14 2023-01-20 北京达佳互联信息技术有限公司 Interface calling method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111638983A (en) Interface calling method, interface calling device and terminal equipment
US11550599B2 (en) Method and apparatus for running applet
CN107391359B (en) Service testing method and device
CN111581291A (en) Data processing method and device, electronic equipment and readable medium
CN105357204B (en) Method and device for generating terminal identification information
CN111143087A (en) Interface calling method and device, storage medium and server
CN115185717B (en) Interface calling method and device, electronic equipment and storage medium
CN114579107A (en) Data processing method, device, equipment and medium
CN113704307A (en) Data query method, device, server and computer readable storage medium
CN110619204A (en) Invitation code generation method and device, terminal equipment and storage medium
CN111259049A (en) Information query method, information query device and terminal equipment
CN111142863A (en) Page generation method and device
CN111352997A (en) Test environment verification method and system
CN111124627B (en) Method and device for determining call initiator of application program, terminal and storage medium
CN111273939A (en) Information processing method, information processing device and terminal equipment
CN110908882A (en) Performance analysis method and device of application program, terminal equipment and medium
CN112527302A (en) Error detection method and device, terminal and storage medium
CN116804929A (en) Version application analysis method and device, electronic equipment and storage medium
CN112379967B (en) Simulator detection method, device, equipment and medium
CN113761588A (en) Data verification method and device, terminal equipment and storage medium
CN111367634A (en) Information processing method, information processing device and terminal equipment
CN113590352A (en) Data calling method, device, equipment and readable storage medium
CN113342553A (en) Data acquisition method and device, electronic equipment and storage medium
CN113760993A (en) Service data query method and device and electronic equipment
CN111796865A (en) Byte code file modification method and device, terminal equipment and 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