CN117290019A - Interface calling method and device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN117290019A
CN117290019A CN202311196141.0A CN202311196141A CN117290019A CN 117290019 A CN117290019 A CN 117290019A CN 202311196141 A CN202311196141 A CN 202311196141A CN 117290019 A CN117290019 A CN 117290019A
Authority
CN
China
Prior art keywords
interface
field
fields
target
data file
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
CN202311196141.0A
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.)
Ping An Health Insurance Company of China Ltd
Original Assignee
Ping An Health Insurance Company of China 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 Ping An Health Insurance Company of China Ltd filed Critical Ping An Health Insurance Company of China Ltd
Priority to CN202311196141.0A priority Critical patent/CN117290019A/en
Publication of CN117290019A publication Critical patent/CN117290019A/en
Pending legal-status Critical Current

Links

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/4488Object-oriented
    • G06F9/449Object-oriented method invocation or resolution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention provides an interface calling method, an interface calling device, computer equipment and a storage medium. The method comprises the following steps: acquiring interface information of a target interface; analyzing the interface information to obtain a plurality of first interface fields; the plurality of first interface fields comprise first interface fields with different corresponding field types; performing data processing on the first interface field to generate a data file; the data file comprises a plurality of second interface fields, and the types of the data files corresponding to the second interface fields are the same; and running the data file to realize the call of the target interface. The invention can realize the call of the target interface without manually processing the data of the interface field of the target interface by the developer, thereby reducing the operation steps of the developer in the process of calling the target interface and further improving the efficiency of architecture development.

Description

