Interface document query method and device, electronic equipment and storage medium

By building a system document resource library and an interface document query method, the problem of the gateway system being unable to detect interface document changes in a timely manner was solved, the accuracy and consistency of interface document queries were achieved, and development efficiency was improved.

CN122152924APending Publication Date: 2026-06-05PING AN HEALTH INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
PING AN HEALTH INSURANCE CO LTD
Filing Date
2026-03-04
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

The gateway system cannot detect changes in the interface documentation in a timely manner, resulting in discrepancies between the retrieved interface documentation and the actual situation, which affects the accuracy of interface calls.

Method used

Build a system document resource library, obtain historical interface documents and convert their formats, monitor application development progress to obtain updated documents, update and store documents, receive query information from the target platform, identify interface types, perform document queries and format conversions, and ensure that the document format conforms to the target platform's standards.

Benefits of technology

It improved the accuracy of API documentation queries, ensuring that the API documentation is consistent with the actual situation, thereby improving development efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122152924A_ABST
    Figure CN122152924A_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an interface document query method and device, electronic equipment and storage medium, belong to the technical field of data processing, and are suitable for the fields of financial technology and medical technology. The method comprises: acquiring a system document resource library, wherein the system document resource library comprises a plurality of candidate interface documents; receiving document query information sent by a target platform; identifying the interface type of the target platform to obtain query interface type information and determine a query document format based on the query interface type information; performing document query on the plurality of candidate interface documents of the system document resource library based on the document query information to obtain a query interface document; performing format conversion on the candidate interface document based on the query document format to obtain a target interface document; and sending the target interface document to the target platform. The embodiments of the present application can improve the accuracy of interface document query.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and is applicable to the fields of financial technology and medical technology. In particular, it relates to an interface document query method and apparatus, electronic device and storage medium. Background Technology

[0002] Application Programming Interface (API) documentation is a standardized document that details the API's functionalities, calling methods, parameter definitions, and return values. During development, developers can consult online documentation platforms or local documentation files to obtain the accurate information needed to call the API. API documentation lookup technology can be applied to many scenarios. For example, in fintech, third-party companies need to obtain API documentation for development and adaptation when integrating payment information query interfaces and anti-fraud identification interfaces provided by insurance companies and banks. In healthcare, third-party platforms need to obtain API documentation for development and adaptation when integrating health consultation interfaces and medical record query interfaces provided by hospitals.

[0003] Currently, API documentation queries are primarily achieved by deploying relevant functions within the gateway system. However, in practical applications, the gateway system and the application programming interface (API) are isolated from each other. This prevents the gateway from directly accessing the API documentation or promptly detecting changes to the API documentation, potentially leading to discrepancies between the retrieved documentation and the actual situation, thus affecting the accuracy of API calls.

[0004] Therefore, improving the accuracy of API documentation queries has become a pressing technical problem. Summary of the Invention

[0005] The main objective of this application is to propose an interface document query method, apparatus, electronic device, and storage medium, which aims to solve the technical problem that the queried interface document does not match the actual situation because the gateway system cannot detect changes in the interface document in a timely manner, thereby improving the accuracy of interface document query.

[0006] To achieve the above objectives, a first aspect of this application proposes an interface document query method, the method comprising: Obtain the system document resource library, wherein the system document resource library includes multiple candidate interface documents; Receive document query information sent by the target platform; The target platform is identified by interface type to obtain query interface type information, and the query document format is determined based on the query interface type information; Based on the document query information, a document query is performed on multiple candidate interface documents in the system document resource library to obtain the query interface document; Based on the query document format, the query interface document is converted to obtain the target interface document; Send the target interface document to the target platform.

[0007] In some embodiments, the system document repository is constructed in the following manner: Retrieve historical API documentation; The historical interface documents are converted to obtain the initial interface documents; Monitor the application development progress of the target application and obtain updated interface documents based on the application development progress. The initial interface document is updated based on the updated interface document to obtain the candidate interface document; The candidate interface documents are stored in a preset database to obtain the system document resource library.

