Application programming interface management method and device, equipment and medium

By updating and synchronizing API metadata in a timely manner through the metadata management platform, the problem of inconsistent configuration guidance after API updates has been resolved, improving the efficiency of API updates and maintenance, and optimizing the user experience and product stability.

CN120832159APending Publication Date: 2025-10-24BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410487586.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-22
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

In existing technologies, the guidance configuration for APIs suffers from asynchronous and manual maintenance issues. This results in the guidance configuration not being updated in a timely manner after an API update, leading to problems such as API call failures and difficulties in calling.

Method used

The metadata management platform updates the metadata of the target application programming interface in a timely manner and transmits instructions to the target application programming interface to make changes to the metadata, so as to achieve data consistency between the metadata management platform and the recipient of the instructions.

Benefits of technology

It enables timely updates and synchronization of API metadata, improves API update/maintenance efficiency, optimizes API user experience, reduces documentation inconsistencies and errors caused by human error, and enhances development efficiency and product stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120832159A_ABST
    Figure CN120832159A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an application programming interface management method and device, equipment and a medium. The method is applied to a metadata management platform and comprises the steps that to-be-processed information is obtained, and the to-be-processed information is to-be-processed information of a target application programming interface in application programming interfaces; determining target metadata of the target application programming interface based on initial metadata of the target application programming interface in the metadata management platform and differential data corresponding to the to-be-processed information; and transmitting indication information of the target metadata, wherein the indication information indicates that the target application programming interface changes the metadata. The metadata corresponding to the target application programming interface is updated in time through the metadata management platform, meanwhile, the target application programming interface is indicated to be subjected to metadata change through transmission of the indication information, and data homology of the metadata management platform and a receiving party of the indication information is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The embodiments of the present disclosure relate to computer technology, and in particular, to an application programming interface management method and device, equipment and medium. BACKGROUND

[0002] In related solutions, the guidance configuration of the API has problems of asynchronous maintenance and manual maintenance, which leads to that the guidance configuration cannot be updated in time after the API is updated, and the consumption side of the API may have problems of API calling failure and calling difficulty. SUMMARY

[0003] The present disclosure provides an application programming interface management method and device, equipment and medium, which updates the metadata corresponding to the target application programming interface in time through the metadata management platform, and indicates that the target application programming interface has changed the metadata through the transmission of the indication information, so as to realize the data homology between the metadata management platform and the receiver of the indication information.

[0004] In a first aspect, the embodiments of the present disclosure provide an application programming interface management method, applied to a metadata management platform, the metadata management platform being a platform for managing the metadata of at least one application programming interface, and the method comprising:

[0005] obtaining to-be-processed information, the to-be-processed information being information to be processed of a target application programming interface in the application programming interface;

[0006] determining target metadata of the target application programming interface based on initial metadata of the target application programming interface in the metadata management platform and differential data corresponding to the to-be-processed information;

[0007] transmitting indication information of the target metadata, the indication information indicating that the target application programming interface has changed the metadata.

[0008] In a second aspect, the embodiments of the present disclosure further provide an application programming interface management device, configured in a metadata management platform, the metadata management platform being a platform for managing the metadata of at least one application programming interface, and the device comprising:

[0009] an obtaining module, configured to obtain to-be-processed information, the to-be-processed information being information to be processed of a target application programming interface in the application programming interface;

[0010] a determining module, configured to determine target metadata of the target application programming interface based on initial metadata of the target application programming interface in the metadata management platform and differential data corresponding to the to-be-processed information;

[0011] transmitting an indication information of the target metadata, the indication information indicating that the target application programming interface has changed the metadata.

[0012] In a third aspect, the embodiments of the present disclosure further provide an electronic device as a metadata management platform, the electronic device comprising:

[0013] one or more processing apparatuses;

[0014] a storage apparatus configured to store one or more programs,

[0015] When the one or more programs are executed by the one or more processing apparatuses, the one or more processing apparatuses implement the application programming interface management method provided by the embodiments of the present disclosure.

[0016] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium containing computer executable instructions, which, when executed by a computer processor, are configured to perform the application programming interface management method provided by the embodiments of the present disclosure.

[0017] The technical solution of the embodiments of the present disclosure realizes metadata management of at least one application programming interface through a metadata management platform. When the metadata corresponding to a target application programming interface is changed, the metadata management platform updates the initial metadata corresponding to the target application programming interface to the target metadata in time, and transmits an indication information of the target metadata, which indicates that the target application programming interface has changed the metadata, so that the metadata management platform and the receiver of the indication information can achieve data homogeneity with respect to the target application programming interface. BRIEF DESCRIPTION OF DRAWINGS

[0018] The above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, same or similar reference numerals can represent same or similar elements. It should be understood that the drawings are schematic, and the original and elements are not necessarily drawn according to the scale.

[0019] Figure 1 is a flowchart of an application programming interface management method provided by the embodiments of the present disclosure;

[0020] Figure 2 is a flowchart of another application programming interface management method provided by the embodiments of the present disclosure;

