Interface generation method, device, electronic device and storage medium

By determining the data acquisition plug-in matching the target data carrier, obtaining and processing the data carrier data, and generating the target API interface, the problems of high data openness and low interface generation efficiency are solved, real-time release of data sets and different data carriers are realized Efficient adaptation.

CN112506490BActive Publication Date: 2025-02-14TIANJUDIHE (SUZHOU) TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011455254.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-10
Publication Date
2025-02-14
Estimated Expiration
2040-12-10

AI Technical Summary

Technical Problem

In the prior art, data openness is high, interface generation efficiency is low, making it difficult to realize real-time release of data sets and efficient adaptation of different data carriers.

Method used

By determining the target data acquisition plug-in that matches the target data carrier, the plug-in obtains the target carrier data, and generates the target API interface based on the data, reducing the complexity of data openness and improving the interface development efficiency.

Benefits of technology

It realizes the reduction of data openness complexity, improves interface generation efficiency, supports efficient adaptation of different data carriers and real-time release of data sets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112506490B_ABST
    Figure CN112506490B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention discloses an interface generation method, device, electronic device and storage medium. The interface generation method comprises: determining a target data acquisition plug-in that matches a target data carrier; acquiring target carrier data according to the target data acquisition plug-in; and generating a target API according to the target carrier data. The technical solution of the embodiment of the present invention can reduce the complexity of data opening and improve the efficiency of interface development.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of data processing technology, and in particular to an interface generation method, device, electronic device and storage medium. Background Art

[0002] With the development of Internet technology, a large amount of data has been generated, and the data generated generally has different data carriers. Publishing the data on different data carriers into interfaces has become a technical point in the field of data processing technology.

[0003] In the prior art, data stored in different data carriers can be published as APIs (Application Programming Interfaces) by coding, but this method is time-consuming and labor-intensive, and also involves the management of data access rights of the user object, which greatly increases the complexity of data set opening. Alternatively, the data can be unified using ETL (Extract Transform Load, data warehouse technology) tools before being exported to the API. This method is a complex and time-consuming project, and it is difficult to publish incremental data in real time. Summary of the invention

[0004] The embodiments of the present invention provide an interface generation method, device, electronic device and storage medium to reduce the complexity of data opening and improve the efficiency of interface development.

[0005] In a first aspect, an embodiment of the present invention provides an interface generation method, comprising:

[0006] Determine a target data acquisition plug-in that matches the target data carrier;

[0007] Acquire target carrier data according to target data acquisition plug-in;

[0008] Generate a target API based on the target carrier data.

[0009] In a second aspect, an embodiment of the present invention further provides an interface generation device, including:

[0010] A plug-in determination module, used to determine a target data acquisition plug-in that matches a target data carrier;

[0011] A target carrier data acquisition module, used to acquire target carrier data according to a target data acquisition plug-in;

[0012] The target API generation module is used to generate a target API according to target carrier data.

[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0014] one or more processors;

[0015] A storage device for storing one or more programs;