[0008] In some embodiments, updating the initial interface document based on the updated interface document to obtain the candidate interface document includes: Based on the target application, multiple initial interface documents are filtered to obtain document filtering data; If the document filtering data indicates the existence of the initial interface document of the target application, the initial interface document of the target application is confirmed as a candidate interface document, and the candidate interface document in the initial interface document is replaced with the updated interface document to obtain the candidate interface document; If the document filtering data indicates that the initial interface document for the target application does not exist, the updated interface document and the initial interface document are aggregated to obtain the candidate interface document.

[0009] In some embodiments, the method of performing a document query on multiple candidate interface documents in the system document resource library based on the document query information to obtain the query interface document includes: Generate query keywords based on the document query information; The query keywords are matched with each candidate interface document in the system document resource library to obtain matching document information. Based on the matched document information, the system document resource library is used to extract documents to obtain the query interface document.

[0010] In some embodiments, the step of matching the query keyword with each of the candidate interface documents in the system document resource library to obtain matching document information includes: Obtain the document index data of the candidate interface documents; Based on the query keywords and the similarity calculation of each document index data, the index similarity data of each document index data is obtained. The document index data with the highest index similarity value is selected to obtain the matching document information.

[0011] In some embodiments, the document index data of the candidate interface documents is constructed in the following manner: Obtain the document meta information of the candidate interface documents; The document metadata is processed in a structured manner to obtain structured metadata; The structured metadata is indexed to construct the document index data of the candidate interface document.

[0012] In some embodiments, the step of converting the query interface document based on the query document format to obtain the target interface document includes: Based on the query document format, obtain the preset query document template and field mapping rules; Based on the field mapping rules, the content of the query interface document is mapped to the query document template to obtain the target interface document.

[0013] To achieve the above objectives, a second aspect of this application provides an interface document query apparatus, the apparatus comprising: The document resource library acquisition module is used to acquire the system document resource library, wherein the system document resource library includes multiple candidate interface documents; The query information acquisition module is used to receive document query information sent by the target platform; The document format confirmation module is used to identify the interface type of the target platform, obtain query interface type information, and determine the query document format based on the query interface type information. The document query module is used to perform document queries on multiple candidate interface documents in the system document resource library based on the document query information, and obtain the query interface document; The format conversion module is used to convert the query interface document according to the query document format to obtain the target interface document; The document sending module is used to send the target interface document to the target platform.

[0014] To achieve the above objectives, a third aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect.

[0015] To achieve the above objectives, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.

[0016] The interface document query method, apparatus, electronic device, and storage medium proposed in this application provide a rich data foundation for subsequent queries by acquiring a system document resource library containing multiple candidate interface documents. Next, it receives document query information sent by the target platform to clarify the query requirements; it identifies the interface type of the target platform to obtain query interface type information, and determines the query document format based on the query interface type information, ensuring accurate adaptation to the target platform requirements. Furthermore, it queries multiple candidate interface documents in the system document resource library based on the document query information to obtain the query interface document, quickly locating and finding the required document. Finally, it converts the query interface document format based on the query document format to obtain the target interface document, ensuring that the document format conforms to the target platform standard, and sends the target interface document to the target platform, improving the accuracy of interface document queries. Attached Figure Description

[0017] Figure 1 This is a flowchart of the interface document query method provided in the embodiments of this application; Figure 2 This is a flowchart illustrating the construction of a system document resource library provided in an embodiment of this application; Figure 3 yes Figure 1 The flowchart of step S104 in the process; Figure 4 yes Figure 3 The flowchart of step S302 in the text; Figure 5 yes Figure 1 The flowchart of step S105 in the process; Figure 6 This is a schematic diagram of the interface document query device provided in the embodiments of this application; Figure 7 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0019] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0020] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0021] First, let's analyze some of the terms used in this application: Natural Language Processing (NLP): NLP uses computers to process, understand, and utilize human language (such as Chinese and English). NLP is a branch of artificial intelligence and an interdisciplinary field of computer science and linguistics, often referred to as computational linguistics. NLP includes syntactic analysis, semantic analysis, and discourse understanding. It is commonly used in machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, intent recognition, information extraction and filtering, text classification and clustering, sentiment analysis, and opinion mining. It involves data mining, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computation.

