Interface document uploading method and device, and storage medium

By customizing and modifying the interface documentation and generating UML sequence diagrams on the InteliJ DEA compilation platform, the problem of difficulty in updating interface documentation on the Yapi platform was solved, enabling efficient uploading and updating of local interface documentation and simplifying the operation process.

CN115665136BActive Publication Date: 2025-12-23HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD +2
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211345290.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2025-12-23
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

In Java backend development, it is difficult to update the API documentation on the locally deployed Yapi API management platform, and it is impossible to obtain the address link directory when the target API documentation is not found.

Method used

Customize and modify interface documents on the InteliJ DEA compilation platform, generate UML sequence diagrams and convert their format, and upload them to the interface management platform by specifying or automatically obtaining the address link, simplifying the operation process.

Benefits of technology

It enables local updating and uploading of API documentation, reducing configuration steps, improving the efficiency and clarity of API documentation generation, and simplifying the operation for developers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115665136B_ABST
    Figure CN115665136B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of Internet backend development, relates to the technical field of smart homes, and discloses an interface document uploading method and device and a storage medium, the method comprises the following steps: based on user modification of an interface document on a compiling platform, a target interface document is obtained; the target interface document is searched in an interface management platform, and in response to the fact that the target interface document is not searched, the interface document is uploaded to the interface management platform according to a specified address link of a user; and in response to the fact that a specified address link sent by a user is received, the target interface document is uploaded to the interface management platform based on the specified address link, so that convenience can be provided for developers.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet backend development, in particular to an interface document uploading method and device and storage medium. BACKGROUND

[0002] At present, in JAVA backend development work, as the intermediate medium connecting the front and back ends, the writing of interface documents is essential. Most enterprises will choose to record the interface documents on the Yapi interface management platform deployed locally, thus causing difficulties in interface modification and update. Currently, the user can only upload the interface document to the interface management platform first, and then modify the interface through the interface management platform after the uploading is completed. Moreover, when the target interface document is not searched in the interface management platform, the address link directory of the interface document cannot be obtained locally.

[0003] Therefore, the present application is proposed. SUMMARY

[0004] The present application aims to overcome the shortcomings of the prior art and provide an interface document uploading method, so as to update the interface locally and simplify the operation steps of the developer.

[0005] To solve the above technical problems, the basic idea of the technical solution of the present application is as follows: according to the first aspect of the embodiment of the present application, an interface document uploading method is provided, which includes: modifying the interface document based on the user's modification on the compiling platform to obtain a target interface document; searching the target interface document in the interface management platform, and in response to the fact that the target interface document is not searched, uploading the interface document to the interface management platform according to the address link specified by the user; and in response to the fact that the specified address link sent by the user is received, uploading the target interface document to the interface management platform based on the specified address link.

[0006] Optionally, the uploading of the target interface document to the interface management platform includes: in response to the fact that the specified address link sent by the user is not received, obtaining the available address link directory of the interface in the interface management platform, and uploading the target interface document to the interface management platform based on the target address link selected by the user.

[0007] Optionally, the searching of the target interface document in the interface management platform further includes: in response to the fact that the target interface document is searched, updating the interface corresponding to the target interface document.

[0008] Optionally, the custom modification of the interface document based on the preview interface of the InteliJ DEA compiling platform by the user comprises: calling a plug-in SequenceDiagram in the InteliJ DEA compiling platform to generate a UML sequence diagram; inserting the UML sequence diagram into the interface document to obtain a first interface document; and converting the first interface document into a target format according to the requirements of the interface management platform for the interface document format to obtain the target interface document.

[0009] Optionally, the method for generating the preview interface of the InteliJ DEA compiling platform comprises: in the case that the target code is completed, displaying a first code auxiliary function interface in response to the plug-in instruction issued by the user, wherein the first code auxiliary function interface is used for selecting a target plug-in; displaying a second code auxiliary function interface, wherein the second code auxiliary function interface is used for selecting a target interface of the target plug-in; and integrating the related information of the target interface to automatically generate an interface document preview interface.

[0010] Optionally, the related information of the target interface comprises: parameter information of the target interface, wherein the parameter information comprises: input parameter information and return parameter information; and data information of a method name or a method class name of a target code file is obtained based on JAVADoc annotation and JavaParser analysis in the target code file.