[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the interface generation method provided by any embodiment of the present invention.

[0017] In a fourth aspect, an embodiment of the present invention further provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, the interface generation method provided by any embodiment of the present invention is implemented.

[0018] The technical solution of this embodiment, by determining the target data acquisition plug-in that matches the target data carrier, further utilizes the target data acquisition plug-in and the location information of the target carrier data to acquire the target carrier data, and finally processes and transforms the target carrier data to generate a target API interface, thereby solving the problems of high data opening complexity and low interface generation efficiency, and achieving the effect of reducing the complexity of data opening and improving interface development efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a flow chart of an interface generation method provided in Embodiment 1 of the present invention;

[0020] Figure 2 is a flow chart of an interface generation method provided by Embodiment 2 of the present invention;

[0021] Figure 3 is a schematic diagram of an interface generating device provided by Embodiment 3 of the present invention;

[0022] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION

[0023] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention.

[0024] It should also be noted that, for ease of description, only the part relevant to the present invention but not all content is shown in the accompanying drawings. It should be mentioned before discussing exemplary embodiments in more detail that some exemplary embodiments are described as processing or methods depicted as flow charts. Although the flow chart describes each operation (or step) as sequential processing, many operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. When its operation is completed, the processing can be terminated, but it can also have additional steps not included in the accompanying drawings. The processing can correspond to methods, functions, procedures, subroutines, subprograms, etc.

[0025] Embodiment 1

[0026] Figure 1 is a flow chart of an interface generation method provided by the first embodiment of the present invention. This embodiment is applicable to the case of efficiently developing interfaces for data of different data carriers. The method can be executed by an interface generation device, which can be implemented by software and / or hardware and can generally be integrated in an electronic device. Figure 1 As shown, the method includes the following operations:

[0027] S110, determining a target data acquisition plug-in that matches the target data carrier.

[0028] The data carrier may be a medium for storing target data, the target data carrier may be a data carrier for which an interface needs to be generated, the target data acquisition plug-in may be a plug-in with a target data acquisition function, and the target data may be data on the target data carrier.

[0029] Specifically, the target data acquisition plug-in adapted to the target data carrier can be queried according to the target data carrier, that is, the target data acquisition plug-in matching with the target data carrier can be determined according to the target data carrier.

[0030] In an optional embodiment of the present invention, before determining the target data acquisition plug-in that matches the target data carrier, it may also include: receiving an operation notification request from each data acquisition plug-in; isolating and operating each data acquisition plug-in through a plug-in microservice; wherein one data acquisition plug-in corresponds to one plug-in microservice.

[0031] The data acquisition plug-in may be a plug-in with a data acquisition function. The run notification request may be a notification request sent when the data acquisition plug-in is started, indicating that the data acquisition plug-in can or is running. The plug-in microservice may be a microservice that runs the plug-in. For example, the plug-in microservice may be a container that runs the plug-in.

[0032] It should be noted that each data carrier can correspond to a data acquisition plug-in. Even if the data carriers are of the same type but have different versions, different data acquisition plug-ins need to be built respectively. Therefore, data acquisition plug-ins adapted to different data carriers can be built respectively. When each data acquisition plug-in is started, a corresponding operation notification request can be sent. Since one data acquisition plug-in corresponds to one plug-in microservice, and the plug-in microservices are isolated from each other, the plug-in microservice can realize the isolated operation of the data acquisition plug-in.

[0033] In the embodiment of the present invention, since different types of data carriers have differences in operation, and different versions of data carriers of the same type also have differences in operation, in order to better adapt to different data carriers, it is necessary to build a data acquisition plug-in that matches them. In addition, the isolated operation of the plug-in microservice can make the operation undisturbed.

[0034] S120, acquiring target carrier data according to the target data acquisition plug-in.

[0035] The target carrier data may be all or part of the data existing on the target data carrier.

[0036] Specifically, since the target data acquisition plug-in has the function of acquiring target data, the target data acquisition plug-in can acquire all or part of the data on the target data carrier that matches it, that is, the target carrier data.

[0037] In the embodiment of the present invention, since different target data carriers have different carrier characteristics, when acquiring target carrier data for different target data carriers, the activated data acquisition plug-in can be determined according to the operation notification request, and the target data carrier where the target carrier data is located can be further queried. If the target data acquisition plug-in matching the target data carrier has been activated, the target data acquisition plug-in can acquire the target carrier data according to the location information of the target carrier data. The location information can represent the specific location where the target carrier data is stored in the target data carrier.

[0038] In an optional embodiment of the present invention, the target data carrier may be a database and / or a text file, and the target carrier data includes at least one target API.

[0039] Specifically, the target data carrier is a database and / or a text file, and the data acquisition plug-in can obtain the data on the database and / or the text file, that is, the target carrier data. The target carrier data can generate different target APIs according to different functional requirements, that is, different data access permissions correspond to different target APIs. Therefore, the target carrier data may include at least one target API. Among them, the database may include a relational database and a non-relational database. The relational database may include a Mysql database, an Oracle database, a DB2 database, etc. The non-relational database may include an HBase database, a Hive database, a Phoenix database, etc. The embodiment of the present invention does not limit the specific database types included in the relational database and the non-relational database.

[0040] In an optional embodiment of the present invention, before acquiring the target carrier data according to the target data acquisition plug-in, it may also include: configuring the target data set address of the target carrier data; sending the target data set address to the target data acquisition plug-in; wherein the target data acquisition plug-in is used to establish a target logical connection with the target carrier data according to the target data set address, so as to acquire the target carrier data through the target logical connection.

[0041] The target data set address may be the address of the data to be acquired by the target data acquisition plug-in, which is used to read the target carrier data on the target data carrier. The target logical connection may be the communication connection between the target data acquisition plug-in and the target carrier data.

[0042] Specifically, before acquiring the target carrier data, you can first configure the target data set address of the target carrier data, and further send the target data set address to the target data acquisition plug-in. The target data acquisition plug-in establishes a communication connection with the target carrier data according to the target data set address, that is, a target logical connection. Finally, the target data acquisition plug-in can acquire the target carrier data according to the target logical connection.

[0043] In an optional embodiment of the present invention, when the target data set address of the target carrier data is empty, the target data acquisition plug-in can also be used to acquire the target data variable of the target carrier data, so as to acquire the target carrier data through the target data variable.

[0044] Among them, the target data variable can be a variable for querying the target carrier data field.

[0045] In the embodiment of the present invention, if the target data set address is empty, the target data acquisition plug-in can also directly read the target carrier data according to the target data variable, that is, the target carrier data can be directly obtained according to the variable of the target carrier data field to be queried. If the target data set address is not empty, the target data acquisition plug-in can obtain the target carrier data according to the target data set address.

[0046] S130, generating a target API according to the target carrier data.

[0047] The target API may be an interface with certain business functions, which may be used by other modules or devices to call the data stored in the target data carrier.

[0048] Specifically, the target carrier data is processed according to the business function requirements to obtain a data processing result, and the data processing result is further converted into a target API.

[0049] Since the advent of the Internet era, the amount of data generated by each enterprise or organization has been increasing. This data can be stored on different data carriers. Therefore, how to quickly publish the data sets in the data carriers as APIs for users to use and effectively maximize the value of the data sets has become an urgent problem to be solved.

[0050] In the embodiment of the present invention, different data acquisition plug-ins are used to adapt different types of data carriers, which can effectively reduce the problem of data access restrictions caused by different types of data carriers, and the data acquisition plug-in can also adapt to different versions of data carriers of the same type, solving the problem of adaptation conflicts of different versions of data carriers of the same type. At the same time, the data on the data carrier is acquired through the data acquisition plug-in to generate an API based on the acquired data, and there is no need to use coding or specific tools to perform special processing on the data, which can reduce the complexity of data opening on the data carrier and improve the efficiency of generating an API based on the data of the data carrier.

[0051] The technical solution of this embodiment, by determining the target data acquisition plug-in that matches the target data carrier, further utilizes the target data acquisition plug-in and the location information of the target carrier data to acquire the target carrier data, and finally processes and transforms the target carrier data to generate a target API interface, thereby solving the problems of high data opening complexity and low interface generation efficiency, and achieving the effect of reducing the complexity of data opening and improving interface development efficiency.

[0052] Embodiment 2

[0053] Figure 2 is a flowchart of an interface generation method provided in Example 2 of the present invention. This embodiment is specific based on the above embodiment. In this embodiment, a specific optional implementation scheme for generating a target API according to data structure information is provided. Accordingly, Figure 2 As shown, the method includes the following operations:

[0054] S210, determining a target data acquisition plug-in that matches the target data carrier.

[0055] S220, acquiring target carrier data according to the target data acquisition plug-in.

[0056] S230: Displaying data structure information of the target carrier data on a visual API generation interface.

[0057] The visual API generation interface may be a visual interface capable of generating an API. The data structure information may be a data structure between data elements in a data set.

[0058] Specifically, after the target data acquisition plug-in acquires the target carrier data, the visualization API generation interface can display the data structure information of the target carrier data to facilitate processing of the data structure information.

[0059] In the embodiment of the present invention, after the data structure information of the target carrier data is displayed on the visualization API generation interface, the displayed data structure information can be dragged and dropped using a visualization tool on the visualization API generation interface according to business requirements.

[0060] S240 . In response to the data processing instruction for the target data structure information in the visual API generation interface, perform API data processing on the target data structure information.

[0061] The data processing instruction may be an instruction for performing data processing on the target data structure information. Exemplarily, the data processing instruction may be an instruction for performing processing such as combining, screening, statistics or aggregation operations on data. The embodiment of the present invention does not limit the specific instruction functions of the data processing instruction. The target data structure information may be data required to generate the target API. API data processing may be a data processing operation corresponding to the data processing instruction, such as combining, screening, statistics or aggregation operations on the target data structure information.

[0062] In an embodiment of the present invention, data processing instructions can first be generated according to the business functions to be implemented by the target API, and information associated with the business functions, i.e., target data structure information, can be selected from the data structure information displayed in the visual API generation interface, and the data processing instructions can be further responded to, i.e., API data processing can be performed on the target data structure information.

[0063] S250: Generate a target API according to the API data processing result.

[0064] The API data processing result may be a result of data processing on the target data structure information.

[0065] In the embodiment of the present invention, API data processing is performed on the data structure information according to the data processing instruction to obtain the API data processing result, and the target API is generated according to the API data processing result and the interface generation technology. The target API can be used for external applications and users to call.

[0066] In an optional embodiment of the present invention, after generating the target API according to the target carrier data, the following steps may also be included: determining a target monitoring data carrier; acquiring monitoring data structure information of the target monitoring data carrier; and monitoring the monitoring data structure information.

[0067] The target monitoring data carrier may be a target data carrier to be monitored, and the target monitoring data carrier may include part or all of the target data carrier, for example, the target monitoring data carrier may be a target data carrier whose data structure information has changed. The monitoring data structure information may be the data structure information of the data on the target monitoring data carrier.

[0068] In the embodiment of the present invention, after the target API is generated according to the target carrier data, the data carrier to be monitored is determined as the target monitoring data carrier according to the business function needs, so as to parse the data on the target monitoring data carrier to obtain the monitoring data structure information, thereby further monitoring the monitoring data structure information. In addition, when the monitoring data structure information changes, the target carrier data obtained by the target data acquisition plug-in will also change accordingly, and whether the monitoring data structure information changes can be used as an early warning signal.

[0069] For example, assuming that the monitoring data structure information cannot be tampered with, when the monitoring data structure information changes, the target monitoring data carrier corresponding to the changed monitoring data structure information can be restricted in terms of permissions, so that external applications or users cannot access the generated target API interface, and the operation and maintenance personnel can maintain the data on the target monitoring data carrier.

[0070] Specifically, the data structure that has been dragged out in the visualization API generation interface can be processed according to the data processing instructions. For example, assuming that the business requirement is to count the total number of rows in a table, first drag out the data structure of the table in the data structure information displayed on the visualization API generation interface, and further count the number of rows according to the dragged table data structure to obtain the total number of rows, and finally generate an API with the function of counting the total number of rows in the table through the interface generation technology. If the total number of rows in the table changes, when the user or external application makes the API call, the target carrier data on the target data carrier that establishes a target logical connection with the target data acquisition plug-in changes, that is, the table data structure dragged out in the visualization API generation interface changes accordingly, which causes the total number of rows in the table to change. Therefore, the generated API can output the total number of rows in the table in real time.

[0071] In an embodiment of the present invention, the visual API generation interface can display the data structure information of the target carrier data, and the visual API generation interface can drag and drop the data structure information to obtain the target data structure information, further perform API data processing on the target data structure information according to the target data structure information and data processing instructions, and finally generate the target API through the target API data processing result, which solves the problem that the API in the prior art cannot perform real-time conversion and output of data with data structure information changes, realizes real-time dynamic adjustment of API output according to data structure information changes, monitors and warns APIs with data structure information changes, and improves the effective management of data resources. In addition, the visual API generation interface can greatly improve the API development experience and meet the needs of efficient API development.

[0072] It should be noted that any arrangement and combination of the technical features in the above embodiments also falls within the protection scope of the present invention.

[0073] Embodiment 3

[0074] Figure 3 is a schematic diagram of an interface generating device provided by Embodiment 3 of the present invention, such as Figure 3 As shown, the device includes: a plug-in determination module 310, a target carrier data acquisition module 320 and a target API generation module 330, wherein:

[0075] A plug-in determination module 310, used to determine a target data acquisition plug-in that matches a target data carrier;

[0076] A target carrier data acquisition module 320, configured to acquire target carrier data according to the target data acquisition plug-in;

[0077] The target API generating module 330 is used to generate a target API according to the target carrier data.

[0078] Optionally, the interface generation device also includes: an isolated operation module, used to receive operation notification requests from each data acquisition plug-in; and to isolate and operate each data acquisition plug-in through a plug-in microservice; wherein one data acquisition plug-in corresponds to one plug-in microservice.

[0079] Optionally, the interface generating device further includes: a target data set address configuration module, used to configure the target data set address of the target carrier data; sending the target data set address to the target data acquisition plug-in; wherein the target data acquisition plug-in is used to establish a target logical connection with the target carrier data according to the target data set address, so as to acquire the target carrier data through the target logical connection.

[0080] Optionally, when the target data set address of the target carrier data is empty, the target data acquisition plug-in is further used to acquire the target data variable of the target carrier data, so as to acquire the target carrier data through the target data variable.

[0081] Optionally, the target API generation module 330 is specifically used to: display the data structure information of the target carrier data in a visual API generation interface; perform API data processing on the target data structure information in response to data processing instructions for the target data structure information in the visual API generation interface; and generate the target API based on the API data processing results.

[0082] Optionally, the interface generating device may further include: a monitoring module, configured to determine a target monitoring data carrier; obtain monitoring data structure information of the target monitoring data carrier; and monitor the monitoring data structure information.

[0083] Optionally, the target data carrier is a database and / or a text file, and the target carrier data includes at least one target API.

[0084] The technical solution of this embodiment, by determining the target data acquisition plug-in that matches the target data carrier, further utilizes the target data acquisition plug-in and the location information of the target carrier data to acquire the target carrier data, and finally processes and transforms the target carrier data to generate a target API interface, thereby solving the problems of high data opening complexity and low interface generation efficiency, and achieving the effect of reducing the complexity of data opening and improving interface development efficiency.

[0085] The above interface generation device can execute the interface generation method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not described in detail in this embodiment, please refer to the interface generation method provided by any embodiment of the present invention.

[0086] Since the interface generation device introduced above is a device that can execute the interface generation method in the embodiment of the present invention, based on the interface generation method introduced in the embodiment of the present invention, the technical personnel in the field can understand the specific implementation of the interface generation device of the present embodiment and its various variations, so how the interface generation device implements the interface generation method in the embodiment of the present invention is not introduced in detail here. As long as the technical personnel in the field implement the device used by the interface generation method in the embodiment of the present invention, it belongs to the scope of protection of this application.

[0087] Embodiment 4

[0088] Figure 4 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Figure 4 A block diagram of an electronic device 412 suitable for implementing embodiments of the present invention is shown. Figure 4 The electronic device 412 shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention. The electronic device 412 can be, for example, an electronic device or a server device.

[0089] like Figure 4 As shown, the electronic device 412 is in the form of a general purpose computing device. The components of the electronic device 412 may include, but are not limited to: one or more processors 416, a storage device 428, and a bus 418 connecting different system components (including the storage device 428 and the processor 416).

[0090] Bus 418 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MCA) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