Interface calling method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of data processing technology and the field of digital medical treatment, and in particular, to an interface calling method, an interface calling device, a computer device, and a storage medium.
Background
In the development process of the system architecture in the medical field, for example, the development of the diagnosis and treatment system architecture and the development of the medical system architecture, if the development of a plurality of service modules is involved, corresponding interfaces are required to be set for different service modules, so that the service data can be called by the different service modules. In the related art, a developer usually performs data processing on an interface field of an interface manually, that is, manually copies the interface field into a development file, and runs the development file to complete calling of the interface.
However, for some interfaces with more corresponding interface fields, a developer is required to spend a lot of time to manually process data on the interface fields of the interface, which greatly reduces the efficiency of architecture development.
Disclosure of Invention
The invention mainly aims to provide an interface calling method, an interface calling device, computer equipment and a storage medium, and aims to solve the technical problem that in the process of architecture development, data processing is needed to be carried out on interface fields manually, so that the architecture development efficiency is reduced.
In order to achieve the above object, the present invention provides an interface calling method, which includes:
acquiring interface information of a target interface;
analyzing the interface information to obtain a plurality of first interface fields; the plurality of first interface fields comprise first interface fields with different corresponding field types;
performing data processing on the first interface field to generate a data file; the data file comprises a plurality of second interface fields, and the types of the data files corresponding to the second interface fields are the same;
and running the data file to realize the call of the target interface.
Optionally, the processing the data of the plurality of first interface fields to generate a data file includes:
packaging the plurality of first interface fields into a preset object model to obtain a target object model;
and converting the plurality of first interface fields through the target object model to generate a data file.
Optionally, the encapsulating the plurality of first interface fields into a preset object model to obtain a target object model includes:
analyzing the plurality of first interface fields to obtain a plurality of field information; each first interface field of the plurality of first interface fields corresponds to at least one field information;
and encapsulating the plurality of field information into the object model according to the field type corresponding to each field information in the plurality of field information to obtain a target object model.
Optionally, the converting, by the target object model, the plurality of first interface fields to generate a data file includes:
acquiring a field type corresponding to each first interface field encapsulated in the target object model;
and creating a data file corresponding to each first interface field according to the field type corresponding to each first interface field through the target object model.
Optionally, the creating the data file corresponding to each first interface field according to the field type corresponding to each first interface field includes:
and for the first interface field with the field type being the target type, creating a data file corresponding to each first interface field with the field type being the target type.
Optionally, the creating the data file corresponding to each first interface field according to the field type corresponding to each first interface field includes:
and for the first interface field with the field type not being the target type, creating a data file corresponding to each field type.
Optionally, the obtaining the interface information of the target interface includes:
acquiring an interface identifier of the target interface;
generating a call request for the target interface based on the interface identifier and user information associated with the target interface;
and responding to the call request, and acquiring interface information of the target interface.
In addition, to achieve the above object, the present invention also provides an interface calling device, including:
the first acquisition module is used for acquiring interface information of the target interface;
the analysis module is used for analyzing the interface information to obtain a plurality of first interface fields; the plurality of first interface fields comprise first interface fields with different corresponding field types;
the first generation module is used for carrying out data processing on the plurality of first interface fields to generate a data file; the data file comprises a plurality of second interface fields, and the types of the data files corresponding to the second interface fields are the same;
and the operation module is used for operating the data file to realize the call of the target interface.
In order to solve the above technical problems, the embodiments of the present application further provide a computer device, which adopts the following technical schemes:
the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of any one of the interface calling methods provided in the embodiments of the application when executing the computer program.
In order to solve the above technical problems, embodiments of the present application further provide a computer readable storage medium, which adopts the following technical solutions:
the computer readable storage medium stores a computer program which, when executed by a processor, implements the steps of the interface calling method set forth in any of the embodiments of the present application.
Compared with the prior art, the embodiment of the application has the following main beneficial effects:
the invention provides an interface calling method, an interface calling device, computer equipment and a storage medium. The interface calling method comprises the following steps: acquiring interface information of a target interface; analyzing the interface information to obtain a plurality of first interface fields; the plurality of first interface fields comprise first interface fields with different corresponding field types; performing data processing on the plurality of first interface fields to generate a data file; the data file comprises a plurality of second interface fields, and the types of the data files corresponding to the second interface fields are the same; and running the data file to realize the call of the target interface. According to the interface calling method provided by the embodiment of the invention, the interface information of the target interface is obtained, the interface information is analyzed to obtain the first interface field, and the data file is generated according to the first interface field, so that the data file is operated, and the calling of the target interface is realized. The call of the target interface can be realized without manually carrying out data processing on the interface field of the target interface by a developer, so that the operation steps of the developer in the process of calling the target interface are reduced, and the efficiency of architecture development is improved.
Drawings
For a clearer description of the solution in the present application, a brief description will be given below of the drawings that are needed in the description of the embodiments of the present application, it being obvious that the drawings in the following description are some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 is an exemplary system architecture diagram in which the present application may be applied;
FIG. 2 is a flow chart of an interface calling method provided by an embodiment of the present invention;
FIG. 3 is an application scenario diagram of an interface calling method provided by an embodiment of the present invention;
FIG. 4 is a schematic structural diagram of one embodiment of a computer device according to the present application;
fig. 5 is a basic structural block diagram of the computer device of the present embodiment.
Detailed Description
The method for determining a data format provided in the embodiments of the present invention is applied to a data processing system, and all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains unless defined otherwise; the terminology used in the description of the applications herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having" and any variations thereof in the description and claims of the present application and in the description of the figures above are intended to cover non-exclusive inclusions. The terms first, second and the like in the description and in the claims or in the above-described figures, are used for distinguishing between different objects and not necessarily for describing a sequential or chronological order.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
In order to better understand the technical solutions of the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications, such as a web browser application, a shopping class application, a search class application, an instant messaging tool, a mailbox client, social networking platform software, etc., may be installed on the terminal devices 101, 102, 103.
The terminal devices 101, 102, 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablet computers, electronic book readers, MP3 players (Moving Picture Experts Group Audio Layer III, dynamic video expert compression standard audio plane 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic video expert compression standard audio plane 4) players, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background server providing support for pages displayed on the terminal devices 101, 102, 103.
It should be noted that, the interface calling method provided in the embodiments of the present application is generally executed by a server/terminal device, and accordingly, the interface calling device is generally disposed in the server/terminal device.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow chart of one embodiment of an interface invocation method according to the present application is shown. The embodiment of the application can acquire and process related data based on the artificial intelligence technology, wherein the interface calling method can be applied to the interface calling device. The interface calling method provided by the embodiment of the invention comprises the following steps:
s210, obtaining interface information of a target interface.
In this step, in the process of calling the target interface, interface information of the target interface needs to be acquired, where the interface information includes a plurality of interface fields.
Optionally, the interface calling device acquires interface information of the target interface when receiving a call request for the target interface.
Alternatively, the developer may perform a corresponding operation on the interface calling device to generate the call request, in which case the interface calling device obtains the interface information of the target interface.
S220, analyzing the interface information to obtain a plurality of first interface fields.
In this step, the interface information may be parsed to obtain a plurality of first interface fields, where the plurality of first interface fields include first interface fields with different corresponding field types.
For example, the plurality of first interface fields are 5 first interface fields, and a field type corresponding to 2 first interface fields in the 5 first interface fields is String, and a field type corresponding to the other 3 first interface fields is number.
S230, data processing is carried out on the plurality of first interface fields, and a data file is generated.
The data file comprises a plurality of second interface fields, and the types of the data files corresponding to the second interface fields are the same. For example, the data file type corresponding to each second interface field is java, that is, the data file is a java file.
For a specific embodiment of how to generate a data file according to data processing performed on the plurality of first interface fields, please refer to the following embodiment.
S240, running the data file to realize the call of the target interface.
In this step, after the data file is generated, the data file may be copied into a model directory specified by the architecture development engineering, so as to run the data file, and further implement the call of the target interface.
In this embodiment, interface information of a target interface is acquired, and the interface information is parsed to obtain a plurality of first interface fields; and carrying out data processing on the plurality of first interface fields to generate a data file, and further running the data file to realize the calling of the target interface. The call of the target interface can be realized without manually carrying out data processing on the interface field of the target interface by a developer, so that the operation steps of the developer in the process of calling the target interface are reduced, and the efficiency of architecture development is improved.
Optionally, the processing the data of the plurality of first interface fields to generate a data file includes:
packaging the plurality of first interface fields into a preset object model to obtain a target object model;
and converting the plurality of first interface fields through the target object model to generate a data file.
In this embodiment, an object model is preset, where the object model may be understood as a model for performing data processing on an object, where the object includes a class, that is, a type corresponding to an interface field may be understood as an object.
In this embodiment, a plurality of first interface fields are encapsulated into a preset object model, that is, the object model is applied to perform data processing on the first interface fields, so as to obtain a target object model. Further, the plurality of first interface fields are converted through the target object model to generate a data file.
The conversion process includes, but is not limited to, converting a type of the first interface field, and converting a data format of the first interface field.
Optionally, the encapsulating the plurality of first interface fields into a preset object model to obtain a target object model includes:
analyzing the plurality of first interface fields to obtain a plurality of field information; each first interface field of the plurality of first interface fields corresponds to at least one field information;
and encapsulating the plurality of field information into the object model according to the field type corresponding to each field information in the plurality of field information to obtain a target object model.
It should be understood that each first interface field corresponds to at least one field information. The field information includes, but is not limited to, field name, type, and comment.
In this embodiment, a plurality of first interface fields are parsed to obtain a plurality of field information. And then, according to the field type corresponding to each field information, packaging a plurality of field information into the object model to obtain the target object model. It should be appreciated that the root node of the target object model may characterize different field types, and that the field types corresponding to the interface fields encapsulated by the target object model may be determined by traversing the root node of the target object model.
In this embodiment, multiple first interface fields are parsed to obtain multiple field information, and then the multiple field information is encapsulated into an object model to obtain a target object model, so that multiple first interface fields can be obtained based on the target object model, missing or errors of the interface fields are avoided, and subsequent maintenance of the target interface by a developer is facilitated.
Optionally, the converting, by the target object model, the plurality of first interface fields to generate a data file includes:
acquiring a field type corresponding to each first interface field encapsulated in the target object model;
and creating a data file corresponding to each first interface field according to the field type corresponding to each first interface field through the target object model.
As described above, the target object model encapsulates a plurality of first fields, and the root node of the target object model may characterize different field types. In this embodiment, the root node of the target object model may be traversed, and the field type corresponding to each first interface field in the target object model may be determined, so that the data file corresponding to each first interface field is created according to the field type corresponding to each first interface field.
For example, for an interface field with a field type String, a data file is created for the interface field; for an interface field of field type number, another data file is created for the interface field.
In this embodiment, for the interface fields of different field types encapsulated in the target object model, the data file corresponding to the interface field is automatically created, without manually performing data processing on the interface field, so that the efficiency of architecture development is improved.
Optionally, the creating the data file corresponding to each first interface field according to the field type corresponding to each first interface field includes:
and for the first interface field with the field type being the target type, creating a data file corresponding to each first interface field with the field type being the target type.
Optionally, the object type is an object type. In this embodiment, a corresponding data file is created for a first interface field of which each field type is an object.
For example, if the number of the first interface fields of the object type encapsulated in the target object model is 10, 10 data files corresponding to the first interface fields one by one are created.
Alternatively, a java file may be created according to the field name of the first interface field of the object type, specifically, a DTO end is added after the field name, so as to create a java file, and an annotation for the first interface field may be added in the java file.
Optionally, the creating the data file corresponding to each first interface field according to the field type corresponding to each first interface field includes:
and for the first interface field with the field type not being the target type, creating a data file corresponding to each field type.
Optionally, the object type is an object type. In this embodiment, a corresponding data file is created for each field type that is not the target type.
For example, if the first interface field of the string type and the first interface field of the number type are encapsulated in the target object model, 2 data files are created, wherein 1 data file corresponds to the first interface field of the string type, and the other 1 data file corresponds to the first interface field of the number type.
Alternatively, for non-target type fields such as String, number, array, boolean and nteger, the corresponding data file may be created directly.
Optionally, the obtaining the interface information of the target interface includes:
acquiring an interface identifier of the target interface;
generating a call request for the target interface based on the interface identifier and user information associated with the target interface;
and responding to the call request, and acquiring interface information of the target interface.
In this embodiment, the interface management platform may be invoked to obtain the interface identifier of the target interface. Wherein the interface identifier is also called requestId, and optionally the interface management platform is yapi platform.
In this embodiment, the behavior of the login service module of the user may be simulated based on the user information associated with the interface identifier and the target interface, so as to generate a call request, and the call request may be sent to the interface call device to call the login service module of the target interface.
Optionally, a login_by_um interface in the business module may be invoked, simulating a user's login operation based on the interface identification and user information.
And the interface calling device responds to the calling request and acquires the interface information of the target interface.
In order to facilitate understanding of the overall technical solution provided in this embodiment, please refer to fig. 3, as shown in fig. 3, an interface identifier is obtained, a user login behavior is simulated based on the interface identifier and user information, so as to generate a call request, and interface information of a target interface is obtained. And packaging the interface field to obtain the target object model. For an interface field with a field type of object in the target object model, creating a data file corresponding to the interface field; for an interface field with a field type which is not an object in the target object model, creating a data file corresponding to the field type of the interface field; and further running the data file to realize the call of the target interface.
Those skilled in the art will appreciate that implementing all or part of the above-described methods in accordance with the embodiments may be accomplished by way of a computer program stored in a computer-readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. The storage medium may be a nonvolatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a random access Memory (Random Access Memory, RAM).
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
With further reference to fig. 4, as an implementation of the method shown in fig. 2, the present application provides an embodiment of an interface calling device 400, where an embodiment of the device corresponds to the embodiment of the method shown in fig. 2, and the device may be specifically applied to various electronic devices.
The embodiment of the invention provides an interface calling device 400, and the interface calling device 400 comprises:
a first obtaining module 410, configured to obtain interface information of the target interface;
the parsing module 420 is configured to parse the interface information to obtain a plurality of first interface fields; the plurality of first interface fields comprise first interface fields with different corresponding field types;
a first generating module 430, configured to perform data processing on the plurality of first interface fields to generate a data file; the data file comprises a plurality of second interface fields, and the types of the data files corresponding to the second interface fields are the same;
and the operation module 430 is configured to operate the data file to implement the call of the target interface.
Optionally, the first generating module 430 is specifically configured to:
packaging the plurality of first interface fields into a preset object model to obtain a target object model;
and converting the plurality of first interface fields through the target object model to generate a data file.
Optionally, the first generating module 430 is further specifically configured to:
analyzing the plurality of first interface fields to obtain a plurality of field information; each first interface field of the plurality of first interface fields corresponds to at least one field information;
and encapsulating the plurality of field information into the object model according to the field type corresponding to each field information in the plurality of field information to obtain a target object model.
Optionally, the first generating module 430 is further specifically configured to:
acquiring a field type corresponding to each first interface field encapsulated in the target object model;
and creating a data file corresponding to each first interface field according to the field type corresponding to each first interface field through the target object model.
Optionally, the first generating module 430 is further specifically configured to:
and for the first interface field with the field type being the target type, creating a data file corresponding to each first interface field with the field type being the target type.
Optionally, the first generating module 430 is further specifically configured to:
and for the first interface field with the field type not being the target type, creating a data file corresponding to each field type.
Optionally, the interface calling device 400 further includes:
the second acquisition module is used for acquiring the interface identification of the target interface;
the second generation module is used for generating a call request for the target interface based on the interface identifier and the user information associated with the target interface;
and the third acquisition module is used for responding to the call request and acquiring the interface information of the target interface.
In this embodiment, interface information of a target interface is acquired, and the interface information is parsed to obtain a plurality of first interface fields; and carrying out data processing on the plurality of first interface fields to generate a data file, and further running the data file to realize the calling of the target interface. The call of the target interface can be realized without manually carrying out data processing on the interface field of the target interface by a developer, so that the operation steps of the developer in the process of calling the target interface are reduced, and the efficiency of architecture development is improved.
In order to solve the technical problems, the embodiment of the application also provides computer equipment. Referring specifically to fig. 5, fig. 5 is a basic structural block diagram of a computer device according to the present embodiment.
The computer device 5 comprises a memory 51, a processor 52, a network interface 53 which are communicatively connected to each other via a system bus. It should be noted that only the computer device 5 with components 51-53 is shown in the figures, but it should be understood that not all of the illustrated components are required to be implemented and that more or fewer components may be implemented instead. It will be appreciated by those skilled in the art that the computer device herein is a device capable of automatically performing numerical calculations and/or information processing in accordance with predetermined or stored instructions, the hardware of which includes, but is not limited to, microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASICs), programmable gate arrays (fields-Programmable Gate Array, FPGAs), digital processors (Digital Signal Processor, DSPs), embedded devices, etc.
The computer equipment can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing equipment. The computer equipment can perform man-machine interaction with a user through a keyboard, a mouse, a remote controller, a touch pad or voice control equipment and the like.
The memory 51 includes at least one type of readable storage medium including flash memory, hard disk, multimedia card, card memory (e.g., SD or DX memory, etc.), random Access Memory (RAM), static Random Access Memory (SRAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), programmable Read Only Memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the storage 51 may be an internal storage unit of the computer device 5, such as a hard disk or a memory of the computer device 5. In other embodiments, the memory 51 may also be an external storage device of the computer device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the computer device 5. Of course, the memory 51 may also comprise both an internal memory unit of the computer device 5 and an external memory device. In this embodiment, the memory 51 is typically used to store an operating system and various types of application software installed on the computer device 5, such as program codes of the X method, and the like. Further, the memory 51 may be used to temporarily store various types of data that have been output or are to be output.
The processor 52 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 52 is typically used to control the overall operation of the computer device 5. In this embodiment, the processor 52 is configured to execute the program code stored in the memory 51 or process data, for example, execute the program code of the interface calling method.
The network interface 53 may comprise a wireless network interface or a wired network interface, which network interface 53 is typically used to establish communication connections between the computer device 5 and other electronic devices.
The present application also provides another embodiment, namely, a computer-readable storage medium storing the interface calling program, where the interface calling program is executable by at least one processor, so that the at least one processor performs the steps of the interface calling method as described above.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general purpose hardware online platform, and of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method described in the embodiments of the present application.
The subject application is operational with numerous general purpose or special purpose computer system environments or configurations. For example: personal computers, server computers, hand-held or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like. The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
It is apparent that the embodiments described above are only some embodiments of the present application, but not all embodiments, the preferred embodiments of the present application are given in the drawings, but not limiting the patent scope of the present application. This application may be embodied in many different forms, but rather, embodiments are provided in order to provide a more thorough understanding of the present disclosure. Although the present application has been described in detail with reference to the foregoing embodiments, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing, or equivalents may be substituted for elements thereof. All equivalent structures made by the specification and the drawings of the application are directly or indirectly applied to other related technical fields, and are also within the protection scope of the application.