[0022] An Application Programming Interface (API) is a set of predefined rules, protocols, and tools that enable communication and interaction between different software applications or systems. An API acts as a bridge, connecting a program that provides functionality or services to an application that requests that functionality. Through APIs, developers can easily invoke functions from other software, platforms, or services, such as retrieving data and performing operations, without needing to understand the complex underlying logic. For example, using a map API, developers can easily embed map display and route planning functions into their applications, greatly improving development efficiency and promoting the interconnectivity and collaborative development of the software ecosystem.

[0023] Application Programming Interface (API) documentation is a set of standardized documents that detail the API's functionalities, calling methods, parameter definitions, and return values. During development, developers can consult these documents through online platforms or local files to obtain the accurate information needed to call the API. API documentation lookup technology can be applied to many scenarios. For example, in fintech, third-party companies need to obtain API documentation for development and adaptation when integrating payment information query interfaces or anti-fraud identification interfaces provided by insurance companies and banks. In healthcare, third-party platforms need to obtain API documentation for development and adaptation when integrating health consultation interfaces or medical record query interfaces provided by hospitals.

[0024] Currently, API documentation queries are primarily achieved by deploying relevant functions within the gateway system. However, in practical applications, the gateway system and the application programming interface (API) are isolated from each other. This prevents the gateway from directly accessing the API documentation or promptly detecting changes to the API documentation, potentially leading to discrepancies between the retrieved documentation and the actual situation, thus affecting the accuracy of API calls.

[0025] Based on this, embodiments of this application provide an interface document query method and apparatus, electronic device and storage medium, which aim to solve the technical problem that the queried interface document does not match the actual situation because the gateway system cannot detect changes in the interface document in a timely manner, thereby improving the accuracy of interface document query.

[0026] The interface document query method, apparatus, electronic device, and storage medium provided in this application are specifically described through the following embodiments. First, the interface document query method in this application is described.

[0027] The interface documentation query method provided in this application relates to the field of data processing technology. This method can be applied to a terminal, a server, or software running on either a terminal or a server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, etc.; the server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application implementing the interface documentation query method, but is not limited to the above forms.

[0028] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0029] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.

[0030] Figure 1 This is an optional flowchart of the interface document query method provided in the embodiments of this application. Figure 1 The method may include, but is not limited to, steps S101 to S106.

[0031] Step S101: Obtain the system document resource library, wherein the system document resource library includes multiple candidate interface documents; Step S102: Receive document query information sent by the target platform; Step S103: Identify the interface type of the target platform to obtain query interface type information, and determine the query document format based on the query interface type information; Step S104: Based on the document query information, perform document queries on multiple candidate interface documents in the system document resource library to obtain the query interface document; Step S105: Convert the query interface document according to the query document format to obtain the target interface document; Step S106: Send the target interface document to the target platform.

[0032] Steps S101 to S106, as illustrated in this embodiment, obtain a system document resource library containing multiple candidate interface documents, providing a rich data foundation for subsequent queries. Next, document query information sent by the target platform is received to clarify the query requirements; the interface type of the target platform is identified to obtain query interface type information, and the query document format is determined based on this information, ensuring accurate adaptation to the target platform's requirements. Furthermore, based on the document query information, multiple candidate interface documents in the system document resource library are queried to obtain the query interface document, quickly locating and finding the required document. Finally, the query interface document is format-converted based on its format to obtain the target interface document, ensuring the document format conforms to the target platform's standards, and the target interface document is sent to the target platform, improving the accuracy of interface document queries.