[0091] The electronic device 412 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 412, including volatile and non-volatile media, removable and non-removable media.

[0092] The storage device 428 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 430 and / or cache memory 432. The electronic device 412 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 434 may be used to read and write non-removable, non-volatile magnetic media ( Figure 4 not shown, usually called a "hard drive"). Although Figure 4 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk (e.g., a read-only optical disk (Compact Disc-Read Only Memory, CD-ROM), a digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 418 via one or more data medium interfaces. The storage device 428 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.

[0093] A program 436 having a set (at least one) of program modules 426 may be stored, for example, in a storage device 428, such program modules 426 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include an implementation of a network environment. Program modules 426 generally perform the functions and / or methods of the embodiments described herein.

[0094] The electronic device 412 may also communicate with one or more external devices 414 (e.g., keyboard, pointing device, camera, display 424, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 412, and / or communicate with any device that enables the electronic device 412 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 422. In addition, the electronic device 412 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 420. As shown, the network adapter 420 communicates with other modules of the electronic device 412 through a bus 418. It should be understood that although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 412, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.

[0095] The processor 416 executes various functional applications and data processing by running the program stored in the storage device 428, such as implementing the interface generation method provided in the above-mentioned embodiment of the present invention: determining a target data acquisition plug-in that matches the target data carrier; acquiring the target carrier data according to the target data acquisition plug-in; and generating a target API according to the target carrier data.

[0096] The technical solution of this embodiment, by determining the target data acquisition plug-in that matches the target data carrier, further utilizes the target data acquisition plug-in and the location information of the target carrier data to acquire the target carrier data, and finally processes and transforms the target carrier data to generate a target API interface, thereby solving the problems of high data opening complexity and low interface generation efficiency, and achieving the effect of reducing the complexity of data opening and improving interface development efficiency.

[0097] Embodiment 5

[0098] Embodiment 5 of the present invention further provides a computer storage medium storing a computer program, wherein the computer program, when executed by a computer processor, is used to execute the interface generation method described in any of the above embodiments of the present invention: determining a target data acquisition plug-in that matches the target data carrier; acquiring target carrier data according to the target data acquisition plug-in; and generating a target API according to the target carrier data.

[0099] The computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, a device or a device or used in combination with it.

[0100] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0101] The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0102] Computer program code for performing the operations of the present invention may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0103] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. An interface generation method, characterized in that: include: For each of the data carriers, construct a data acquisition plug-in corresponding to the data carrier; Receiving a running notification request from each of the data acquisition plug-ins; The data acquisition plug-ins are isolated and run through the plug-in microservice; The plug-in microservice is a container for running the data acquisition plug-in, and one data acquisition plug-in corresponds to one plug-in microservice; Determine a target data acquisition plug-in that matches the target data carrier; Configure the target data set address of the target carrier data; Sending the target data set address to the target data acquisition plug-in; The target data acquisition plug-in is used to establish a target logical connection with the target carrier data according to the target data set address, so as to acquire the target carrier data through the target logical connection; Acquire target carrier data according to the target data acquisition plug-in; A target application program interface API is generated according to the target carrier data.

