CN113157360A - Methods, apparatus, devices, media and products for processing API - Google Patents

Methods, apparatus, devices, media and products for processing API Download PDF

Info

Publication number
CN113157360A
CN113157360A CN202110205517.4A CN202110205517A CN113157360A CN 113157360 A CN113157360 A CN 113157360A CN 202110205517 A CN202110205517 A CN 202110205517A CN 113157360 A CN113157360 A CN 113157360A
Authority
CN
China
Prior art keywords
api
data processing
unit
data
determining
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.)
Granted
Application number
CN202110205517.4A
Other languages
Chinese (zh)
Other versions
CN113157360B (en
Inventor
陈佳熠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110205517.4A priority Critical patent/CN113157360B/en
Publication of CN113157360A publication Critical patent/CN113157360A/en
Application granted granted Critical
Publication of CN113157360B publication Critical patent/CN113157360B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/604Tools and structures for managing or administering access control systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Quality & Reliability (AREA)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a method, a device, equipment, a medium and a product for processing an API, relates to the technical field of cloud computing, and further relates to the technical field of platform application. The specific implementation scheme is as follows: obtaining each API service; determining at least one API corresponding to each API service; for each API, performing data processing on the API according to the data processing type corresponding to the API to obtain a data processing result; and outputting a data processing result. This implementation can improve data processing's fineness.

Description

Methods, apparatus, devices, media and products for processing API
Technical Field
The present disclosure relates to the field of cloud computing, and further relates to the field of platform application technologies, and in particular, to a method, an apparatus, a device, a medium, and a product for processing an API.
Background
Currently, API (Application Programming Interface) services are widely used for linking applications in the internet.
In the process of actually applying the API service, the API data is often subjected to debugging, document editing, and other processing according to the use requirement. However, when processing is performed, the API service is generally processed in its entirety, thereby causing a problem of poor fineness of data processing.
Disclosure of Invention
The present disclosure provides a method, apparatus, device, medium, and article of manufacture for processing an API.
According to a first aspect, there is provided a method for processing an API, comprising: obtaining each API service; determining at least one API corresponding to each API service; for each API, performing data processing on the API according to the data processing type corresponding to the API to obtain a data processing result; and outputting the data processing result.
According to a second aspect, there is provided an apparatus for processing an API, comprising: a service acquisition unit configured to acquire each API service; an API determining unit configured to determine at least one API corresponding to each API service; the data processing unit is configured to perform data processing on each API according to the data processing type corresponding to the API to obtain a data processing result; a result output unit configured to output the data processing result.
According to a third aspect, there is provided an electronic device performing a method for processing an API, comprising: one or more computing units; a storage unit for storing one or more programs; when the one or more programs are executed by the one or more computing units, the one or more computing units are caused to implement the method for processing an API as described above.
According to a fourth aspect, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing a computer to execute the method for processing an API as any one of the above.
According to a fifth aspect, there is provided a computer program product comprising a computer program which, when executed by a computing unit, implements a method for processing an API as any one of the above.
According to the technology of the application, the method for processing the API is provided, each API service can be disassembled into the corresponding API, data processing is carried out on each API according to the data processing type corresponding to each API, data processing is carried out in the process by taking a single API as granularity, and the fineness of data processing can be improved.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present application may be applied;
FIG. 2 is a flow diagram for one embodiment of a method for processing an API, in accordance with the present application;
FIG. 3 is a schematic diagram of an application scenario of a method for processing an API in accordance with the present application;
FIG. 4 is a flow diagram of another embodiment of a method for processing an API according to the present application;
FIG. 5 is a schematic diagram illustrating one embodiment of an apparatus for processing APIs in accordance with the present application;
FIG. 6 is a block diagram of an electronic device for implementing a method for processing APIs according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is an exemplary system architecture diagram illustrating an exemplary system architecture 100 to which embodiments of the method for processing an API of the present application may be applied, according to a first embodiment of the present disclosure.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, and 103 may be electronic devices such as a mobile phone, a computer, and a tablet, the terminal devices 101, 102, and 103 may display an API management interface generated by the server 105, and the API management interface may configure a data processing type for each API, such as document generation or data debugging for each API. After that, the terminal apparatuses 101, 102, and 103 may perform data processing on each API according to the data processing type to obtain a data processing result, and output the data processing result.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices including, but not limited to, televisions, smart phones, tablet computers, e-book readers, car-mounted computers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server that provides various services, for example, based on a preset API specification, uniformly models underlying API metadata, generates the API management interface based on the modeled APIs, and transmits the API management interface to the terminal devices 101, 102, and 103 through the network 104, so that the terminal devices 101, 102, and 103 perform data processing according to data processing types corresponding to the APIs on the API management interface.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 105 is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the method for processing the API provided in the embodiment of the present application may be executed by the terminal devices 101, 102, and 103, or may be executed by the server 105. Accordingly, the apparatus for processing the API may be provided in the terminal devices 101, 102, 103, or may be provided in the server 105.
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 200 of one embodiment of a method for processing an API in accordance with the present application is shown. The method for processing the API comprises the following steps:
step 201, obtaining each API service.
In this embodiment, the execution main body (for example, the terminal devices 101, 102, 103, or the server 105 in fig. 1) may obtain each API service from other devices, or may obtain each API service from data locally stored by the execution main body, which is not limited in this embodiment. And, each API service contains at least one API. Where API refers to some predefined interface for providing an application and a set of routines that a developer accesses based on certain software or hardware without accessing source code or understanding the details of the internal working mechanisms. The API service refers to a certain software service implemented by at least one API, for example, the API service may be a service for implementing face recognition, and the service for implementing face recognition may be implemented by a face detection API, a face tracking API, a face acquisition API, a face matching API, and the like. The API services in this embodiment may be obtained by the other devices collecting various API data, and the execution subject may manage the API services.
At step 202, at least one API corresponding to each API service is determined.
In this embodiment, since the API service includes at least one API, the API service may be divided into at least one API, and then data processing may be performed on the API according to each API as a data processing unit. Optionally, in the process of determining at least one API corresponding to each API service, all APIs corresponding to the API service may be determined as the at least one API, or an API meeting the user-defined use requirement may be determined as the at least one API from all APIs corresponding to the API service according to the user-defined use requirement, which is not limited in this embodiment.
After determining at least one API corresponding to each API service, the following steps may be further performed: modeling the data of each API by using a preset API data specification to obtain API bottom metadata; and processing data of the API based on the API bottom metadata. The preset API data Specification preferably uses OpenAPI Specification (OAS, a popular API description format Specification), and because the applicability of OAS is general, more API data processing requirements can be met. Thereafter, service information, tag information, API information, and data model information of each API may be data processed based on the modeled API underlying metadata to manage such information. The service information comprises a service name, description, an authentication mode and a domain name list; the tag information includes a name and a description; the API information comprises basic information, request parameters, response parameters, request examples, response examples and error codes; the data model information includes model information for public calls in the API. Further, the basic information includes the name, path, label, and description of the API.
And 203, for each API, performing data processing on the API according to the data processing type corresponding to the API to obtain a data processing result.
In the present embodiment, the data processing categories may include, but are not limited to, document generation, data debugging, software development kit generation, and the like. Different data processing modes can be corresponded to different data processing types. For example, for document generation, the data processing mode is to generate a corresponding document for data information based on the API, and optionally, the document may be generated online based on a generation instruction triggered by a user; for data debugging, online debugging can be performed on the API based on a debugging instruction triggered by a user; for software development kit generation, a software development kit corresponding to the API may be generated online based on a user-triggered kit generation instruction. After different data processing is performed, the obtained data processing result can be an online generated API document, a debugged API, and an online generated software development kit. Optionally, the execution body may perform data processing on the API based on the API underlying metadata. For example, in the case of generating a document, service information, API information, and the like in the underlying metadata may be called.
For each API, performing data processing on the API according to the data processing type corresponding to the API, and obtaining a data processing result may include the following steps: in response to detecting a processing instruction for API batch processing of each API, determining at least one API set selected in batches and a data processing category configured for each API set in each API; and for each data processing type, performing data processing on all the APIs in the at least one API set corresponding to the data processing type according to the data processing type to obtain a data processing result. By adopting the data processing mode, the API with fine granularity can be used as a data processing unit, a plurality of freely combined APIs are selected for batch processing, and the requirements of fine data processing unit and high data processing efficiency can be met.
And step 204, outputting a data processing result.
In this embodiment, different data processing categories may correspond to different data processing results, and specifically, the data processing categories may include, but are not limited to, the above online generated API documents, the debugging completed API, and the online generated software development toolkits. Therefore, the data processing results can be output in the corresponding data output areas, so that a user can further edit, set the authority, deliver and sell the API and the like based on the data processing results, the full-flow management of the API is realized based on different data processing results, for example, an API document generated online, an API finished by debugging and a software development kit generated online can be output, a delivery and sale instruction triggered by the user on the data processing results is received, the API finished by debugging is transmitted to an API mall to be sold and displayed, and the API document, the API and the software development kit can also be synchronously transmitted to the API mall, so that the information richness of the API is improved, and the user can conveniently select the API meeting the use requirement.
With continued reference to FIG. 3, a schematic diagram of one application scenario of a method for processing an API in accordance with the present application is shown. In the application scenario of fig. 3, in the process of processing the APIs, the execution subject may first obtain each API service 301, and then determine at least one API 302 corresponding to each API service 301 to obtain each API 302. Thereafter, the executing entity may perform design management on each API 302, for example, may edit API definition fields, generate online documents, perform online debugging on the API, and so on, that is, step 303 in fig. 3. After debugging is completed based on the online document and online debugging, the API may be published. The user may then make calls to the published APIs by generating online documents and/or online debugging for each published API.
According to the method for processing the API, provided by the embodiment of the application, each API service can be disassembled into the corresponding API, data processing is performed on each API according to the data processing type corresponding to each API, and the data processing is performed by taking a single API as the granularity in the process, so that the fineness of data processing can be improved.
With continued reference to FIG. 4, a flow 400 of another embodiment of a method for processing an API in accordance with the present application is shown. As shown in fig. 4, the method for processing an API of the present embodiment may include the steps of:
step 401, obtaining each API service.
In this embodiment, please refer to the detailed description of step 201 for the detailed description of step 401, which is not repeated herein.
Step 402, determining at least one API corresponding to each API service.
In this embodiment, please refer to the detailed description of step 202 for the detailed description of step 402, which is not repeated herein.
And step 403, outputting a form editing interface corresponding to each API.
In this embodiment, the form editing interface may be used to configure information such as various parameter names, types, and detailed descriptions of the API. The execution main body can output a corresponding form editing interface for each API, so that man-machine interaction is carried out on the form editing interface, and configuration of the API is achieved.
At step 404, edit information received on the form edit interface is determined and the API is configured based on the edit information.
In this embodiment, the user may input editing information on the form editing interface by triggering a human-computer interaction instruction. Thereafter, the execution agent may determine the editing information received on the form interface and configure the API based on the editing information. The editing information is used for editing information such as various parameter names, types and detailed descriptions of the API, and the execution main body can configure the parameter names, types and detailed descriptions of the API based on the editing information.
In some optional implementations of this embodiment, the following steps may also be performed to configure the API: for each API, configuration template information corresponding to the API is determined and the API is configured based on the configuration template information.
In this implementation manner, the configuration template information is preset parameter configuration information for the API, and the execution main body may implement fast configuration of the API based on the preset parameter configuration information. Optionally, the configuration template information may be parameter configuration information in a form of a table. The mode of configuring the API based on the configuration template information may specifically be: generating JsonSchema (describing the JSON data format) based on JSON (JavaScript Object Notation) and preset parameter configuration information in a tabular form; the API is configured based on json schema.
Further optionally, the following steps may also be performed to configure the API: and acquiring a configuration code in a JsonSchema format, and configuring the API based on the configuration code. Preferably, for simple API parameter configuration, the form editing manner described in the above steps 403 to 404 is adopted to improve the visualization degree. For complex API parameter configuration, the configuration template information and the JSON configuration mode are adopted, and the API configuration efficiency is improved. For complex API parameter configuration, configuration codes in a JsonSchema format can be adopted to realize configuration, the customization degree is higher, and the advanced extension requirement of parameter configuration can be met.
In step 405, for each API, in response to determining that the data processing category corresponding to the API is document generation, document data corresponding to the API is generated.
In the present embodiment, the execution body can generate document data corresponding to a single API online for the API. The document data may include, but is not limited to, API interface addresses, request parameters, return results, and the like.
In some optional implementations of this embodiment, generating the document data corresponding to the API includes: determining a target template corresponding to the API; document data corresponding to the API is generated based on the target template.
In this embodiment, the target template may include a document template as well as a programming language template. The document template is used for configuring information such as format of the document, and the programming language template is used for configuring the programming language type used by the document. The target template may be selected by a user in a self-defined manner, or may be determined by the execution subject according to a preset setting, which is not limited in this embodiment. And then, the execution main body can generate the document data corresponding to the API based on the target template, so that the richness of document generation is improved, and various document generation requirements are met.
Step 406, for each API, in response to determining that the data processing type corresponding to the API is data debugging, debugging the API to obtain a debugging processing result.
In this embodiment, the data debugging refers to running a code included in the API to obtain a running result, and if the running result reports an error, the data debugging may further correct a syntax error or a logic error until the debugging is completed, so as to obtain the API after the debugging is completed. The API after debugging is the API that can run smoothly. Further, the debugging processing result may include an API after completion of debugging, error reporting information, running result information, and the like.
Before debugging the API, optionally, the following authentication steps may be performed: outputting an identity verification interface; receiving authentication information input by a user on an authentication interface; and performing identity authentication on the identity authentication information to obtain an authentication result. Further, if the verification result indicates that the identity verification passes, the debugging of the API is performed to obtain a debugging processing result.
Step 407, outputting a data processing result, where the data processing result at least includes the document data and/or the debugging processing result.
In this embodiment, the execution main body may output the document data and/or the debugging processing result, so that the user performs processes of editing, authority setting, delivery and sale, and the like according to the document data and/or the debugging processing result. For the detailed description of step 407, refer to the detailed description of step 204, which is not repeated herein.
And step 408, transmitting each API to an API mall for displaying.
In this embodiment, the execution subject may transmit each API to the API mall for presentation, and preferably, may transmit an API that has been debugged in each API to the API mall for presentation. The API mall comprises a plurality of APIs, and online selling of the APIs can be achieved in the API mall.
In step 409, in response to receiving the target API processing instruction in the API mall, configuring the usage right of the specified API in each API based on the target API processing instruction.
In this embodiment, the target API processing instruction is used to instruct to process the usage right of the specified API, where the number of the specified APIs may be one or multiple, and this embodiment does not limit this.
For example, the present application may provide a common platform on which both API developers and API users may perform corresponding data processing operations. For the API developer, the public platform may be run on the execution subject to obtain each API service transmitted locally or in a network on the public platform, determine the API corresponding to each API service, and perform unified modeling on the APIs based on the OAS to obtain API bottom metadata. And then, based on the API bottom metadata with uniform data format and strong applicability, realizing the online generation and online debugging of the API document. Optionally, functions such as software development kit generation, document online preview and the like can be realized, and various requirements of API development are met. The debug error-free API may then be released and transmitted to the API mall. An API mall may also run on the public platform to allow API users to purchase and use APIs on the public platform. Therefore, links such as API design, document generation, online debugging, external opening, delivery and sale and the like in the API development process are realized on the public platform. Furthermore, after the API user purchases the API on the public platform, the corresponding API can be called on line only through identity authentication, API conversion of multiple programming languages can be realized on line, the code quantity of manually calling the API is reduced, and the use is more convenient.
The method for processing the API, provided by the embodiment of the application, can realize online document generation and online debugging of the API on the basis of using a single API as granularity for data processing and improving the fineness of data processing, is convenient for previewing the API effect in real time, and has a better design effect of the API. In addition, each API can be transmitted to an API mall, and delivery and sale of the API are achieved. That is, by using the method for processing the API provided by the foregoing embodiment of the present application, the full flow management of the API can be implemented.
With further reference to fig. 5, as an implementation of the method shown in the above figures, the present application provides an embodiment of an apparatus for processing an API, where the embodiment of the apparatus corresponds to the embodiment of the method shown in fig. 2, and the apparatus may be specifically applied to various servers.
As shown in fig. 5, the apparatus 500 for processing API of the present embodiment includes: a service acquisition unit 501, an API determination unit 502, a data processing unit 503, and a result output unit 504.
A service acquisition unit 501 configured to acquire each API service.
An API determining unit 502 configured to determine at least one API corresponding to each API service.
The data processing unit 503 is configured to perform data processing on each API according to the data processing type corresponding to the API, and obtain a data processing result.
A result output unit 504 configured to output the data processing result.
In some optional implementations of this embodiment, the data processing unit 504 is further configured to: for each API, in response to determining that the data processing category to which the API corresponds is document generation, document data corresponding to the API is generated.
In some optional implementations of this embodiment, the data processing unit 504 is further configured to: determining a target template corresponding to the API; document data corresponding to the API is generated based on the target template.
In some optional implementations of this embodiment, the data processing unit 504 is further configured to: and for each API, in response to determining that the data processing type corresponding to the API is data debugging, debugging the API to obtain a debugging processing result.
In some optional implementations of this embodiment, the apparatus further includes: the display unit is configured to transmit each API to the API mall for display; and the permission configuration unit is configured to respond to the target API processing instruction received in the API mall and configure the use permission of the appointed API in each API based on the target API processing instruction.
In some optional implementations of this embodiment, the apparatus further includes: an interface output unit configured to output, for each API, a form editing interface corresponding to the API; an information determination unit configured to determine editing information received on the form editing interface and configure the API based on the editing information.
In some optional implementations of this embodiment, the apparatus further includes: and an API configuration unit configured to determine, for each API, configuration template information corresponding to the API, and configure the API based on the configuration template information.
The device for processing the APIs, provided by the above embodiment of the present application, may disassemble each API service into a corresponding API, and perform data processing on each API according to the data processing category corresponding to each API, where this process uses a single API as a granularity to perform data processing, and thus, the fineness of data processing may be improved. And moreover, online document generation and online debugging of the API can be realized, real-time preview of the API effect is facilitated, and the design effect of the API is better. In addition, each API can be transmitted to an API mall, and delivery and sale of the API are achieved. That is, by using the method for processing the API provided by the foregoing embodiment of the present application, the full flow management of the API can be implemented.
It should be understood that the units 501 to 504 recited in the apparatus 500 for processing API correspond to respective steps in the method described with reference to fig. 2, respectively. Thus, the operations and features described above with respect to the method for processing the API are equally applicable to the apparatus 500 and the units included therein, and are not described in detail here.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present application.
FIG. 6 illustrates a block diagram of an electronic device 600 that may be used to implement the method for processing APIs of embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 6, the apparatus 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM)602 or a computer program loaded from a storage unit 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The calculation unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
A number of components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, a mouse, or the like; an output unit 607 such as various types of displays, speakers, and the like; a storage unit 608, such as a magnetic disk, optical disk, or the like; and a communication unit 609 such as a network card, modem, wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 601 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The calculation unit 601 performs the respective methods and processes described above, such as a method for processing an API. For example, in some embodiments, the method for processing the API may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 600 via the ROM 602 and/or the communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the method for processing an API described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured by any other suitable means (e.g., by means of firmware) to perform the method for processing the API.
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (17)