[0011] Optionally, the uploading of the interface document to the interface management platform comprises: in response to receiving a first uploading request sent by the user end, configuring an account name and a password, and sending a verification request to the interface management platform; obtaining a login verification Token returned by the interface management platform; in response to receiving a non-first uploading request of the interface document sent by the user end to the interface management platform, automatically logging in the verification Token according to the account name and the password configured in advance; uploading the interface document to the interface management platform, and returning address information of the interface document to the user end.

[0012] According to a second aspect of the embodiment of the present application, an interface document uploading device is provided, comprising: a modification module configured to modify an interface document based on a user in a compiling platform to obtain a target interface document; a first uploading module configured to search the target interface document in an interface management platform, and in response to not searching the target interface document, upload the interface document to the interface management platform according to a specified address link of the user; and a second uploading module configured to upload the target interface document to the interface management platform based on the specified address link in response to receiving the specified address link sent by the user.

[0013] Optionally, the second uploading module is configured to upload the target interface document to the interface management platform, comprising: in response to not receiving the specified address link sent by the user, obtaining an address link directory available in the interface management platform, and uploading the target interface document to the interface management platform based on the target address link selected by the user.

[0014] Optionally, the first uploading module is configured to search for the target interface document in the interface management platform, and further comprising: in response to searching for the target interface document, updating the interface corresponding to the target interface document.

[0015] Optionally, the modification module is configured to obtain the target interface document based on the user's custom modification of the interface document in the preview interface of the InteliJ DEA compilation platform, comprising: calling a plug-in SequenceDiagram in the InteliJ DEA compilation platform to generate a UML sequence diagram; inserting the UML sequence diagram into the interface document to obtain a first interface document; and converting the format of the first interface document into a target format according to the requirements of the interface management platform for the interface document format to obtain the target interface document.

[0016] Optionally, the modification module is configured to generate a preview interface of the InteliJ DEA compilation platform, comprising: in the case that the target code is completed, in response to listening to the plug-in instruction sent by the user, displaying a first code auxiliary function interface, wherein the first code auxiliary function interface is configured to select a target plug-in; displaying a second code auxiliary function interface, wherein the second code auxiliary function interface is configured to select a target interface of the target plug-in; and integrating the related information of the target interface to automatically generate an interface document preview interface.

[0017] Optionally, the related information of the target interface in the modification module comprises: parameter information of the target interface, wherein the parameter information comprises: input parameter and return parameter information; and based on the JAVADoc annotation in the target code file and the parsing of JavaParser, data information of the method name or method class name of the target code file is obtained.

[0018] Optionally, the third uploading module is configured to upload the interface document to the interface management platform, comprising: in response to receiving the first uploading request sent by the user end, configuring an account name and a password, and sending a verification request to the interface management platform; obtaining the login verification Token returned by the interface management platform; in response to receiving the uploading request sent by the user end for uploading the interface document to the interface management platform for the first time, automatically logging in the verification Token according to the account name and the password configured in advance; uploading the interface document to the interface management platform, and returning the address information of the interface document to the user end.

[0019] According to a third aspect of the embodiments of the present application, an electronic device is provided, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the uploading method of the interface document according to any one of the first aspect.

[0020] According to a fourth aspect of the embodiments of the present application, a computer readable storage medium is provided, which stores computer program instructions, and the program instructions are executed by a processor to implement the uploading method of the interface document according to the first aspect or any one of the implementation manners of the first aspect.

[0021] Compared with the prior art, the present application has the following beneficial effects: based on the user's custom modification of the interface document on the preview interface of the InteliJ DEA compilation platform, a target interface document is obtained; the target interface document is searched in the interface management platform, and in response to the fact that the target interface document is not searched, the interface document is uploaded to the interface management platform according to the address link specified by the user; in response to the fact that the specified address link sent by the user is received, the target interface document is uploaded to the interface management platform based on the specified address link; and in response to the fact that the specified address link sent by the user is not received, the address link directory of the interface in the interface management platform is obtained, and the target interface document is uploaded to the interface management platform based on the target address link selected by the user. The method can realize the local acquisition of the address link directory of the interface in the interface management platform, the local uploading of the interface document, and the updating of the interface through local uploading when the interface needs to be updated. The method can generate clear and effective interface documents without configuration in the code, thereby simplifying the uploading method of the interface document and providing convenience for the developers.

[0022] The specific embodiments of the present application will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0023] The accompanying drawings, which are incorporated into and form part of the specification, illustrate embodiments consistent with the present application and, together with the specification, serve to explain the principles of the application.