[0021] Figure 3 is a flowchart of a method for determining target metadata based on initial metadata and differential data provided by the embodiments of the present disclosure;

[0022] Figure 4is a flowchart of another application programming interface management method provided by an embodiment of the present disclosure;

[0023] Figure 5 is a timing diagram of an application programming interface management method provided by an embodiment of the present disclosure;

[0024] Figure 6 is a structural diagram of an application programming interface management apparatus provided by an embodiment of the present disclosure;

[0025] Figure 7 is a structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] Embodiments of the present disclosure will be described in more detail with reference to the drawings. While certain embodiments of the present disclosure will be shown and described below, it is to be understood that the present disclosure can be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided as part of the disclosure to convey the principles and subtleties of the present disclosure to those skilled in the art.

[0027] It should be understood that each of the steps in the method embodiments of the present disclosure can be performed in a different order and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0028] The term "comprising" and variations thereof as used herein are used inclusively, i.e., "comprising but not limited to." The term "based on" is "based at least in part on." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments." Related terms are defined in the description that follows.

[0029] It should be noted that the terms "first", "second", and the like in the present disclosure are used only to distinguish different devices, modules or units, and do not imply the order or interdependence of the functions performed by these devices, modules or units.

[0030] It should be noted that the terms "one", "multiple" in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless otherwise explicitly stated in the context, it should be understood as "one or more".

[0031] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.

[0032] Figure 1 is a flowchart of an application programming interface management method provided by an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to a case of managing metadata of an application programming interface. The method can be executed by an application programming interface management apparatus. The apparatus can be implemented in the form of software and / or hardware, and integrated in an electronic device as a metadata management platform. Optionally, the electronic device can be a mobile terminal or a PC terminal, etc.

[0033] In the embodiment of the present disclosure, the metadata management platform is a platform for managing metadata of at least one application programming interface (API). The metadata management platform can construct metadata corresponding to the API, update the constructed metadata, transmit the metadata to a data storage (such as a database, etc.) for storage, and transmit information indicating metadata update to a downstream consumer side when the metadata is updated, to realize timely synchronization of updated data.

[0034] The metadata can be understood as data describing data, and can describe and define the corresponding API, so as to manage and maintain the corresponding API based on the metadata. The metadata can include interface basic information and interface parameter information of the corresponding API. The interface basic information can be information describing the basic attributes of the interface, and can include but is not limited to the name, version, usage instructions, usage restrictions, and corresponding domain name of the interface. The interface parameter information can be details of parameters required when defining the interface, and can include but is not limited to the type of the parameter, the note of the parameter, whether the parameter is hidden, and the example value of the parameter, etc.

[0035] As shown in Figure 1 , the method comprises:

[0036] S110, obtaining to-be-processed information, the to-be-processed information being to-be-processed information of a target application programming interface in the application programming interface.

[0037] The target application programming interface can be an interface that needs to be processed in the application programming interface managed by the metadata management platform, such as an interface that needs to be changed in metadata. The to-be-processed information can be understood as to-be-processed information related to metadata change of the target application programming interface.

[0038] Metadata changes can be understood as changes resulting from further improvements to the metadata based on the initially constructed metadata during the API development phase. During the API development phase, the metadata management platform can automatically generate metadata based on the code related to the interface definition of the target application programming interface, that is, generate metadata initially constructed for the target application programming interface. Afterwards, the metadata management platform can respond to operations in the improvement page of the metadata management platform and obtain information to be processed, which is information triggered by operations in the improvement page. Among them, the improvement page can be a page for improving metadata, and the operations in the improvement page can be operations for editing the initially constructed metadata corresponding to the target application programming interface, which is not limited here.

[0039] Metadata changes can also be understood as changes to metadata made after the API development is completed and released to the downstream consumer side. Optionally, the above-mentioned initially constructed metadata can be directly published; it can also be further improved on the basis of the initially constructed metadata and then released, which is not limited here. After the API is released to the downstream consumer side, the metadata management platform can detect changes in the code related to the interface definition of the target application programming interface in the code repository, and obtain information to be processed based on the changed code. Among them, the code repository can be a repository for storing code related to the interface definition of the API managed by the metadata management platform.

[0040] S120: Determine target metadata of the target application programming interface based on the initial metadata of the target application programming interface in the metadata management platform and the differential data corresponding to the information to be processed.

[0041] The initial metadata of the target API can be understood as the metadata corresponding to the target API that has not been modified. For example, the initial metadata may be the metadata corresponding to the target API before further metadata refinement during the API development phase, i.e., the metadata initially constructed in S110 above. Another example is the initial metadata that may be the metadata at the time the API is developed and released to downstream consumers but has not been modified.

[0042] The target metadata of the target application programming interface can be understood as metadata obtained by changing the initial metadata of the target application programming interface.

[0043] Differential data can be understood as data that differs between the information to be processed and the initial metadata. In the disclosed embodiments, metadata can be stored in the form of fields. Accordingly, the differential data corresponding to the initial metadata and the information to be processed can be determined by comparing the field content of the same field in the information to be processed and the initial metadata.