Claims (10)

1. An interface calling method, comprising:
acquiring interface information of a target interface;
analyzing the interface information to obtain a plurality of first interface fields; the plurality of first interface fields comprise first interface fields with different corresponding field types;
performing data processing on the plurality of first interface fields to generate a data file; the data file comprises a plurality of second interface fields, and the types of the data files corresponding to the second interface fields are the same;
and running the data file to realize the call of the target interface.
2. The method of claim 1, wherein the data processing the plurality of first interface fields to generate a data file comprises:
packaging the plurality of first interface fields into a preset object model to obtain a target object model;
and converting the plurality of first interface fields through the target object model to generate a data file.
3. The method of claim 2, wherein encapsulating the plurality of first interface fields into a preset object model to obtain a target object model comprises:
analyzing the plurality of first interface fields to obtain a plurality of field information; each first interface field of the plurality of first interface fields corresponds to at least one field information;
and encapsulating the plurality of field information into the object model according to the field type corresponding to each field information in the plurality of field information to obtain a target object model.
4. The method of claim 2, wherein the converting the plurality of first interface fields by the target object model to generate a data file comprises:
acquiring a field type corresponding to each first interface field encapsulated in the target object model;
and creating a data file corresponding to each first interface field according to the field type corresponding to each first interface field through the target object model.
5. The method of claim 4, wherein creating the data file corresponding to each first interface field according to the field type corresponding to each first interface field comprises:
and for the first interface field with the field type being the target type, creating a data file corresponding to each first interface field with the field type being the target type.
6. The method of claim 4, wherein creating the data file corresponding to each first interface field according to the field type corresponding to each first interface field comprises:
and for the first interface field with the field type not being the target type, creating a data file corresponding to each field type.
7. The method according to any one of claims 1-6, wherein the obtaining interface information of the target interface includes:
acquiring an interface identifier of the target interface;
generating a call request for the target interface based on the interface identifier and user information associated with the target interface;
and responding to the call request, and acquiring interface information of the target interface.
8. An interface calling device, comprising:
the first acquisition module is used for acquiring interface information of the target interface;
the analysis module is used for analyzing the interface information to obtain a plurality of first interface fields; the plurality of first interface fields comprise first interface fields with different corresponding field types;
the first generation module is used for carrying out data processing on the plurality of first interface fields to generate a data file; the data file comprises a plurality of second interface fields, and the types of the data files corresponding to the second interface fields are the same;
and the operation module is used for operating the data file to realize the call of the target interface.
9. A computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the interface invoking method as claimed in any of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the interface invoking method according to any of claims 1 to 7.
CN202311196141.0A 2023-09-15 2023-09-15 Interface calling method and device, computer equipment and storage medium Pending CN117290019A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311196141.0A CN117290019A (en) 2023-09-15 2023-09-15 Interface calling method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311196141.0A CN117290019A (en) 2023-09-15 2023-09-15 Interface calling method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117290019A true CN117290019A (en) 2023-12-26