[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.

[0025] Figure 1 is a schematic diagram of a hardware environment of an interaction method of a smart device according to an embodiment of the present application;

[0026] Figure 2 is a flowchart of a method for uploading an interface document according to an embodiment of the present application;

[0027] Figure 3 is an interaction schematic diagram of an automatic generation and uploading process for an interface document according to an embodiment of the present application;

[0028] Figure 4 is a block diagram of an uploading device for an interface document according to an embodiment of the present application;

[0029] Figure 5 is a block diagram of an electronic device according to an embodiment of the present application.

[0030] It should be noted that the accompanying drawings and the textual description are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0031] In order to make the technical personnel in the art better understand the present application scheme, the technical solutions in the embodiments of the present application will be described clearly and completely below by combining the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.

[0032] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.

[0033] According to one aspect of the present invention, an interaction method for smart home devices is provided. This interaction method for smart home devices is widely applicable to whole-house intelligent digital control application scenarios such as smart homes, smart home ecosystems, and intelligence house ecosystems. Optionally, in this embodiment, the above-mentioned interaction method for smart home devices can be applied to, for example... Figure 1 The hardware environment shown consists of terminal device 102 and server 104. For example... Figure 1 As shown, server 104 is connected to terminal device 102 via a network and can be used to provide services (such as application services) to the terminal or clients installed on the terminal. An interface management platform can be set up on the server or independently of the server to provide data storage services for server 104. Cloud computing services can be configured on the server or independently of the server to provide data computing services for server 104.

[0034] The aforementioned network may include, but is not limited to, at least one of the following: wired network, wireless network. The aforementioned wired network may include, but is not limited to, at least one of the following: wide area network, metropolitan area network, local area network. The aforementioned wireless network may include, but is not limited to, at least one of the following: Wi-Fi (Wireless Fidelity), Bluetooth. Terminal device 102 includes devices that can use the Intel iJ DEA compiler.

[0035] Example 1

[0036] As an important tool connecting front end and back end, interface document writing is essential. Interface document is also called (specification document). Interface document has specification format and content requirements. Back end receives legal data transmitted by front end according to interface protocol and returns data meeting specification. Front end transmits data meeting specification according to interface protocol and processes data returned by back end according to display needs. At present, many enterprises choose to record interface document on Yapi platform deployed locally in JAVA back end development work. However, with iteration of interface and change of business, management and maintenance of interface document become more and more difficult. In addition, since a complex interface in interface document often has many parameters and return values, the development process of developers is very boring and there are many omissions. At present, there are some plug-ins in IntelliJ DEA that can generate local interface document or Yapi format document, such as YapiUpload and its derivative EasyYapi. However, such plug-ins are folder-level operations, and the update of interface is often the update of a single interface. In some projects, it is troublesome to select the interface to be updated under a folder because there are multiple interfaces under a folder. In addition, such plug-ins have poor plasticity, limited generated content, and when other necessary content of the interface is needed, reconfiguration needs to be performed in JAVA code, which causes excessive configuration times. Excessive configuration times will cause business code to be invaded by useless code, resulting in reduced code readability. After configuration is completed, the current interface document export method is to directly parse the API document corresponding to the code based on javadoc, KDoc and ScalaDoc, extract the required content from the interface document, and export. The interface document is deployed on Yapi platform. Therefore, when exported to Yapi platform, it needs to be uploaded through the open API interface provided by Yapi official. When the login verification expires, a login verification code needs to be obtained again, which causes configuration delay.

[0037] Therefore, the present application provides a plug-in that can generate clear and effective interface documents and interface timing diagrams without configuration in the code, can operate on a single newly added interface, can preview and modify the interface document and timing diagram, and can upload the interface to Yapi platform by only configuring the username and password.

[0038] The following embodiments of the present application will be described with reference to the accompanying drawings to illustrate a method for uploading an interface document provided by the present application.

[0039] Figure 2 is a flowchart of a method for uploading an interface document according to an embodiment of the present application. As shown in Figure 2 , it includes steps S201-S204.

[0040] In step S201, the target interface document is obtained based on modification of the interface document by the user on the compiling platform.

[0041] In the embodiment of the present application, the method for generating the preview interface of the InteliJ DEA compiling platform comprises: in the case that the target code is written, in response to the plug-in instruction issued by the user being monitored, displaying a first code auxiliary function interface, wherein the first code auxiliary function interface is used to select a target plug-in; displaying a second code auxiliary function interface, wherein the second code auxiliary function interface is used to select a target interface of the target plug-in; integrating the related information of the target interface, and automatically generating an interface document preview interface.