1. A method for processing an API, comprising:
obtaining each API service;
determining at least one API corresponding to each API service;
for each API, performing data processing on the API according to the data processing type corresponding to the API to obtain a data processing result;
and outputting the data processing result.
2. The method of claim 1, wherein for each API, performing data processing on the API according to the data processing category corresponding to the API to obtain a data processing result includes:
for each API, in response to determining that the data processing category to which the API corresponds is document generation, document data corresponding to the API is generated.
3. The method according to claim 1, wherein the generating document data corresponding to the API includes:
determining a target template corresponding to the API;
and generating document data corresponding to the API based on the target template.
4. The method of claim 1, wherein for each API, performing data processing on the API according to the data processing category corresponding to the API to obtain a data processing result includes:
and for each API, in response to determining that the data processing type corresponding to the API is data debugging, debugging the API to obtain a debugging processing result.
5. The method of claim 1, wherein the method further comprises:
transmitting each API to an API mall for display;
in response to receiving a target API processing instruction in the API mall, configuring usage rights of a specified API in the respective API based on the target API processing instruction.
6. The method of claim 1, wherein the method further comprises:
for each API, outputting a form editing interface corresponding to the API;
and determining editing information received on the form editing interface, and configuring the API based on the editing information.
7. The method of claim 1, wherein the method further comprises:
for each API, determining configuration template information corresponding to the API, and configuring the API based on the configuration template information.
8. An apparatus for processing an API, comprising:
a service acquisition unit configured to acquire each API service;
an API determining unit configured to determine at least one API corresponding to each API service;
the data processing unit is configured to perform data processing on each API according to the data processing type corresponding to the API to obtain a data processing result;
a result output unit configured to output the data processing result.
9. The apparatus of claim 8, wherein the data processing unit is further configured to:
for each API, in response to determining that the data processing category to which the API corresponds is document generation, document data corresponding to the API is generated.
10. The apparatus of claim 9, wherein the data processing unit is further configured to:
determining a target template corresponding to the API;
and generating document data corresponding to the API based on the target template.
11. The apparatus of claim 8, wherein the data processing unit is further configured to:
and for each API, in response to determining that the data processing type corresponding to the API is data debugging, debugging the API to obtain a debugging processing result.
12. The apparatus of claim 8, wherein the apparatus further comprises:
the display unit is configured to transmit each API to the API mall for display;
and the permission configuration unit is configured to respond to the target API processing instruction received in the API mall and configure the use permission of the appointed API in each API based on the target API processing instruction.
13. The apparatus of claim 8, wherein the apparatus further comprises:
an interface output unit configured to output, for each API, a form editing interface corresponding to the API;
an information determination unit configured to determine editing information received on the form editing interface and configure the API based on the editing information.
14. The apparatus of claim 8, wherein the apparatus further comprises:
and an API configuration unit configured to determine, for each API, configuration template information corresponding to the API, and configure the API based on the configuration template information.
15. An electronic device that performs a method for processing an API, comprising:
at least one computing unit; and
a storage unit communicatively coupled to the at least one computing unit; wherein the content of the first and second substances,
the storage unit stores instructions executable by the at least one computing unit to enable the at least one computing unit to perform the method of any one of claims 1-7.
16. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-7.
CN202110205517.4A 2021-02-24 2021-02-24 Method, apparatus, device, medium, and article for processing an API Active CN113157360B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110205517.4A CN113157360B (en) 2021-02-24 2021-02-24 Method, apparatus, device, medium, and article for processing an API

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110205517.4A CN113157360B (en) 2021-02-24 2021-02-24 Method, apparatus, device, medium, and article for processing an API