[0044] The initial metadata and the differential data corresponding to the target application programming interface are combined to determine the target metadata of the target application programming interface. The combination manner can be superposition of the two, which is not limited here.

[0045] In S130, indication information of the target metadata is transmitted, and the indication information indicates that the target application programming interface has changed the metadata.

[0046] After the initial metadata corresponding to the target application programming interface is changed to the target metadata, indication information indicating that the target application programming interface has changed the metadata can be transmitted to a message queue of a consumer side downstream. After obtaining the indication information, the consumer side can determine that the target application programming interface has changed the metadata based on the indication information, and then can obtain the target metadata of the target application programming interface through the metadata management platform.

[0047] The indication information can be information indicating that the target application programming interface has changed the metadata. The indication information is not limited, for example, the indication information can include a name corresponding to the target application programming interface, so that the consumer side determines the corresponding target application programming interface based on the name, and then obtains the target metadata. The consumer side can be a side of an API published by the metadata management platform, for example, a document station. The document station is used to store usage documents corresponding to the API, and the usage documents corresponding to the API can be automatically generated based on the metadata of the API managed in the metadata management platform.

[0048] The technical solution of the embodiments of the present disclosure realizes metadata management of at least one application programming interface through the metadata management platform. When the metadata corresponding to the target application programming interface is changed, the metadata management platform updates the initial metadata corresponding thereto to the target metadata in time, and simultaneously transmits indication information of the target metadata, indicating that the target application programming interface has changed the metadata, so as to realize data homogeneity of the metadata management platform and a receiver of the indication information with respect to the target application programming interface.

[0049] The metadata initially constructed for the target application programming interface is described as follows:

[0050] In one embodiment, the construction operation of the metadata of the target application programming interface includes:

[0051] The interface definition code of the target application programming interface is obtained from the code repository;

[0052] The metadata corresponding to the interface definition code is constructed.

[0053] In actual application, when a target application programming interface needs to be developed, interface definition code corresponding to the target application programming interface is written and submitted to a code repository, and the metadata management platform can obtain the interface definition code of the target application programming interface from the code repository after the submission. The interface definition code can be code related to the interface definition of the application programming interface, and can be implemented by an interface definition language (IDL).

[0054] After the metadata management platform obtains the interface definition code of the target application programming interface, the interface definition code can be parsed, and the interface basic information and the interface parameter information of the target application programming interface can be obtained after the parsing. Based on the obtained information, initial construction of metadata is performed.

[0055] In an embodiment, the obtaining of the interface definition code of the target application programming interface from the code repository comprises:

[0056] In response to an input operation of identification information in a creation page of the metadata management platform, the identification information is obtained.

[0057] An interface selection page is displayed, and the interface selection page displays at least one application programming interface corresponding to the identification information.

[0058] In response to an interface selection operation and an interface creation operation in the interface selection page, interface definition code corresponding to a target application programming interface selected by the interface selection operation is obtained from the code repository.

[0059] When the metadata is initially constructed, there are multiple interface definition codes submitted to the code repository, and therefore, selection of an API (i.e., a target application programming interface) corresponding to the required constructed metadata needs to be performed to determine the interface definition code corresponding to the selected API.

[0060] The creation page can be a page for creating metadata of an API. The identification information can be information identifying the API corresponding to the required constructed metadata, and the identification can be a name of the corresponding API, a uniform resource identifier (URI) of the corresponding API, which is not limited herein. The input operation of the identification information can be an operation of inputting the identification in the creation page.

[0061] In response to the input operation of the identification information in the creation page, the input identification is determined as the identification information. Based on the determined identification information, at least one application programming interface corresponding to the identification information can be obtained by fuzzy matching in the code repository, and the at least one application programming interface is displayed in the form of a list to the interface selection page.

[0062] The interface selection page can be a page for selecting an application programming interface for the required construction metadata. The interface selection operation can be an operation for selecting a target application programming interface from a plurality of APIs displayed on the interface selection page. The interface creation operation can be an operation for confirming the creation of metadata of the target application programming interface. The interface selection operation and the interface creation operation can be triggered by the same control or different controls in the interface selection page.

[0063] In response to the interface selection operation and the interface creation operation in the interface selection page, the corresponding interface definition code can be obtained from the code repository based on the selected target application programming interface.

[0064] On the basis of the above-mentioned embodiments, variant embodiments of the above-mentioned embodiments are proposed. It should be noted that, in order to make the description brief, only the differences from the above-mentioned embodiments are described in the variant embodiments.

[0065] Figure 2 is a flowchart of another application programming interface management method provided by the embodiments of the present disclosure. The embodiments of the present disclosure are further refinements on the basis of the above-mentioned embodiments, and are applicable to the case where the development phase of the API in the above-mentioned embodiments is changed based on the further improvement of the initially constructed metadata.

[0066] As shown in Figure 2 , the method comprises:

[0067] S210, in response to an input operation of the to-be-processed information in the improvement page of the metadata management platform, obtaining the to-be-processed information.