[0042] In the embodiment, in response to the plug-in instruction issued by the user being monitored, the method comprises: when the user finishes writing the code file, right-clicking the method name or the method class name of the code file by using a mouse; in response to the first code auxiliary function interface being triggered by the right-click of the mouse, selecting a target plug-in; in response to the second code auxiliary function interface being triggered by the right-click of the mouse on the target plug-in, selecting a target interface corresponding to the target plug-in. In the embodiment, the method name or the method class name confirms the content of the target code file.

[0043] The related information of the target interface comprises: parameter information of the target interface, wherein the parameter information comprises: input parameter and return parameter information; based on the JAVADoc annotation in the target code file and the analysis of JavaParser, data information of the method name or the method class name of the target code file is obtained.

[0044] In the code file submitted by the developer, the target code file is determined, wherein the target code file can be one or multiple, therefore, in the actual development work, the developer will pay attention to the path, action, parameter and return value of the interface and other information, wherein the interface information is obtained by annotation and analysis of JavaDoc or JavaParser and the like.

[0045] The method for obtaining the related information of the interface class by JavaDoc or JavaParser includes: determining the interface class by traversing the target JAVA code file; traversing the method of each interface class, and determining the interface method with the action annotation based on the annotation of JavaDoc or JavaParser; for each interface method, determining the interface action and the interface path of the interface corresponding to the interface method according to the action annotation of the interface method; determining the interface name, the interface description of the interface corresponding to the interface method, and the parameter description and the return value description of the interface method according to the Javadoc annotation of the interface method; and performing format conversion processing on the interface action, the interface path, the interface name, the interface description of the interface corresponding to each interface method, and the parameter description and the return value description of each interface method, to obtain the data information of the method name or the method class name of the target code file.

[0046] The custom modification of the interface document based on the preview interface of the InteliJ DEA compilation platform of the user to obtain the target interface document includes: generating a UML sequence diagram by calling a plug-in SequenceDiagram in the InteliJ DEA compilation platform; inserting the UML sequence diagram into the interface document to obtain a first interface document; and converting the format of the first interface document into a target format according to the requirement of the interface management platform on the format of the interface document to obtain the target interface document.

[0047] The user can preview or custom modify the interface document according to actual needs on the IntelliJ DEA compilation platform page. In response to the fact that the user selects an interface class, the user can select one or several interfaces in the interface class for modification. In response to the fact that the user selects a single interface, the user can modify the interface.

[0048] The plug-in SequenceDiagram for generating a UML sequence diagram by calling the plug-in in the InteliJ DEA is an existing plug-in of the compilation platform, and the generated sequence diagram can be inserted into the interface document as an interface note. The sequence diagram (SequenceDiagram), also known as a sequence diagram, a loop diagram or a sequential diagram, is a UML interaction diagram. It displays the dynamic cooperation between multiple objects by describing the time sequence of the messages sent between the objects. The sequence diagram is a two-dimensional diagram, the horizontal axis represents the objects, the vertical axis represents the time, the messages are transmitted horizontally between the objects, and are arranged vertically according to the time sequence. In the embodiment of the application, the insertion of the sequence diagram into the interface document can show the order of the interaction between the objects. The interaction behavior is modeled as message transmission, and the interaction between the objects is dynamically displayed by describing how the messages are sent and received between the objects; compared with other UML diagrams, the sequence diagram emphasizes the time sequence of the interaction more; and the concurrent processes can be intuitively described.

[0049] The application completes the writing of the target code on the InteliJ IDEA compiling platform, in the case of writing completion, the user can obtain the plug-in option interface by right-clicking the method name or method class name of the target code with the mouse; the user can select the target plug-in on the plug-in option interface with the mouse, when the user right-clicks the target plug-in option, the interface option interface of the target plug-in is obtained; the user only needs to select the target interface on the interface option interface, and the InteliJ IDEA compiling platform can automatically generate the interface document, which greatly reduces the writing time of the developer and realizes the rapid and efficient generation of the interface document.

[0050] In step S202, the target interface document is searched in the interface management platform, and in response to the fact that the target interface document is not searched, the interface document is uploaded to the interface management platform according to the address link specified by the user.

[0051] When the InteliJ IDEA compiling platform completes the automatic generation of the interface document of the target code file, the application further provides a method for uploading the interface document to the interface management platform, wherein the interface management platform of the application includes the Yapi platform. The uploading method of the interface document further includes: exporting the interface document to a local markdown file.