[0033] In step S101 of some embodiments, the system document resource library is a collection of interface documents related to various API interfaces that are centrally stored. The system document resource library includes multiple candidate interface documents, which contain detailed information about different API interfaces, such as the interface name, function description, input and output parameters, calling method, version number, etc.

[0034] Specifically, please refer to Figure 2 In some embodiments, the process of constructing the system document resource library may include, but is not limited to, steps S201 to S205: Step S201: Obtain historical API documentation; Step S202: Convert the format of the historical interface document to obtain the initial interface document; Step S203: Monitor the application development progress of the target application and obtain updated interface documents based on the application development progress; Step S204: Update the initial interface document based on the updated interface document to obtain candidate interface documents; Step S205: Store the candidate interface documents in a preset database to obtain the system document resource library.

[0035] Steps S201 to S205, as illustrated in this embodiment, involve acquiring historical interface documents, converting their format to obtain initial interface documents, storing them in a unified format to form a standardized system. Next, monitoring the application development progress of the target application allows for timely understanding of interface changes. Based on this progress, updated interface documents are obtained to promptly detect document changes. Furthermore, the initial interface documents are updated using the updated documents to generate candidate interface documents, ensuring timeliness and accuracy. Finally, these candidate documents are stored in a pre-defined database to form a system document resource library, facilitating centralized management and retrieval. This overall process improves the efficiency and quality of interface document management.

[0036] In step S201 of some embodiments, the historical interface document refers to a document that records relevant information about the API interface in the past, including key content such as the name of the interface, function description, input and output parameters, calling method, and version number, and belongs to the "existing" document.

[0037] It should be noted that historical interface documents are collected from various sources, such as file storage systems, version control tools, or specific document management platforms. The formats of historical interface documents vary (such as Word, Excel, JSON, XML, etc.) and are not uniform.

[0038] Therefore, it is necessary to convert the format of historical interface documents, transforming them from their original format to a unified and standardized format to obtain the initial interface documents. A unified format facilitates subsequent processing, storage, and retrieval, improves the readability and maintainability of the documents, and also makes it easier for different systems and tools to parse and use the interface documents.

[0039] Specifically, a pre-written script with format conversion function or a pre-trained large language model can be used to convert the format of historical interface documents to obtain the initial interface documents.

[0040] In some embodiments, historical interface documentation may be manually collected and uploaded by developers.

[0041] In step S203 of some embodiments, an automated monitoring tool is used to monitor the application development progress of the target application, that is, to monitor the CI / CD process and understand the development stage, delivery status, etc. of the target application.

[0042] When the functionality of an interface is modified (e.g., changed, updated, or deleted) (the application development progress (CI / CD process) changes), developers promptly upload the updated interface documentation to the sharing platform. The platform automatically retrieves the updated interface documentation, ensuring that the documentation is synchronized with the actual development situation. This avoids misunderstandings and errors during development due to outdated documentation, thereby improving development efficiency and quality.

[0043] It should be noted that in various business scenarios, the target application exists in the form of an API interface. As a bridge for interaction between different systems or services, the target application plays a crucial role.

[0044] For example, in fintech scenarios, target applications can provide payment information query interfaces and anti-fraud identification interfaces for companies such as insurance companies and banks; in medical technology scenarios, target applications can provide health consultation interfaces and medical record query interfaces for hospitals, and so on.

[0045] In step S204 of some embodiments, after obtaining the updated interface document, multiple initial interface documents are filtered based on the target application, and the existing document corresponding to the target application is filtered out from all the initial interface documents, which is the document filtering data.

[0046] Next, if the document filtering data indicates the existence of an initial interface document for the target application (i.e., the document filtering data is not empty, meaning a corresponding interface document has been found), the initial interface document of the target application is confirmed as a candidate interface document. This candidate interface document is then replaced with an updated interface document to obtain a candidate interface document, thus replacing the original interface document with the latest version. Specifically, the replacement of the interface document can be based on the version number or the version update time; that is, the interface document corresponding to the latest version number can be used to replace the original interface document, or the interface document with the most recent version update event can be used to replace the original interface document.