Publications (2)

Publication Number Publication Date
CN113157360A true CN113157360A (en) 2021-07-23
CN113157360B CN113157360B (en) 2023-10-27

Family

ID=76883273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110205517.4A Active CN113157360B (en) 2021-02-24 2021-02-24 Method, apparatus, device, medium, and article for processing an API

Country Status (1)

Country Link
CN (1) CN113157360B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080140759A1 (en) * 2006-03-21 2008-06-12 Conner Peter A Dynamic service-oriented architecture system configuration and proxy object generation server architecture and methods
US20150128103A1 (en) * 2013-11-07 2015-05-07 Runscope, Inc. System and method for automating application programming interface integration
JP2017076412A (en) * 2016-11-21 2017-04-20 インテル・コーポレーション Test, verification, and program and method of debug architecture
CN108111629A (en) * 2018-01-19 2018-06-01 京东方科技集团股份有限公司 Application Programming Interface service unit and Application Programming Interface service system
WO2019143412A1 (en) * 2018-01-19 2019-07-25 Umajin Inc. Configurable server kit
CN111273999A (en) * 2020-01-20 2020-06-12 北京字节跳动网络技术有限公司 Data processing method and device, electronic equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080140759A1 (en) * 2006-03-21 2008-06-12 Conner Peter A Dynamic service-oriented architecture system configuration and proxy object generation server architecture and methods
US20150128103A1 (en) * 2013-11-07 2015-05-07 Runscope, Inc. System and method for automating application programming interface integration
JP2017076412A (en) * 2016-11-21 2017-04-20 インテル・コーポレーション Test, verification, and program and method of debug architecture
CN108111629A (en) * 2018-01-19 2018-06-01 京东方科技集团股份有限公司 Application Programming Interface service unit and Application Programming Interface service system
WO2019143412A1 (en) * 2018-01-19 2019-07-25 Umajin Inc. Configurable server kit
CN111273999A (en) * 2020-01-20 2020-06-12 北京字节跳动网络技术有限公司 Data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113157360B (en) 2023-10-27