[0052] In the embodiment of the application, different developers can realize collaborative development of software on different terminal devices, wherein the code written by the developer can be saved locally or transmitted to the server for saving through the network.

[0053] The embodiment mainly aims at uploading the interface document to the Yapi platform. In one embodiment, the searching of the target interface document in the interface management platform further includes: in response to the fact that the target interface document is searched, the interface corresponding to the target interface document is updated.

[0054] In step S203, in response to receiving the specified address link sent by the user, the target interface document is uploaded to the interface management platform based on the specified address link.

[0055] In step S204, in response to the fact that the specified address link sent by the user is not received, the available address link directory of the interface in the interface management platform is obtained, and the target interface document is uploaded to the interface management platform based on the target address link selected by the user.

[0056] The uploading of the interface document to the interface management platform comprises: in response to receiving a first uploading request sent by the user end, configuring an account name and a password, and sending a verification request to the interface management platform; obtaining a login verification Token returned by the interface management platform; in response to receiving an uploading request sent by the user end for uploading the interface document to the interface management platform for the first time, automatically logging in the verification Token according to the account name and the password configured in advance; uploading the interface document to the interface management platform, and returning address information of the interface document to the user end.

[0057] When the user selects to upload the interface document to the interface management platform, the address link of the interface management platform and the user account password need to be configured in the InteliJ DEA plug-in environment configuration; if the address link exists in the interface management platform, the interface document is updated; if the address link does not exist in the interface management platform, the interface document is returned according to the address selected by the user. When the address link does not exist in the interface management platform, the interface management platform will display all available address links for the user to select, and the user can select a suitable address link according to the needs.

[0058] In the embodiment of the application, for each interface in the interface related information, it can be determined whether the interface management platform records the related information of the interface. If yes, it can be further determined whether the related information of the interface recorded in the interface management platform is the same as the related information of the interface in the interface related information. For example, it can be determined by comparing whether the parameter values of the related information of the interface recorded in the interface management platform are the same as the parameter values of the related information of the interface in the interface related information. If the same, the updating operation can not be performed, and the related information of the interface recorded in the interface management platform is continued to be retained. If different, the related information of the interface in the interface related information is used to update the related information of the interface recorded in the interface management platform. If not, that is, the interface management platform does not record the related information of the interface, it can be determined that the interface is a newly added interface, and a data insertion operation can be performed to add the related information of the interface in the interface related information in the interface management platform.

[0059] For each interface of the changed interface class recorded in the interface management platform, it can be determined whether the related information of the interface exists in the interface related information. If not, it can be considered that the interface has been deleted in the code file, and the related information of the interface can be deleted in the interface management platform.

[0060] In the embodiment of the application, the uploading of the interface document should be performed according to the needs of the developer to modify the corresponding format, and when the interface document is modified, the interface document format should also be converted into the corresponding format for uploading.

[0061] After the interface document is uploaded successfully, a URL after uploading is returned for the user to view, wherein, after the interface document is uploaded to the interface management platform, address information of the interface document is returned to the user end, including: uploading the interface document to the interface management platform, in response to successful uploading, returning an address link to the user end.

[0062] The embodiment of the application realizes deep binding between the code interface level and the actual Yapi platform interface document, and after the interface is updated, only re-uploading is needed to realize automatic updating of the remote interface document, and when the interface document is uploaded, it only needs to be configured once to avoid verification login, thereby simplifying the generation method of the interface document and providing convenience for the developer.

[0063] Figure 3 is a schematic diagram of the interaction of an interface document automatic generation and uploading process according to an embodiment of the application. As shown in Figure 3 The user can select a suitable method class to generate an interface document on the compiler according to the target JAVA file type, and the specific execution process includes: based on the method class selected by the user, the compiler can parse the interface according to the method class selected by the user, and obtain the related information of the interface; the compiler can generate an interface document according to the related information of the interface; the format of the interface document is converted based on the requirements of different compilers for the format of the interface document, so as to generate a Json format Yapi document; the SequenceDiagram plug-in in the compiler is called to generate an interface timing diagram, which is inserted into the interface document as an interface note. The interface document is returned to the user end, and the user end can preview and modify the interface document.

[0064] The uploading process of the interface document includes the following interaction steps: the user selects an upload address Yapi platform interface group on the home page of the compiler, and uploads the interface document. The compiler will search in the existing Yapi interface document based on the received interface document, judge whether the interface document already exists in the Yapi platform, if it exists, return the original interface position; if it does not exist, the compiler will return all available interface positions, and the user can select the interface position according to the actual needs. When uploading the interface document to the determined uploading position of the interface document, the format of the interface document needs to be modified to the same format as the document format of the compiler.