[0068] The input operation of the to-be-processed information in the improvement page can be understood as an operation of editing the initially constructed metadata corresponding to the target application programming interface in the improvement page. The to-be-processed information is the information triggered by the input operation of the to-be-processed information in the improvement page.

[0069] In the improvement page, a plurality of input boxes and selection boxes can be provided. The input operation through the input box and the selection operation through the selection box can be understood as the input operation of the to-be-processed information. The to-be-processed information input through the improvement page can include interface basic information (such as the name, version, usage instructions, usage restrictions, and corresponding domain name of the interface) and interface parameter information (such as the name of the parameter, the type of the parameter, the note of the parameter, whether the parameter is hidden, and the example value of the parameter) corresponding to the target application programming interface. The content of the above-mentioned improvement page is an example of the to-be-processed information, which can be added or deleted according to the application needs.

[0070] S220, determining target metadata of the target application programming interface based on initial metadata of the target application programming interface in the metadata management platform and differentiated data corresponding to the to-be-processed information.

[0071] The initial metadata can be initial constructed metadata corresponding to the target application programming interface. The to-be-processed information can be information acquired through S210. The differentiated data can be data that is different from the initial metadata.

[0072] In the embodiments of the present disclosure, the initial metadata can be mapped from interface definition code of the target application programming interface and represented in the form of mutual nesting of structures. For example, the first structure is used to represent interface basic information, such as interface name, interface note, domain name, creator of the interface, creation time, etc. The second structure representing request parameters of the interface and the third structure representing return parameters of the interface are nested in the first structure. The second structure is a sub-structure of the first structure and contains specific request parameters of the interface. The third structure is a sub-structure of the first structure and contains specific return parameters of the interface. The fourth structure is a sub-structure of the second structure or the third structure and is used to represent specific information of the parameters, such as name of the parameter, type of the parameter, whether the parameter is necessary, field name corresponding to the parameter, etc.

[0073] After the input operation of the to-be-processed information in the perfecting page is triggered to generate the to-be-processed information, the differentiated data that is updated from the initial metadata can be recorded in a mapping manner. Then, the target metadata can be determined based on the initial metadata and the differentiated data. The differentiated data can also be represented in the form of structures. The interface name (or other information capable of identifying the interface) in the initial metadata can be retained in the differentiated data, indicating that the differentiated data is corresponding to the initial metadata of the interface.

[0074] In one embodiment, the differentiated data includes interface basic information and interface parameter information of the target application programming interface. The interface basic information and the interface parameter information can be updated in the perfecting page, and thus the updated interface basic information and the interface parameter information can be different from the initial metadata.

[0075] In one embodiment, the interface parameter information is determined based on path matching of corresponding attributes in the corresponding metadata. That is, the interface parameter information included in the differentiated data can be represented by path matching of the required updated parameters in the above structures.

[0076] Figure 3is a flowchart of a method for determining target metadata based on initial metadata and differential data according to an embodiment of the present disclosure. As shown in Figure 3 By performing an input operation of the to-be-processed information in the perfecting page, the metadata management platform can obtain the to-be-processed information, record differential data that is updated relative to the initial metadata through mapping, and determine the target metadata by superimposing the differential data on the initial metadata.

[0077] S230, transmitting indication information of the target metadata, the indication information indicating that the target application programming interface has changed the metadata.

[0078] The technical solution of the embodiment of the present disclosure can update the initial metadata corresponding to the target application programming interface to the target metadata in response to the input operation of the to-be-processed information in the perfecting page of the metadata management platform, thereby realizing customized modification of the metadata. Meanwhile, the indication information indicating the change of the metadata is transmitted, so that the metadata management platform and the receiver of the indication information have the same data after the customized modification of the metadata, thereby ensuring the timeliness and accuracy of the metadata management.

[0079] Figure 4 is a flowchart of another application programming interface management method according to an embodiment of the present disclosure, which is a further refinement of the above embodiment and is applicable to the case of changing the metadata after the API development is completed and published to the downstream consumption side.

[0080] As shown in Figure 4 The method comprises the following steps.

[0081] S410, obtaining the change code of the target application interface from the code repository.

