CN113157360B - Method, apparatus, device, medium, and article for processing an API - Google Patents

Method, apparatus, device, medium, and article for processing an API Download PDF

Info

Publication number
CN113157360B
CN113157360B CN202110205517.4A CN202110205517A CN113157360B CN 113157360 B CN113157360 B CN 113157360B CN 202110205517 A CN202110205517 A CN 202110205517A CN 113157360 B CN113157360 B CN 113157360B
Authority
CN
China
Prior art keywords
api
data processing
service
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.)
Active
Application number
CN202110205517.4A
Other languages
Chinese (zh)
Other versions
CN113157360A (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

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)
  • Automation & Control Theory (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Quality & Reliability (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: acquiring each API service; determining at least one API corresponding to each API service; for each API, carrying out data processing on the API according to the data processing category corresponding to the API to obtain a data processing result; and outputting a data processing result. The implementation mode can improve the fineness of data processing.

Description

Method, apparatus, device, medium, and article for processing an API
Technical Field
The present disclosure relates to the field of cloud computing, and further relates to the field of platform application technology, and in particular, to a method, apparatus, device, medium, and product for processing an API.
Background
Currently, API (Application Programming Interface, application program interface) services have been widely used for interfacing between applications of the internet.
In the process of actually applying the API service, processing such as debugging, document editing, etc. is often performed on the API data according to the use requirement. However, when processing is performed, the API service is generally subjected to overall processing, resulting in a problem of poor data processing fineness.
Disclosure of Invention
The present disclosure provides a method, apparatus, device, medium, and article for processing an API.
According to a first aspect, there is provided a method for processing an API, comprising: acquiring each API service; determining at least one API corresponding to each API service; for each API, carrying out data processing on the API according to the data processing category 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 respective API services; 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 category corresponding to the API to obtain a data processing result; and a result output unit configured to output a 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 a method as in any of the above for processing APIs.
According to a fourth aspect, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform a method for processing an API according to 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 according to any of the above.
According to the technology of the application, a method for processing the APIs is provided, each API service can be disassembled into corresponding APIs, and data processing is carried out on each API according to the data processing category corresponding to each API, and the process uses a single API as granularity to carry out data processing, so that the fineness of the data processing can be improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for 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 an embodiment of the present application may be applied;
FIG. 2 is a flow chart of one embodiment of a method for processing an API in accordance with the present application;
FIG. 3 is a schematic diagram of one application scenario of a method for processing APIs in accordance with the present application;
FIG. 4 is a flow chart of another embodiment of a method for processing an API in accordance with the present application;
FIG. 5 is a schematic diagram of an embodiment of an apparatus for processing APIs in accordance with the application;
fig. 6 is a block diagram of an electronic device used to implement a method for processing APIs of embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one 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, without conflict, the embodiments of the present application and features of the embodiments may be combined with each other. The application will be described in detail below with reference to the drawings in connection with embodiments.
Fig. 1 is an exemplary system architecture diagram according to a first embodiment of the present disclosure, which illustrates an exemplary system architecture 100 to which an embodiment of a method for processing APIs of the present application may be applied.
As shown in fig. 1, a system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. The terminal devices 101, 102, 103 may be electronic devices such as mobile phones, computers, and tablet computers, and the terminal devices 101, 102, 103 may display an API management interface generated by the server 105, and the API management interface may be configured with a data processing class for each API, for example, document generation or data debugging for each API. After that, the terminal devices 101, 102, 103 may perform data processing on each API according to the data processing category, to obtain a data processing result, and output the data processing result.
The terminal devices 101, 102, 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, smartphones, tablets, electronic book readers, car-mounted computers, laptop and desktop computers, and the like. When the terminal devices 101, 102, 103 are software, they can be installed in the above-listed electronic devices. Which may be implemented as multiple software or software modules (e.g., to provide distributed services), or as a single software or software module. The present application is not particularly limited herein.
The server 105 may be a server that provides various services, for example, may perform unified modeling on the underlying API metadata based on a preset API specification, generate the above API management interface based on the API after modeling, and transmit the above API management interface to the terminal devices 101, 102, 103 through the network 104, so that the terminal devices 101, 102, 103 perform data processing on the above API management interface according to the data processing class corresponding to each API.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster formed by a plurality of servers, or as a single server. When server 105 is software, it may be implemented as a plurality of software or software modules (e.g., to provide distributed services), or as a single software or software module. The present application is not particularly limited herein.
It should be noted that, the method for processing an API provided by the embodiment of the present application may be performed by the terminal devices 101, 102, 103, or may be performed by the server 105. Accordingly, the means for processing the API may be provided in the terminal devices 101, 102, 103 or 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 APIs in accordance with the present application is shown. The method for processing an API of the present embodiment includes the steps of:
in step 201, each API service is acquired.
In this embodiment, the executing body (such as the terminal devices 101, 102, 103, or the server 105 in fig. 1) may acquire each API service from other devices, or may acquire each API service from data locally stored in the executing body, which is not limited in this embodiment. And, each API service contains at least one API. Where an API refers to some predefined interface for providing a set of routines that an application and developer can access based on certain software or hardware without having to access source code or understand the details of the internal operating mechanism. An 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 collection API, a face matching API, or the like. The API services in this embodiment may be obtained by collecting various types of API data by the other devices, and the execution body may manage the API services.
Step 202, determining at least one API corresponding to each API service.
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 is performed on the API as a data processing unit according to each API. Optionally, in 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.
Wherein 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. Among them, openAPI Specification (OAS, a popular API description format specification) is preferably used for the preset API data specification, and more API data processing requirements can be satisfied due to the general applicability of OAS. Thereafter, service information, tag information, API information, and data model information of each API may be data-processed based on the API underlying metadata after modeling to manage the 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 common calls in the API. Further, the basic information includes the name, path, tag, and description of the API.
Step 203, 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.
In this embodiment, the data processing categories may include, but are not limited to, document generation, data debugging, software development kit generation, and the like. For different data processing categories, different data processing modes can be corresponding. For example, for document generation, the data processing manner is that corresponding documents are generated based on data information of an API, and optionally, the documents can be generated online based on a generation instruction triggered by a user; for data debugging, on-line debugging can be performed on the API based on a user-triggered debugging instruction; for software development kit generation, a software development kit corresponding to an API may be generated online based on user-triggered kit generation instructions. After different data processing, the obtained data processing results can be an API document generated on line, an API for debugging completion and a software development kit generated on line. Alternatively, the execution body may perform data processing on the API based on the API underlying metadata described above. For example, in the case of generating a document, service information, API information, etc. in the underlying metadata may be called.
For each API, according to the data processing class corresponding to the API, performing data processing on the API to obtain a data processing result may include the following steps: in response to detecting a processing instruction for performing API batch processing on each API, determining at least one API set selected in batch in each API, and configuring a data processing category for each API set; and for each data processing category, carrying out data processing on all APIs in at least one corresponding API set according to the data processing category to obtain a data processing result. By adopting the data processing mode, a plurality of APIs which are freely combined can be selected to carry out batch processing according to the finer granularity APIs as data processing units, and the requirements of finer data processing units and higher data processing efficiency can be met at the same time.
And step 204, outputting a data processing result.
In this embodiment, different data processing results may correspond to different data processing categories, and specifically may include, but not limited to, the above-mentioned online generated API document, the debug completed API, and the online generated software development kit. For this, the above data processing results may be output in the corresponding data output area, so that the user may further edit, set the authority, deliver and sell the API based on the data processing results, and implement overall process management on the API based on different data processing results, for example, may output an online generated API document, a debugged API and an online generated software development kit, receive a delivery and sell instruction triggered by the user on the data processing results, transmit the debugged API to the API mall to sell and display, and may also synchronously transmit the API document, the API and the software development kit to the API mall, so as to improve the information richness of the API, and facilitate the user to 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 according to the present application is shown. In the application scenario of fig. 3, in the process of processing APIs, the execution body may first acquire 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 execution body may perform design management on each API 302, for example, may edit API definition fields, generate an online document, perform online debugging on the API, etc., that is, step 303 in fig. 3. After completing the debugging based on the online document and online debugging, the API may be published. Then, the user can generate an online document and/or online debug for each published API to realize the call to the published API.
According to the method for processing the APIs provided by the embodiment of the application, each API service can be disassembled into the corresponding APIs, and the data processing is performed on each API according to the data processing category corresponding to each API, and the data processing is performed by taking a single API as granularity in the process, so that the fineness of the data processing can be improved.
With continued reference to FIG. 4, a flow 400 of another embodiment of a method for processing APIs 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:
in step 401, each API service is acquired.
In this embodiment, the detailed description of step 401 is referred to the detailed description of step 201, and will not be repeated here.
At step 402, at least one API corresponding to each API service is determined.
In this embodiment, the detailed description of step 402 is referred to the detailed description of step 202, and will not be repeated here.
Step 403, for each API, outputting a form editing interface corresponding to the 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 as to perform man-machine interaction on the form editing interface and realize configuration of the APIs.
Step 404, determining editing information received on the form editing interface and configuring the API based on the editing information.
In this embodiment, the user may input editing information on the form editing interface by triggering a man-machine interaction instruction. Thereafter, the execution body 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 subject can configure the parameter names, types and detailed descriptions of the API based on the editing information.
In some alternative implementations of the present 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 body may implement rapid configuration for the API based on the preset parameter configuration information. Alternatively, the configuration template information may be parameter configuration information in a table form. The manner of configuring the API based on the configuration template information may specifically be: based on JSON (JavaScript Object Notation, JS object numbered musical notation) and preset parameter configuration information in a table form, generating JSOnSchema (describing your JSON data format); the API is configured based on JsonSchema.
Further alternatively, 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 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, so that the API configuration efficiency is improved. For complex API parameter configuration, configuration codes in JsonSchema format can be adopted to realize configuration, the degree of customization is higher, and the high-level expansion requirement of parameter configuration can be met.
In step 405, for each API, responsive to determining that the data processing class corresponding to the API is generated for the document, document data corresponding to the API is generated.
In this embodiment, the execution body can generate document data corresponding to a single API on line for the API. The document data may include, but is not limited to, an API interface address, request parameters, returned results, and the like.
In some optional implementations of the present embodiment, generating 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 templates may include document templates as well as programming language templates. The document template is used for configuring information such as format of the document, and the programming language template is used for configuring programming language types used by the document. The target template may be selected by user definition, or may be determined by the execution body according to a preset, which is not limited in this embodiment. Then, the execution body can generate 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 class corresponding to the API is data debugging, debugging the API to obtain a debugging processing result.
In this embodiment, data debugging refers to running codes included in an API to obtain a running result, and if the running result is reported to be wrong, error correction can be performed on 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 which can run smoothly. Further, the debugging processing result may include an API after the completion of debugging, error reporting information, running result information, and the like.
Wherein, 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 carrying out identity verification on the identity verification information to obtain a verification result. Further, if the verification result indicates that the authentication is passed, the above-mentioned debugging of the API is performed, and a debugging processing result is obtained.
Step 407, outputting a data processing result, where the data processing result at least includes document data and/or a debugging processing result.
In this embodiment, the execution body may output the document data and/or the debug processing result, so that the user performs editing, authority setting, delivery selling, and the like, according to the document data and/or the debug processing result. For a detailed description of step 407, please refer to a detailed description of step 204, which is not described herein.
And step 408, transmitting each API to an API mall for demonstration.
In this embodiment, the execution body 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 realized in the API mall.
In step 409, in response to receiving the target API processing instruction in the API mall, the usage rights of the specified APIs in the respective APIs are configured based on the target API processing instruction.
In this embodiment, the target API processing instruction is used to instruct to process the usage rights of the specified APIs, and the number of the specified APIs may be one or more, which is not limited in this embodiment.
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 an API developer, the public platform can be operated on an execution main body to acquire each API service of local or networking transmission on the public platform, determine an API corresponding to each API service, and then perform unified modeling on the APIs based on the OAS to obtain the API bottom metadata. And then, based on the API bottom metadata with unified data format and strong applicability, the online generation and online debugging of the API document are realized. Optionally, the functions of 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 published and transferred to the API mall. The API mall may also run on the public platform to enable API users to purchase and use APIs on the public platform. Therefore, links such as API design, document generation, online debugging, outward opening, delivery selling and the like in the API development process are realized on the public platform. Furthermore, after the API user purchases the APIs on the public platform, the corresponding APIs can be called online only through identity authentication, and the API conversion of multiple programming languages can be realized online, so that the code quantity of manually calling the APIs 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 taking a single API as granularity to process data and improving the fineness of the data processing, is convenient for previewing the API effect in real time, and has better design effect of the API. In addition, each API can be transmitted to an API mall to realize delivery and selling of the APIs. That is, by adopting the method for processing an API provided by the above embodiment of the present application, full flow management of the API can be achieved.
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 is particularly applicable to various servers.
As shown in fig. 5, the apparatus 500 for processing an 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.
The service acquisition unit 501 is configured to acquire each API service.
The API determining unit 502 is configured to determine at least one API corresponding to each API service.
The data processing unit 503 is configured to, for each API, perform data processing on the API according to the data processing class corresponding to the API, to obtain a data processing result.
The result output unit 504 is configured to output a data processing result.
In some alternative implementations of the present embodiment, the data processing unit 504 is further configured to: for each API, in response to determining that the data processing category corresponding to the API is generated for the document, document data corresponding to the API is generated.
In some alternative implementations of the present 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 alternative implementations of the present embodiment, the data processing unit 504 is further configured to: and for each API, in response to determining that the data processing category 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 an API mall for display; and a right configuration unit configured to configure the usage rights of the specified APIs in the respective APIs based on the target API processing instructions in response to receiving the target API processing instructions in the API mall.
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; and an information determining 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.
According to the device for processing the APIs provided by the embodiment of the application, each API service can be disassembled into the corresponding APIs, and the data processing is performed on each API according to the data processing category corresponding to each API, and the data processing is performed by taking a single API as granularity in the process, so that the fineness of the data processing can be improved. And moreover, online document generation and online debugging of the API can be realized, so that the effect of the API can be conveniently previewed in real time, and the design effect of the API is better. In addition, each API can be transmitted to an API mall to realize delivery and selling of the APIs. That is, by adopting the method for processing an API provided by the above embodiment of the present application, full flow management of the API can be achieved.
It should be understood that the units 501 to 504 described in the apparatus 500 for processing an API correspond to the respective steps in the method described with reference to fig. 2. Thus, the operations and features described above with respect to the method of processing an API are equally applicable to the apparatus 500 and the elements contained therein, and are not described in detail herein.
According to embodiments of the present application, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 6 illustrates a block diagram of an electronic device 600 used to implement a 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 telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary 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 that 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 may also be stored. The computing unit 601, ROM 602, and RAM 603 are connected to each other by a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Various components in the device 600 are connected to the I/O interface 605, including: an input unit 606 such as a keyboard, mouse, etc.; 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 computing unit 601 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the respective methods and processes described above, for example, a method for processing an API. For example, in some embodiments, the method for processing an API may be implemented as a computer software program tangibly embodied on 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 a computer program is loaded into RAM 603 and executed by 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 to perform the method for processing the API by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On 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, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code 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 code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. 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. The 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 pointing device (e.g., a mouse or 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 may 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 input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background 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 background, 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 a client and a server. The client and server are typically 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 appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (16)

1. A method for processing an API, comprising:
acquiring each API service, wherein the API service refers to one software service realized by at least one API;
determining at least one API corresponding to each API service;
for each API, carrying out data processing on the API according to the data processing category corresponding to the API to obtain a data processing result, wherein the data processing category comprises but is not limited to document generation, data debugging and software development kit generation, and different data processing categories correspond to different data processing modes;
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 class corresponding to the API to obtain a data processing result, including:
for each API, in response to determining that the data processing category corresponding to the API is generated for the document, document data corresponding to the API is generated.
3. The method of claim 2, wherein the generating document data corresponding to the API comprises:
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 class corresponding to the API to obtain a data processing result, including:
and for each API, in response to determining that the data processing category 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 specified APIs in the respective APIs based on the target API processing instruction.
6. The method of claim 1, wherein the method further comprises:
after determining at least one API corresponding to each API service, outputting a form editing interface corresponding to each API for each API;
editing information received on the form editing interface is determined, and the API is configured based on the editing information.
7. The method of claim 1, wherein the method further comprises:
after at least one API corresponding to each API service is determined, configuration template information corresponding to the API is determined for each API, and the API is configured based on the configuration template information.
8. An apparatus for processing an API, comprising:
a service acquisition unit configured to acquire respective API services, the API services referring to one kind of software service implemented by at least one API;
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 category corresponding to the API to obtain a data processing result, wherein the data processing category comprises but is not limited to document generation, data debugging and software development kit generation, and different data processing categories correspond to different data processing modes;
and 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 corresponding to the API is generated for the document, 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 category 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 an API mall for display;
and a right configuration unit configured to configure a use right of a specified API in the respective APIs based on a target API processing instruction in response to receiving the target API processing instruction in the API mall.
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 after the determining of at least one API corresponding to each API service;
and an information determining 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 the API configuration unit is configured to determine configuration template information corresponding to each API for each API after determining at least one API corresponding to each API service, 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 in communication with the at least one computing unit; wherein,,
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 storing computer instructions for causing the computer to perform the method of 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 CN113157360A (en) 2021-07-23
CN113157360B true 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 (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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

Family Cites Families (2)

* 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

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN113157360A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
TWI757743B (en) Mini program generation method and device
CN113808231B (en) Information processing method and device, image rendering method and device, and electronic device
WO2023142451A1 (en) Workflow generation methods and apparatuses, and electronic device
CN109582317B (en) Method and apparatus for debugging hosted applications
CN113031946A (en) Method and device for rendering page component
CN113050940A (en) Method for previewing small program, related device and computer program product
CN115509522A (en) Interface arranging method and system for low-code scene and electronic equipment
CN115222444A (en) Method, apparatus, device, medium and product for outputting model information
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
WO2023169193A1 (en) Method and device for generating smart contract
CN113157360B (en) Method, apparatus, device, medium, and article for processing an API
CN111324470A (en) Method and device for generating information
CN114374703B (en) Cloud mobile phone information acquisition method, device, equipment and storage medium
CN112966201B (en) Object processing method, device, electronic equipment and storage medium
CN114741294A (en) Page debugging method, device, equipment and storage medium
CN111813407B (en) Game development method, game running device and electronic equipment
CN114218166A (en) Data processing method and device, electronic equipment and readable storage medium
CN114218313A (en) Data management method, device, electronic equipment, storage medium and product
CN116561075B (en) Method for generating dynamic link library file, method and device for calling operator
CN114610204B (en) Auxiliary device and method for data processing, storage medium and electronic equipment
CN113407844B (en) Version recommendation method, device and equipment of applet framework and storage medium
CN114791996B (en) Information processing method, device, system, electronic equipment and storage medium
CN113032040B (en) Method, apparatus, device, medium, and article for processing tasks
CN114997329A (en) Method, apparatus, device, medium and product for generating a model
CN114385158A (en) Data interaction system construction method, device and equipment

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