[0065] The process of uploading the interface document to the interface management platform includes the following interaction steps: the compiler will obtain the verification Token according to the username and password; the uploading process of the interface document can be realized by logging in the verification Token on the interface management platform; the interface document is uploaded to the target position of the interface management platform.

[0066] The process of returning the interface document comprises the following interactive steps: linking the target position address of the interface document back to the compiler; linking the address of the interface platform back to the user end, so that the user can view the interface document.

[0067] Embodiment Two

[0068] Corresponding to the above-mentioned embodiments of the method, the present application also provides embodiments of the device and the terminal thereof.

[0069] Figure 4 is a block diagram of an uploading device of an interface document according to an embodiment of the present application, as shown in the figure, the device 400 comprises a modifying module 401, a first uploading module 402, a second uploading module 403 and a third uploading module 404. Figure 4

[0070] The modifying module 401 is configured to obtain a target interface document based on the modification of the interface document by the user on the compiling platform;

[0071] The first uploading module 402 is configured to search for the target interface document in the interface management platform, and in response to the fact that the target interface document is not searched for, upload the interface document to the interface management platform according to the address link specified by the user;

[0072] The second uploading module 403 is configured to, in response to receiving the specified address link sent by the user, upload the target interface document to the interface management platform based on the specified address link;

[0073] The third uploading module 404 is configured to, in response to the fact that the specified address link sent by the user is not received, obtain a directory of available address links in the interface management platform, and upload the target interface document to the interface management platform based on the target address link selected by the user.

[0074] Optionally, the first uploading module 402 is used for searching for the target interface document in the interface management platform, and further comprises the following: in response to the fact that the target interface document is searched for, updating the interface corresponding to the target interface document.

[0075] Optionally, the modifying module 401 is used for obtaining a target interface document based on the custom modification of the interface document by the user on the preview interface of the InteliJ DEA compiling platform, and comprises the following: calling a plug-in SequenceDiagram in the InteliJ DEA compiling platform to generate a UML timing diagram; inserting the UML timing diagram into the interface document to obtain a first interface document; converting the format of the first interface document into a target format according to the requirements of the interface management platform on the format of the interface document, to obtain the target interface document.

[0076] ​Optionally, the modification module 401 is configured to generate a preview interface of an InteliJ DEA compilation platform, and the method comprises: in the case that target code writing is completed, in response to a plug-in instruction issued by a user being monitored, displaying a first code auxiliary function interface, wherein the first code auxiliary function interface is configured to select a target plug-in; displaying a second code auxiliary function interface, wherein the second code auxiliary function interface is configured to select a target interface of the target plug-in; integrating related information of the target interface, and automatically generating an interface document preview interface.

[0077] Optionally, the related information of the target interface in the modification module 401 comprises: parameter information of the target interface, wherein the parameter information comprises: input parameter information and return parameter information; based on JAVADoc annotation in a target code file and JavaParser analysis, the interface data information is obtained.

[0078] Optionally, the third uploading module 404 is configured to upload the interface document to an interface management platform, and the method comprises: in response to receiving a first uploading request sent by a user end, configuring an account name and a password, and sending a verification request to the interface management platform; obtaining a login verification Token returned by the interface management platform; in response to receiving an uploading request sent by the user end for uploading the interface document to the interface management platform for the first time, automatically logging in the verification Token according to the account name and the password configured in advance; uploading the interface document to the interface management platform, and returning address information of the interface document to the user end.

[0079] As to the apparatus in the above-mentioned embodiments, the specific manners in which various modules perform operations have been described in details in the embodiments of the method, and thus will not be described in details here.

[0080] Corresponding to the above-mentioned method embodiments, the embodiments of the present application further provide a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the above-mentioned interface document generation method.

[0081] Each embodiment in the present specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same or similar parts of each embodiment can be referred to each other.

[0082] Those skilled in the art will further appreciate that the functionality of the various examples described herein can be implemented in electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various examples have been described herein in terms of their functionality, their composition or their manner of operation. Whether such functionality is implemented in hardware or software depends on the particular application and design constraints imposed on the overall system. Skilled persons can implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.