[0082] After the target application interface is developed and published to the downstream consumption side, if the target application interface needs to be updated, the change code of the target application interface can be uploaded to the code repository (as shown in Figure 3 The metadata management platform can obtain the change code of the target application interface by detecting the code repository. The change code of the target application interface can be understood as code for realizing the change of the interface definition of the target application programming interface, which can be determined based on actual application needs.

[0083] S420, determining to-be-processed information in the change code.

[0084] The metadata management platform can determine the to-be-processed information by analyzing the change code.

[0085] S430, determine target metadata of the target application programming interface based on the initial metadata of the target application programming interface in the metadata management platform and the differentiated data corresponding to the to-be-processed information.

[0086] After determining the to-be-processed information through the changed code, the differentiated data that the to-be-processed information has updated relative to the initial metadata can be recorded in a mapping manner on the basis of the initial metadata. Then, the target metadata can be determined by superimposing the differentiated data on the basis of the initial metadata.

[0087] S440, transmit indication information of the target metadata, the indication information indicating that the target application programming interface has changed metadata.

[0088] The technical solution of the embodiment of the present disclosure can obtain the changed code of the target application programming interface through the code repository after the target application programming interface is developed and published to the downstream consumption side, update the metadata of the target application programming interface in the metadata management platform based on the changed code, and realize on-demand update of the metadata of the target application programming interface.

[0089] The embodiment of the present disclosure provides a system architecture for implementing an application programming interface management method, and the system architecture includes a development party, a code repository, a metadata management platform, data storage, a message queue, and a downstream consumption side. Through the system architecture, the data of the development party, the metadata management platform, and the downstream consumption party can be homologous.

[0090] Figure 5 is a timing diagram of an application programming interface management method provided by the embodiment of the present disclosure, and the application programming interface management method is explained as follows in combination with the system architecture and the timing diagram shown in Figure 5

[0091] I. API input stage

[0092] S1. API interface definition IDL is written and submitted to the code repository;

[0093] S2. Click "create API" in the creation page provided by the metadata management platform and input identification information;

[0094] S3. The metadata management platform performs fuzzy matching in the code repository based on the identification information, and confirms at least one API corresponding to the identification information;

[0095] S4. The metadata management platform returns an interface list through an interface selection page, and the interface list is a list of at least one API corresponding to the identification information;

[0096] ​S5. Select an API as a target application programming interface in an interface list through an interface selection page, and confirm the creation of metadata of the target application programming interface;

[0097] S6. The metadata management platform obtains interface definition code corresponding to the target application programming interface from a code repository;

[0098] S7. The metadata management platform parses the code and constructs initial metadata;

[0099] S8. The metadata management platform transmits the initial metadata to a data storage for saving;

[0100] S9. The metadata management platform returns information indicating that the initial metadata construction is successful.

[0101] II. API information perfecting stage

[0102] S10. Click “Edit API” in a perfecting page provided by the metadata management platform;

[0103] S11. Perfect interface basic information in the perfecting page provided by the metadata management platform;

[0104] S12. Perfect interface parameter information in the perfecting page provided by the metadata management platform;

[0105] S13. Save / release information triggered by an operation in the perfecting page;

[0106] S14. The metadata management platform processes differential data based on the initial metadata and constructs target metadata;

[0107] S15. The metadata management platform transmits the target metadata to a data storage for saving;

[0108] S16. The metadata management platform transmits indication information to a message queue on a downstream consumption side, indicating that the target application programming interface has changed metadata;

[0109] S17. The metadata management platform returns information indicating that the target metadata saving / release is successful.

[0110] III. API data same-origin updating stage (updating / maintaining of subsequent interfaces)

[0111] S18. Upload change code of the target application interface to a code repository;

[0112] S19. The metadata management platform detects code changes in the code repository and obtains change code of the target application interface;

[0113] S20. The metadata management platform parses the change code and constructs target metadata;

[0114] S21. The metadata management platform transmits the target metadata to a data storage for storage;

[0115] S22. The metadata management platform transmits indication information to a message queue on a downstream consumption side, indicating that the target application programming interface has changed the metadata.

[0116] The technical scheme of the embodiment of the present disclosure provides a method for realizing an API unified data source, which normalizes and modularly manages the metadata of the API, improves the efficiency of API updating / maintenance, and optimizes the API use experience.

[0117] The technical scheme of the embodiment of the present disclosure has the following advantages:

[0118] Based on the API definition file and the code annotation, the parameter examples, notes, whether to hide, request response examples, error codes and other information of the API metadata can be modified based on the external document requirements, and the modified information can be synchronized to the consumption side in time;

[0119] The constructed API unified data source information is more perfect, and the processing is more flexible;

[0120] Based on the metadata management platform, the API document, interface debugging, and customized generation of interface SDK can be performed, which improves the team development efficiency and product stability;

[0121] A lot of time and effort can be saved, the tedious process of manually writing documents can be avoided, and the work efficiency can be improved;

[0122] The automatically generated API document is usually more accurate and consistent, and the inconsistency and errors of the document caused by human errors are reduced;

[0123] The automatically generated document can be automatically updated with the update of the API, keeping the timeliness and accuracy of the document.

[0124] For example, after developing an application, the information of the API interface of the developed application can be entered on the metadata management platform, and the example values, notes, error codes and the like of the parameters can be customized and modified, and then the interface use document, debugging station, SDK and the like are generated based on this and provided to the third-party consumers for use. Meanwhile, when the API interface is updated, these documents, SDK and the like will also be automatically updated, which helps to improve the development efficiency and quality.

[0125] In one embodiment, an interface for generating an application programming interface based on a metadata management platform is provided, and the interface can display one or more of interface parameter information and interface basic information corresponding to an API managed in the metadata management platform.

[0126] In one embodiment, an interface for debugging an interface based on a metadata management platform is provided, and the interface can display a request address (i.e., domain name) for debugging the interface, select a debugging environment, fill in request parameters, request headers, and request bodies, trigger the debugging of the interface through a "start debugging" control, and display a request result after the debugging is initiated.

[0127] Figure 6 FIG. 1 is a structural schematic diagram of an application programming interface management device provided by an embodiment of the present disclosure. The device is configured in a metadata management platform, and the metadata management platform is a platform for managing metadata of at least one application programming interface. As shown in FIG. 1, the device includes an obtaining module 610, a determining module 620, and a transmitting module 630. Figure 6

[0128] The obtaining module 610 is configured to obtain to-be-processed information, and the to-be-processed information is information to be processed for a target application programming interface in the application programming interface.

[0129] The determining module 620 is configured to determine target metadata of the target application programming interface based on initial metadata of the target application programming interface in the metadata management platform and differential data corresponding to the to-be-processed information.

[0130] The transmitting module 630 is configured to transmit indication information of the target metadata, and the indication information indicates that the target application programming interface has been changed in metadata.

[0131] ​The technical scheme provided by the embodiments of the present disclosure comprises: an obtaining module, which obtains to-be-processed information, the to-be-processed information being information to be processed of a target application programming interface in the application programming interface; a determining module, which determines target metadata of the target application programming interface based on initial metadata of the target application programming interface in the metadata management platform and differential data corresponding to the to-be-processed information; and a transmission module, which transmits indication information of the target metadata, the indication information indicating that the target application programming interface has changed the metadata. When the metadata of the target application programming interface is changed, the metadata management platform updates the initial metadata corresponding thereto to the target metadata in a timely manner, and simultaneously transmits the indication information of the target metadata, indicating that the target application programming interface has changed the metadata, so that the metadata management platform and the receiver of the indication information achieve data homology with respect to the target application programming interface.

[0132] In one embodiment, the obtaining module 610 is specifically configured to:

[0133] obtain changed code of the target application interface from a code repository;

[0134] determine to-be-processed information in the changed code.

[0135] In one embodiment, the obtaining module 610 is specifically configured to:

[0136] obtain to-be-processed information in response to an input operation of the to-be-processed information in a perfecting page of the metadata management platform.

[0137] In one embodiment, the differential data comprises interface basic information and interface parameter information of the target application programming interface.

[0138] In one embodiment, the interface parameter information is determined based on path matching corresponding attributes in the corresponding metadata.

[0139] In one embodiment, the apparatus further comprises a metadata construction module, which is configured to:

[0140] obtain interface definition code of the target application programming interface from a code repository;

[0141] construct metadata corresponding to the interface definition code.

[0142] In one embodiment, the metadata construction module is specifically configured to:

[0143] obtain identification information in response to an input operation of the identification information in a creation page of the metadata management platform.

[0144] display an interface selection page, the interface selection page displaying at least one application programming interface corresponding to the identification information;

[0145] In response to an interface selection operation and an interface creation operation in the interface selection page, obtaining, from a code repository, interface definition code corresponding to a target application programming interface selected by the interface selection operation.

[0146] The application programming interface management apparatus provided by the embodiments of the present disclosure can execute the application programming interface management method provided by any of the embodiments of the present disclosure, and has the corresponding function modules and beneficial effects of the execution method.

[0147] It is worth noting that each unit and module included in the above apparatus is only divided according to the function logic, but is not limited to the above division, as long as the corresponding function can be realized; in addition, the specific name of each functional unit is only for easy mutual distinction, and does not limit the protection scope of the embodiments of the present disclosure.

[0148] Figure 7 is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. The following refers to Figure 7 which shows a structural schematic diagram of an electronic device (for example Figure 7 terminal device or server) 500 suitable for implementing the embodiments of the present disclosure.

[0149] An electronic device provided by an embodiment of the present disclosure includes:

[0150] one or more processing apparatuses;

[0151] a storage apparatus configured to store one or more programs,

[0152] When the one or more programs are executed by the one or more processing apparatuses, the one or more processing apparatuses implement the application programming interface management method provided by the embodiments of the present disclosure.

[0153] The terminal device in the embodiments of the present disclosure can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablets), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 7 The electronic device shown is only an example, and should not bring any limitation to the function and use range of the embodiments of the present disclosure.