Similar Documents

Publication Publication Date Title
TWI757743B (en) Mini program generation method and device
CN107451109B (en) Report generation method and system
WO2021184725A1 (en) User interface test method and apparatus, storage medium, and computer device
US11126938B2 (en) Targeted data element detection for crowd sourced projects with machine learning
CN113808231B (en) Information processing method and device, image rendering method and device, and electronic device
US20230206578A1 (en) Method for generating virtual character, electronic device and storage medium
CN115509522A (en) Interface arranging method and system for low-code scene and electronic equipment
CN111857674A (en) Business product generation method and device, electronic equipment and readable storage medium
CN115222444A (en) Method, apparatus, device, medium and product for outputting model information
CN113515462A (en) Method, device, equipment and storage medium for testing
CN112433713A (en) Application program design graph processing method and device
CN113378346A (en) Method and device for model simulation
CN107562461B (en) Feature calculation system, feature calculation method, storage medium, and electronic device
CN113157360B (en) Method, apparatus, device, medium, and article for processing an API
US10360701B2 (en) Integrated visualization
CN115033233A (en) Interface calling method and device, electronic equipment and storage medium
CN114218313A (en) Data management method, device, electronic equipment, storage medium and product
CN114218166A (en) Data processing method and device, electronic equipment and readable storage medium
CN112968876A (en) Content sharing method and device, electronic equipment and storage medium
CN112579428A (en) Interface testing method and device, electronic equipment and storage medium
CN109561146A (en) Document down loading method, device, terminal device
CN113407844B (en) Version recommendation method, device and equipment of applet framework and storage medium
CN112560462B (en) Event extraction service generation method, device, server and medium
CN113986112B (en) Soft keyboard display method, related device and computer program product
WO2022057270A1 (en) Information processing method and apparatus

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
GR01 Patent grant
GR01 Patent grant