[0083] Figure 5 is a block diagram of an electronic device apparatus according to an embodiment of the present application, as shown in Figure 5 The electronic device comprises a memory, a processor, and a camera module, the memory is configured to store computer instructions executable on the processor, the processor is configured to implement the interface document uploading method according to any of the embodiments of the present application when executing the computer instructions. The present application at least one embodiment further proposes a computer readable storage medium, which stores a computer program, the program is executed by the processor to implement the interface document uploading method according to any of the embodiments of the present application. Those skilled in the art should understand that one or more embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, one or more embodiments of the present application can be in the form of a completely hardware embodiment, a completely software embodiment or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0084] In the present application, "and / or" means at least one of the two, for example, "A and / or B" includes three schemes: A, B, and "A and B".

[0085] Each embodiment of the present application is described in a progressive manner, and the same or similar parts between each embodiment can be referred to each other. Each embodiment focuses on the difference from other embodiments. In particular, for the embodiment of the device for uploading interface documents, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the part of the method embodiment.

[0086] The above describes particular embodiments of the application. Other embodiments are within the scope of the following claims. In some cases, acts or steps recited in the claims can be performed in a different order from that depicted in the embodiments and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the particular order shown or sequential order in order to achieve the desired results. In some implementations, multitasking and parallel processing can be advantageous or necessary.

[0087] The method described in the present application can be applied to the whole-house intelligent digital control application scenarios such as smart home, smart home, smart home device ecology, intelligence house ecology, etc. The network can include but is not limited to at least one of the following: wired network, wireless network. The wired network can include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network can include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal can not be limited to PC, mobile phone, tablet computer, smart air conditioner, smart oven, smart oven, smart oven, smart oven, smart washing machine, smart water heater, smart washing equipment, smart dishwasher, smart projection equipment, smart TV, smart clothesline, smart curtain, smart audio and video, smart socket, smart sound, smart sound box, smart fresh air equipment, smart kitchen and bathroom equipment, smart bathroom equipment, smart sweeping robot, smart window cleaning robot, smart mopping robot, smart air purification equipment, smart steamer, smart microwave oven, smart kitchen treasure, smart purifier, smart water dispenser, smart door lock, etc.

[0088] Embodiments of the subject matter and the functional operations described in this specification can be implemented in digital electronic circuitry, in tangibly-embodied computer software or firmware, in computer hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible non-transitory program carrier to perform or control the operation of the uploading device for interface documents when executed by a processing device. Alternatively or additionally, the program instructions can be encoded on an artificially generated propagated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal that is generated to encode information for transmission to suitable receiver equipment and to execute by a processing device for the uploading device for interface documents. A computer storage medium can be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them.

[0089] The processes and logic flows described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit), and / or by a combination of computer hardware and software, e.g., a general purpose computer with a custom computer program. The processing and logic flow described in this specification can be performed by one or more programmable computers executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit), and / or by a combination of computer hardware and software, e.g., a general purpose computer with a custom computer program.

[0090] Computers suitable for the execution of a computer program include, by way of example, general and / or special purpose microprocessors or any other kind of central processing unit. Generally, a central processing unit will receive instructions and data from a read only memory and / or a random access memory. The essential elements of a computer are a central processing unit for performing or executing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto optical or optical disks, or a computer will be operatively coupled to receive data from or transfer data to or both, a communications network, e.g., a local area network (LAN) or a wide area network (WAN) or the Internet, through a wired and / or wireless communications system. Many aspects of such a computer program, including one or more of its components, can be implemented as or using various software languages, including object oriented languages such as JAVA, Smalltalk, C++, Python, and the like.

[0091] Computer readable media suitable for storing computer program instructions and data include all forms of non volatile memory, media and memory devices, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto optical disks; and CD ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.

[0092] While this application contains many specific embodiments, these should not be construed as limiting the scope of any inventions claimed or the scope of equivalents to which such inventions are entitled. Certain features that are described in this application 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 or in any suitable sub-combination. Moreover, although features can be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination and the claimed combination can be directed to a sub-combination or a variation of a sub-combination.

[0093] Similarly, while operations are depicted in the drawings in a particular order, this should not be understood as requiring such order nor limiting to the illustrated order, nor that all illustrated operations be performed, to achieve desirable results. In certain circumstances, multitasking and parallel processing can be advantageous. Moreover, the separation of various system modules and components in the embodiments described above should not be understood as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.

[0094] Accordingly, particular embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. In some cases, actions recited in the claims can be performed in a different order and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.