[0154] As Figure 7As shown, the electronic device 500 can include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501 that can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 502 or loaded into a random access memory (RAM) 503 from a storage device 508. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other through a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0155] Generally, the following devices can be connected to the I / O interface 505: input devices 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 508 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 509. The communication devices 509 can allow the electronic device 500 to communicate wirelessly or wired with other devices to exchange data. Although Figure 7 The electronic device 500 is shown with various devices, but it should be understood that not all of the shown devices are required to be implemented or possessed. More or fewer devices can alternatively be implemented or possessed.

[0156] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network through the communication devices 509, or installed from the storage devices 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the methods of embodiments of the present disclosure are performed.

[0157] The names of the messages or information exchanged between the plurality of devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.

[0158] The electronic device provided by the embodiments of the present disclosure and the application programming interface management method provided by the above-mentioned embodiments belong to the same inventive concept, and the technical details not described in detail in the present embodiments can be referred to the above-mentioned embodiments, and the present embodiments have the same beneficial effects as the above-mentioned embodiments.

[0159] The embodiment of the present disclosure provides a computer storage medium, which stores a computer program, and the computer program is executed by a processor to implement the application programming interface management method provided by the above embodiment.

[0160] It should be noted that the computer readable medium of the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two.

[0161] The computer storage medium can be a storage medium of computer executable instructions, which are used to execute the method provided by the present disclosure when executed by a computer processor.