2. The method according to claim 1, characterized in that In the case that the target data set address of the target carrier data is empty, the target data acquisition plug-in is further used to acquire the target data variable of the target carrier data, so as to acquire the target carrier data through the target data variable.

3. The method according to claim 1, characterized in that: The generating a target API according to the target carrier data comprises: Displaying data structure information of the target carrier data on a visual API generation interface; In response to a data processing instruction for target data structure information in the visual API generation interface, performing API data processing on the target data structure information; The target API is generated according to the API data processing result.

4. The method according to claim 1, characterized in that: After generating the target API according to the target carrier data, the method further includes: Determine the target monitoring data carrier; Acquiring monitoring data structure information of the target monitoring data carrier; The monitoring data structure information is monitored.

5. The method according to any one of claims 1 to 4, characterized in that: The target data carrier is a database and / or a text file, and the target carrier data includes at least one target API.

6. An interface generation device, characterized in that: include: A plug-in determination module, used to determine a target data acquisition plug-in that matches a target data carrier; A target carrier data acquisition module, used to acquire target carrier data according to the target data acquisition plug-in; A target API generation module, used to generate a target API according to the target carrier data; An isolation operation module, for constructing a data acquisition plug-in corresponding to each of the data carriers; and receiving an operation notification request of each of the data acquisition plug-ins; Each of the data acquisition plug-ins is run in isolation through a plug-in microservice; wherein the plug-in microservice is a container for running the data acquisition plug-in, and one data acquisition plug-in corresponds to one plug-in microservice; A target data set address configuration module is used to configure the target data set address of the target carrier data; the target data set address is sent to the target data acquisition plug-in; wherein the target data acquisition plug-in is used to establish a target logical connection with the target carrier data according to the target data set address, so as to acquire the target carrier data through the target logical connection.

7. An electronic device, characterized in that: The electronic device comprises: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the interface generation method as described in any one of claims 1 to 5.

8. A computer storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the interface generation method as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Data processing method and data processing device

    CN108628648A

  • Data acquisition method, device, apparatus and storage medium

    CN109471786A