[0095] The above descriptions are only the preferred embodiments of the present application and not intended to limit the present application in any form. Although the present application has been disclosed as above with the preferred embodiments, it is not intended to limit the present application, and any skilled person in the art can make some changes or modifications to the above-mentioned technical content as equivalent embodiments without departing from the scope of the present application. The embodiments in the above embodiments can be further combined or replaced, as long as they do not deviate from the technical solution of the present application. Any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present application are still within the scope of the present application.

Claims

1. An interface document uploading method, characterized by, The method comprises the following steps: Based on the user modifying the interface document on the compiling platform, a target interface document is obtained; The target interface document is searched in the interface management platform, and if the target interface document is not searched, the interface document is uploaded to the interface management platform according to the address link specified by the user; If the address link specified by the user is received, the target interface document is uploaded to the interface management platform based on the specified address link; The method based on the user modifying the interface document on the compiling platform to obtain the target interface document comprises the following steps: Based on the method class selected by the user, the compiling platform parses the interface according to the method class selected by the user to obtain the related information of the interface; and the compiling platform generates the interface document according to the related information of the interface; A plug-in in the compiling platform is called to generate a timing diagram; The timing diagram is inserted into the interface document to obtain a first interface document; According to the requirements of the interface management platform for the format of the interface document, the format of the first interface document is converted into a target format to obtain the target interface document.

2. The interface document uploading method of claim 1, wherein the target interface document is uploaded to the interface management platform, comprising: If the address link specified by the user is not received, the available address link directory of the interface in the interface management platform is obtained, and the target interface document is uploaded to the interface management platform based on the target address link selected by the user. The target interface document is searched in the interface management platform, and if the target interface document is searched, the interface corresponding to the target interface document is updated.

3. The method of claim 1 or 2, wherein, 4. The interface document uploading method of claim 3, wherein the plug-in in the compiling platform comprises a SequenceDiagram, and the timing diagram comprises a UML timing diagram.

5. The interface document uploading method of claim 4, wherein the method for generating the preview interface of the compiling platform comprises: in the case that the target code is completed, a first code auxiliary function interface is displayed in response to the plug-in instruction issued by the user, wherein the first code auxiliary function interface is used to select a target plug-in; A second code auxiliary function interface is displayed, wherein the second code auxiliary function interface is used to select a target interface of the target plug-in; The related information of the target interface is integrated, and an interface document preview interface is automatically generated.

6. The interface document uploading method of claim 5, wherein the related information of the target interface comprises: Parameter information of the target interface, wherein the parameter information comprises input parameter information and return parameter information; Data information of the method name or the method class name in the target code file is obtained based on the JAVADoc annotation in the target code file and the parsing of the JavaParser.

7. The interface document uploading method of claim 6, wherein the interface document is uploaded to the interface management platform, comprising: ​ ​ ​ ​ ​ ​ In response to receiving the first upload request sent by the user terminal, an account name and a password are configured, and a verification request is sent to the interface management platform; A login verification Token returned by the interface management platform is obtained; In response to receiving an upload request sent by the user terminal for uploading the interface document to the interface management platform for the first time, an account name and a password configured in advance are used to automatically log in to the Token; The interface document is uploaded to the interface management platform, and address information of the interface document is returned to the user terminal.

8. An apparatus for uploading an interface document, characterized by Comprise: The modification module is configured to modify the interface document based on the user on the compiling platform to obtain a target interface document; The first upload module is configured to search for the target interface document in the interface management platform, and in response to not searching for the target interface document, upload the interface document to the interface management platform according to the address link specified by the user; The second upload module is configured to upload the target interface document to the interface management platform based on the specified address link in response to receiving the specified address link sent by the user; The modification module is configured to modify the interface document based on the user on the compiling platform to obtain a target interface document; Based on the method class selected by the user, the compiling platform parses the interface to obtain related information of the interface, and generates an interface document based on the related information of the interface; A plug-in in the compiling platform is called to generate a timing diagram; The timing diagram is inserted into the interface document to obtain a first interface document; The first interface document is converted into a target format according to the requirements of the interface management platform for the format of the interface document to obtain a target interface document.

9. A computer readable storage medium, characterized in that, The computer-readable storage medium comprises a stored program, wherein the program executes the method of any one of claims 1 to 7 when running. 10.An electronic device comprising a memory and a processor, the electronic device characterized by, The memory stores a computer program, and the processor is configured to execute the method of any one of claims 1 to 7 through the computer program.

Citation Information

Patent Citations

  • Interface document generation and query method and device and computer readable storage medium

    CN112685078A