[0162] The computer readable storage medium may, for example, be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having 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 above. In the present disclosure, the computer readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, the computer readable signal medium can include a data signal that propagates in a baseband or as part of a carrier wave, carrying computer readable program code. Such a propagated data signal can take many forms, including but not limited to electro-magnetic, optical, or any suitable combination thereof. The computer readable signal medium can also be any computer readable medium that is not a computer readable storage medium and that can transmit, propagate, or transport program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer readable medium can be transmitted by any suitable medium, including but not limited to wire, cable, RF (radio frequency), or the like, or any suitable combination of the above.

[0163] In some embodiments, the client, server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication (for example, communication network) of any form or medium. Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), Internet networks (for example, the Internet), and end-to-end networks (for example, ad hoc end-to-end networks), and any currently known or future developed network.

[0164] The computer readable medium can be included in the electronic device; or can exist separately from the electronic device.

[0165] The computer readable medium carries one or more programs, which when executed by the electronic device, cause the electronic device to: acquire to-be-processed information, the to-be-processed information being information to be processed of a target application programming interface in the application programming interfaces; determine target metadata of the target application programming interface based on initial metadata of the target application programming interface in the metadata management platform and differential data corresponding to the to-be-processed information; and transmit indication information of the target metadata, the indication information indicating that the target application programming interface has changed metadata.

[0166] Computer program code for carrying out operations of the present disclosure can be written in any one or more of a variety of programming languages or combinations of languages, including an object-oriented programming language such as Java, Smalltalk, C++, or the like, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0167] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present disclosure. In this regard, each block in the flow diagrams and the block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks depicted in succession can in fact be executed substantially concurrently or the blocks can sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and / or flow diagrams and combinations of blocks in the block diagrams and / or flow diagrams can be implemented by dedicated hardware-based systems that perform the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0168] The modules or units described in the embodiments of the present disclosure can be implemented by software or by hardware. In some cases, the name of the module or unit does not constitute a limitation on the module or unit itself.

[0169] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, example types of hardware logic components that can be used include Field-programmable Gate Arrays (FPGAs), Application-specific Integrated Circuits (ASICs), Application-specific Standard Products (ASSPs), System-on-a-chip systems (SOCs), Complex Programmable Logic Devices (CPLDs), etc.

[0170] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can 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 the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0171] According to one or more embodiments of the present disclosure, example 1 provides an application programming interface management method, applied to a metadata management platform, the metadata management platform being a platform for metadata management of at least one application programming interface, and the method comprising:

[0172] Obtaining to-be-processed information, the to-be-processed information being information to be processed of a target application programming interface in the application programming interface;

[0173] Determining target metadata of the target application programming interface based on initial metadata of the target application programming interface in the metadata management platform and differentiated data corresponding to the to-be-processed information;

[0174] Transmitting indication information of the target metadata, the indication information indicating that the target application programming interface has changed metadata.

[0175] According to one or more embodiments of the present disclosure, example 2 provides the method according to example 1,

[0176] The obtaining of the to-be-processed information comprises:

[0177] The change code of the target application program interface is obtained from a code repository.

[0178] The to-be-processed information in the change code is determined.

[0179] According to one or more embodiments of the present disclosure, example 3, the method according to any one of examples 1-2,

[0180] The obtaining of the to-be-processed information comprises:

[0181] In response to an input operation of to-be-processed information in a perfecting page of the metadata management platform, the to-be-processed information is obtained.

[0182] According to one or more embodiments of the present disclosure, example 4, the method according to any one of examples 1-3,

[0183] The differentiated data comprises interface basic information and interface parameter information of the target application program interface.

[0184] According to one or more embodiments of the present disclosure, example 5, the method according to example 4,

[0185] The interface parameter information is determined based on path matching corresponding attributes in the corresponding metadata.

[0186] According to one or more embodiments of the present disclosure, example 6, the method according to example 1,

[0187] The construction operation of the metadata of the target application program interface comprises:

[0188] The interface definition code of the target application program interface is obtained from a code repository.

[0189] The metadata corresponding to the interface definition code is constructed.

[0190] According to one or more embodiments of the present disclosure, example 7, the method according to example 6,

[0191] The obtaining of the interface definition code of the target application program interface from the code repository comprises:

[0192] In response to an input operation of identification information in a creation page of the metadata management platform, the identification information is obtained.