[0047] If the document filtering data indicates that there is no initial interface document for the target application (i.e., the document filtering data is empty, meaning no corresponding interface document was found), the updated interface document and the initial interface document will be aggregated. This is equivalent to adding the updated interface document to the set of initial interface documents to obtain candidate interface documents.

[0048] It should be noted that the system document resource library is an internal database. The default database is a database system that is pre-built in the system to store interface documents, and it has data storage, retrieval and management functions. At the same time, the internal database can ensure data security.

[0049] In step S205 of some embodiments, all candidate interface documents are stored in a preset database to obtain a system document resource library, thereby realizing centralized management and long-term storage of interface documents, improving document sharing and security, and facilitating quick retrieval and acquisition of required interface information.

[0050] In some embodiments, during actual use, the application development progress of the target application is monitored in real time. Updated interface documents are obtained based on the application development progress, and candidate interface documents in the system document resource library are automatically updated based on the updated interface documents. This enables timely detection of changes in interface documents, updates the interface documents in the system document resource library, ensures the timeliness and accuracy of interface documents, avoids discrepancies between the queried interface documents and the actual situation, and helps improve the accuracy of interface document queries.

[0051] In step S102 of some embodiments, the target platform is a third-party enterprise or an external system or application (such as a software system, application, or server) that needs to obtain interface documentation. The documentation query information is key information sent by the developers of the target platform to describe the required interface documentation, which may include interface name, functional keywords, version number, etc.

[0052] For example, a mobile application (target platform) needs to call a payment interface provided by an insurance company. The mobile application sends document query information to the enterprise system via an HTTP request, and the document query information contains the keyword "payment interface".

[0053] In step S103 of some embodiments, different target platforms have specific requirements for the interface type and corresponding query document format due to their own architecture, functional requirements and other factors.

[0054] Therefore, it is necessary to determine the specific type of interface used by the target platform. There are many different types of interface types, such as RESTful interfaces, SOAP interfaces, and GraphQL interfaces. Each type of interface has differences in communication protocols, data formats, and calling methods.

[0055] Furthermore, depending on the different interface types, a matching document format (such as JSON, XML, YAML, etc.) should be selected. Different interface types typically have commonly used document formats; for example, RESTful interfaces often use JSON to describe the request and response data, while SOAP interfaces often use XML.

[0056] Understandably, accurately identifying the target platform's interface type and determining the appropriate query document format ensures that the generated interface documentation is perfectly compatible with the target platform. This allows the target platform to smoothly parse and use the information in the document, avoiding parsing errors or data loss due to format mismatches. Furthermore, clear interface category information and document format guide subsequent document queries and format conversion processes, reducing unnecessary operations and errors, thereby improving the overall efficiency of document querying and transmission.

[0057] Please see Figure 3 In some embodiments, step S104 may include, but is not limited to, steps S301 to S303: Step S301: Generate query keywords based on document query information; Step S302: Match the query keywords with each candidate interface document in the system document resource library to obtain the matching document information; Step S303: Extract documents from the system document resource library based on the matching document information to obtain the query interface document.

[0058] Steps S301 to S303, as illustrated in this embodiment, generate query keywords based on document query information to accurately extract key content and provide a valid basis for subsequent matching. Next, the query keywords are matched against each candidate interface document in the system document resource library to obtain matching document information, enabling rapid location of relevant documents and narrowing the scope. Finally, based on the matching document information, documents are extracted from the system document resource library to obtain the query interface document, improving the accuracy and efficiency of document querying and enabling more efficient acquisition of the required interface document.

[0059] In step S301 of some embodiments, the document query information is analyzed and processed by natural language processing technology, keyword extraction algorithm and other methods to extract the most representative and distinctive words or phrases as query keywords. The query keywords are used to quickly locate in the document resource library and improve the targeting of the query.