Family

ID=89256446

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311196141.0A Pending CN117290019A (en) 2023-09-15 2023-09-15 Interface calling method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117290019A (en)

Similar Documents

Publication Publication Date Title
CN112416458A (en) Preloading method and device based on ReactNative, computer equipment and storage medium
CN113536185B (en) Application page loading method, storage medium and related equipment
CN114564294A (en) Intelligent service arranging method and device, computer equipment and storage medium
CN115794437A (en) Calling method and device of microservice, computer equipment and storage medium
CN116644213A (en) XML file reading method, device, equipment and storage medium
CN111552463A (en) Page jump method and device, computer equipment and storage medium
CN112860662B (en) Automatic production data blood relationship establishment method, device, computer equipment and storage medium
CN116974927A (en) Performance automatic test method, system, computer equipment and storage medium
CN117033249A (en) Test case generation method and device, computer equipment and storage medium
CN114626352B (en) Report automatic generation method, device, computer equipment and storage medium
CN110765610B (en) PDM integration method, PDM integration device, computer equipment and storage medium
CN117290019A (en) Interface calling method and device, computer equipment and storage medium
CN112714148A (en) Interface configuration method, device, equipment and medium
CN117271635A (en) List export method, device, computer equipment and storage medium
CN116894736A (en) Mail management method, device, computer equipment and storage medium
CN114238466A (en) Message pushing method and device, computer equipment and storage medium
CN117499270A (en) Flow processing method and device, computer equipment and storage medium
CN117851014A (en) Application program calling method and device, computer equipment and storage medium
CN117828221A (en) Page event statistics method based on buried point technology and related equipment thereof
CN116149665A (en) XAML file modification method, XAML file modification device, computer equipment and storage medium
CN114842097A (en) Method for converting picture format and related equipment thereof
CN117827320A (en) Service execution method, device, equipment and storage medium thereof
CN117806738A (en) Service scheduling method, device, equipment and storage medium based on micro-link model
CN116467145A (en) Page performance data acquisition method and device, computer equipment and storage medium
CN117056052A (en) Timing task processing method, device, equipment and storage medium thereof

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