[0193] An interface selection page is displayed, and the interface selection page displays at least one application program interface corresponding to the identification information.

[0194] In response to the interface selection operation and the interface creation operation in the interface selection page, obtain, from a code repository, interface definition code corresponding to a target application programming interface selected by the interface selection operation.

[0195] According to one or more embodiments of the present disclosure, example 8 provides an application programming interface management apparatus configured in a metadata management platform, the metadata management platform being a platform for performing metadata management of at least one application programming interface, the apparatus comprising:

[0196] an obtaining module configured to obtain to-be-processed information, the to-be-processed information being information to be processed for a target application programming interface in the application programming interface;

[0197] a determining module configured to determine target metadata of the target application programming interface based on initial metadata of the target application programming interface in the metadata management platform and differential data corresponding to the to-be-processed information;

[0198] a transmitting module configured to transmit indication information of the target metadata, the indication information indicating that the target application programming interface has changed metadata.

[0199] According to one or more embodiments of the present disclosure, example 9 provides an electronic device as a metadata management platform, the electronic device comprising:

[0200] one or more processing apparatuses;

[0201] a storage apparatus configured to store one or more programs,

[0202] when the one or more programs are executed by the one or more processing apparatuses, causing the one or more processing apparatuses to implement the application programming interface management method as described in any one of examples 1-7.

[0203] According to one or more embodiments of the present disclosure, example 10 provides a storage medium containing computer-executable instructions for performing the application programming interface management method as described in any one of examples 1-7 when executed by a computer processor.

[0204] The above description is merely preferred embodiments of the present disclosure and a description of principles of applied technologies. It should be understood by those skilled in the art that the disclosed scope of the present disclosure is not limited to the technical solutions formed by the specific combinations of the above technical features, and should also cover other technical solutions formed by any combinations of the above technical features or equivalent features without departing from the above disclosed concept. For example, the above technical features can be replaced with technical features disclosed in the present disclosure (but not limited to) having similar functions to form technical solutions.

[0205] Moreover, while operations are depicted in a particular order, this should not be understood as requiring such an order unless otherwise specifically stated. In certain circumstances, multitasking and parallel processing can be advantageous. Likewise, while several specific implementation details have been discussed, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable sub-combination.

[0206] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.

Claims

1. An application programming interface management method, characterized by, The method is applied to a metadata management platform, and the metadata management platform is a platform for metadata management of at least one application programming interface, and the method comprises the following steps: acquiring to-be-processed information, the to-be-processed information being information to be processed of a target application programming interface in the application programming interface; determining target metadata of the target application programming interface based on initial metadata of the target application programming interface in the metadata management platform and differential data corresponding to the to-be-processed information; transmitting indication information of the target metadata, the indication information indicating that the target application programming interface has changed metadata.

2. The method of claim 1, wherein, The acquiring to-be-processed information comprises the following steps: acquiring changed code of the target application programming interface from a code repository; determining to-be-processed information in the changed code.

3. The method of claim 1, wherein, The acquiring to-be-processed information comprises the following steps: in response to an input operation of to-be-processed information in a perfect page of the metadata management platform, acquiring to-be-processed information.

4. The method according to any of claims 1 to 3, characterized in that, The differential data comprises interface basic information and interface parameter information of the target application programming interface.

5. The method of claim 4, wherein, The interface parameter information is determined based on path matching corresponding attributes in the corresponding metadata.

6. The method of claim 1, wherein, The construction operation of the metadata of the target application programming interface comprises the following steps: acquiring interface definition code of the target application programming interface from a code repository; constructing metadata corresponding to the interface definition code.

7. The method of claim 6, wherein, The acquiring interface definition code of the target application programming interface from the code repository comprises the following steps: in response to an input operation of identification information in a creation page of the metadata management platform, acquiring the identification information; displaying an interface selection page, the interface selection page displaying at least one application programming interface corresponding to the identification information; in response to an interface selection operation and an interface creation operation in the interface selection page, acquiring interface definition code corresponding to a target application programming interface selected by the interface selection operation from a code repository.

8. An application programming interface management apparatus characterized by comprising: The apparatus is configured in a metadata management platform, and the metadata management platform is a platform for metadata management of at least one application programming interface, and the apparatus comprises the following steps: an acquiring module, configured to acquire to-be-processed information, the to-be-processed information being information to be processed of a target application programming interface in the application programming interface; a determining module, configured to determine target metadata of the target application programming interface based on initial metadata of the target application programming interface in the metadata management platform and differential data corresponding to the to-be-processed information; a transmitting module, configured to transmit indication information of the target metadata, the indication information indicating that the target application programming interface has changed metadata.

9. An electronic device, comprising: The electronic device comprises the following steps as a metadata management platform: one or more processing apparatuses; a storage apparatus, configured to store one or more programs, when the one or more programs are executed by the one or more processing apparatuses, the one or more processing apparatuses implement the application programming interface management method in any one of claims 1-7.

10. A storage medium containing computer-executable instructions for performing the application programming interface management method of any of claims 1-7 when executed by a computer processor.