[0060] For example, suppose you want to query an interface document for image processing, and the input query is "I need an interface document that can scale, rotate, and crop images." By generating query keywords, you might extract keywords such as "image processing," "image," "scale," "rotate," and "crop."

[0061] Please see Figure 4 In some embodiments, step S302 may include, but is not limited to, steps S401 to S403: Step S401: Obtain the document index data of the candidate interface documents; Step S402: Calculate the similarity between the query keywords and the index data of each document to obtain the index similarity data of each document index data; Step S403: Filter out the document index data with the highest index similarity data to obtain the matching document information.

[0062] Steps S401 to S403, as illustrated in this embodiment, involve acquiring document index data of candidate interface documents and calculating the similarity between the query keywords and each document index data to obtain index similarity data for each document index data. This allows for a rapid measurement of the matching degree between the query keywords and each candidate interface document. Next, the document index data with the highest index similarity data value is selected to obtain matching document information. This enables precise location of the document that best meets the query requirements, improving retrieval efficiency and accuracy.

[0063] In step S401 of some embodiments, the document index data of the candidate interface documents is automatically generated when the system document resource library is built. Specifically, the document index data of the candidate interface documents can be constructed in the following way: Retrieve the document metadata of the candidate API documents; The document metadata is processed in a structured manner to obtain structured metadata; The structured metadata is indexed to obtain the document index data of the candidate interface documents.

[0064] It should be noted that document metadata is basic information about a document, provided by the developers of the application programming interface, including but not limited to document name, author, creation time, keywords, and abstract. Document metadata summarizes the key characteristics of a document.

[0065] Next, all document metadata is organized according to a preset format to form a complete structured metadata.

[0066] After obtaining the structured metadata, the structured metadata is combined with the storage location of the candidate interface documents in the system document resource library to generate index data. This transforms complex document information into a form that is easy for computers to process and retrieve, creating a fast search path for documents and helping to improve the efficiency of document retrieval, enabling quick location of relevant documents.

[0067] For example, suppose we have a batch of documents describing different application programming interfaces (APIs). Obtaining the document metadata might include extracting the API name, functional description, input and output parameters for each document. This information is then structured. Finally, an index is built, for example, sorted alphabetically by the API name, so that relevant API documents can be quickly found during queries.

[0068] In step S402 of some embodiments, a specific algorithm (such as cosine similarity algorithm, Jaccard similarity algorithm, etc.) is used to compare the similarity between the query keywords and each document index data. A numerical value is calculated to represent the matching degree between them, and the index similarity data of each document index data is obtained. The higher the value, the better the match, which provides a basis for subsequent filtering of the most suitable documents and makes the search results more accurate.

[0069] In step S403 of some embodiments, the document index data with the largest value is found among all the calculated index similarity data, and this document index data is confirmed as the matching document information. The matching document information includes the storage location of the corresponding candidate interface document in the system document resource library.

[0070] After obtaining the matching document information, it can quickly and accurately find the document that best meets the needs, thus improving the efficiency of document search.

[0071] In step S303 of some embodiments, based on the storage location recorded in the matching document information, the corresponding candidate interface document is extracted from the system document resource library to obtain the query interface document.

[0072] It is understandable that different target platforms use different interface types and have different applicable query document formats. Therefore, it is necessary to convert the query interface documents obtained from the query to obtain interface documents that are adapted to the target platform.

[0073] Please see Figure 5 In some embodiments, step S105 may include, but is not limited to, steps S501 to S502: Step S501: Obtain the preset query document template and field mapping rules based on the query document format; Step S502: Based on the field mapping rules, map the content of the query interface document to the query document template to obtain the target interface document.

[0074] Steps S501 to S502 shown in this embodiment of the application obtain a preset query document template and field mapping rules based on the query document format, and map the content of the query interface document to the query document template based on the field mapping rules. This can quickly and accurately integrate information to obtain a target interface document with a unified and standardized structure, thereby improving document processing efficiency and quality.

[0075] It's important to note that the query document template is a pre-designed document framework based on specific needs and standards. It has a fixed structure and format, containing various necessary field placeholders to standardize the final presentation of the query document and ensure that information from different sources is displayed in a consistent manner. Field mapping rules are a set of rules that define the correspondence between fields in different data sources (such as query interface documentation) and fields in the query document template. These rules clarify how to accurately fill specific fields from the source data into the corresponding positions in the target template.

[0076] In step S501 of some embodiments, a matching query document template and field mapping rules are searched from a pre-stored rule base or configuration file according to the query document format, which is used to convert the query interface document format to adapt to the document format requirements of the target platform.

[0077] For example, in a fintech scenario, suppose there is a first target platform and a second target platform. The first target platform uses XML for its query documents, while the second target platform uses JSON. Both platforms want to obtain the API documentation for a payment information query interface provided by an insurance company. However, since the API documentation is in XML format, when sending the payment information query API documentation to the second target platform, it's necessary to obtain a query document template and field mapping rules for converting the XML to JSON format. This allows for the format conversion of the payment information query API documentation to JSON format, which is then provided to the second target platform.

[0078] In step S502 of some embodiments, the values ​​of each field in the query interface document are extracted according to the correspondence defined in the field mapping rules and filled into the corresponding positions in the query document template. This can ensure the accuracy and integrity of the document data and avoid field misalignment or data loss.

[0079] In step S106 of some embodiments, after obtaining the target interface document, the target interface document is sent to the address specified by the target platform through a network communication protocol (such as HTTP, FTP, etc.), thus completing the delivery of the interface document and enabling the target platform to obtain the required interface document for subsequent interface calls and integration work.

[0080] In some embodiments, the system document resource library provided in this application is an internal database used for unified storage and version management of internal interface documents. It is provided to internal developers, testers, and maintenance personnel of application programming interfaces, meaning steps S201 to S205 occur internally. The document query process, however, is set at the gateway layer, which is the external API gateway responsible for protocol conversion, routing, and security control. It is provided to external channels, partners, and API interface providers. Therefore, the implementation of steps S101 to S106 occurs at the gateway layer.

[0081] Please see Figure 6 This application also provides an interface document query device that can implement the above-described interface document query method. The device includes: The document resource library acquisition module 601 is used to acquire the system document resource library, which includes multiple candidate interface documents; The query information acquisition module 602 is used to receive document query information sent by the target platform; The document format confirmation module 603 is used to identify the interface type of the target platform, obtain query interface type information, and determine the query document format based on the query interface type information. The document query module 604 is used to perform document queries on multiple candidate interface documents in the system document resource library based on document query information, and obtain the query interface document; The format conversion module 605 is used to convert the query interface document based on the query document format to obtain the target interface document; The document sending module 606 is used to send the target interface document to the target platform.

[0082] The specific implementation of this interface document query device is basically the same as the specific implementation of the interface document query method described above, and will not be repeated here.

[0083] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the aforementioned interface document query method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0084] Please see Figure 7 , Figure 7 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 701 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 702 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 702 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 702 and is called and executed by the processor 701 using the interface document query method of the embodiments of this application. The input / output interface 703 is used to implement information input and output; The communication interface 704 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 705 transmits information between various components of the device (e.g., processor 701, memory 702, input / output interface 703, and communication interface 704); The processor 701, memory 702, input / output interface 703, and communication interface 704 are connected to each other within the device via bus 705.

[0085] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described interface document query method.

[0086] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0087] The interface document query method, apparatus, electronic device, and storage medium provided in this application embodiment acquire a system document resource library including multiple candidate interface documents, providing a rich data foundation for subsequent queries. Next, it receives document query information sent by the target platform to clarify the query requirements; it identifies the interface type of the target platform to obtain query interface type information, and determines the query document format based on the query interface type information, ensuring accurate adaptation to the target platform requirements. Furthermore, it queries multiple candidate interface documents in the system document resource library based on the document query information to obtain the query interface document, quickly locating and finding the required document. Finally, it converts the query interface document format based on the query document format to obtain the target interface document, ensuring the document format conforms to the target platform standard, and sends the target interface document to the target platform, improving the accuracy of interface document queries.

[0088] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0089] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0090] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0091] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0092] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0093] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0094] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0095] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0096] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0097] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0098] The software tools or components not belonging to our company that appear in the embodiments of this application are for illustrative purposes only and do not represent actual use.

[0099] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for querying interface documentation, characterized in that, The method includes: Obtain the system document resource library, wherein the system document resource library includes multiple candidate interface documents; Receive document query information sent by the target platform; The target platform is identified by interface type to obtain query interface type information, and the query document format is determined based on the query interface type information; Based on the document query information, a document query is performed on multiple candidate interface documents in the system document resource library to obtain the query interface document; Based on the query document format, the query interface document is converted to obtain the target interface document; Send the target interface document to the target platform.

2. The method according to claim 1, characterized in that, The system document resource library is constructed in the following way: Retrieve historical API documentation; The historical interface documents are converted to obtain the initial interface documents; Monitor the application development progress of the target application and obtain updated interface documents based on the application development progress. The initial interface document is updated based on the updated interface document to obtain the candidate interface document; The candidate interface documents are stored in a preset database to obtain the system document resource library.

3. The method according to claim 2, characterized in that, The step of updating the initial interface document based on the updated interface document to obtain the candidate interface document includes: Based on the target application, multiple initial interface documents are filtered to obtain document filtering data; If the document filtering data indicates the existence of the initial interface document of the target application, the initial interface document of the target application is confirmed as a candidate interface document, and the candidate interface document in the initial interface document is replaced with the updated interface document to obtain the candidate interface document; If the document filtering data indicates that the initial interface document for the target application does not exist, the updated interface document and the initial interface document are aggregated to obtain the candidate interface document.

4. The method according to claim 1, characterized in that, The step of querying multiple candidate interface documents in the system document resource library based on the document query information to obtain the query interface documents includes: Generate query keywords based on the document query information; The query keywords are matched with each candidate interface document in the system document resource library to obtain matching document information. Based on the matched document information, the system document resource library is used to extract documents to obtain the query interface document.

5. The method according to claim 4, characterized in that, The step of matching the query keywords with each candidate interface document in the system document resource library to obtain matching document information includes: Obtain the document index data of the candidate interface documents; Based on the query keywords and the similarity calculation of each document index data, the index similarity data of each document index data is obtained. The document index data with the highest index similarity value is selected to obtain the matching document information.

6. The method according to claim 5, characterized in that, The document index data of the candidate interface documents is constructed in the following way: Obtain the document meta information of the candidate interface documents; The document metadata is processed in a structured manner to obtain structured metadata; The structured metadata is indexed to construct the document index data of the candidate interface document.

7. The method according to any one of claims 1 to 6, characterized in that, The step of converting the query interface document based on the query document format to obtain the target interface document includes: Based on the query document format, obtain the preset query document template and field mapping rules; Based on the field mapping rules, the content of the query interface document is mapped to the query document template to obtain the target interface document.

8. An interface document query device, characterized in that, The device includes: The document resource library acquisition module is used to acquire the system document resource library, wherein the system document resource library includes multiple candidate interface documents; The query information acquisition module is used to receive document query information sent by the target platform; The document format confirmation module is used to identify the interface type of the target platform, obtain query interface type information, and determine the query document format based on the query interface type information. The document query module is used to perform document queries on multiple candidate interface documents in the system document resource library based on the document query information, and obtain the query interface document; The format conversion module is used to convert the query interface document according to the query document format to obtain the target interface document; The document sending module is used to send the target interface document to the target platform.

9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.