CN107885499A - A kind of interface document generation method and terminal device - Google Patents

A kind of interface document generation method and terminal device Download PDF

Info

Publication number
CN107885499A
CN107885499A CN201710975968.XA CN201710975968A CN107885499A CN 107885499 A CN107885499 A CN 107885499A CN 201710975968 A CN201710975968 A CN 201710975968A CN 107885499 A CN107885499 A CN 107885499A
Authority
CN
China
Prior art keywords
code
interface document
comments
identifier
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710975968.XA
Other languages
Chinese (zh)
Inventor
王桥东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An One Wallet E Commerce Co Ltd
Original Assignee
Ping An One Wallet E Commerce Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An One Wallet E Commerce Co Ltd filed Critical Ping An One Wallet E Commerce Co Ltd
Priority to CN201710975968.XA priority Critical patent/CN107885499A/en
Publication of CN107885499A publication Critical patent/CN107885499A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/447Target code generation

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The invention belongs to field of computer technology, more particularly to a kind of interface document generation method and terminal device.Developer in the compiling procedure of code on code segment synchronously addition corresponding to code comments, summary info is identified respectively using default identifier in these code comments, the content such as parameter information and class of service, after developer's completion code is write and issues the instruction of generation interface document, the method of the embodiment of the present invention can extract the annotating information of these identifiers mark respectively, it is added in the interface document of generation, so as to be automatically completed writing for interface document, and automatically the interface document of generation can be stored into corresponding document library, greatly reduce the time for needing developer to participate in, operating efficiency can be effectively improved and reduce development cost.

Description

A kind of interface document generation method and terminal device
Technical field
The invention belongs to field of computer technology, more particularly to a kind of interface document generation method and terminal device.
Background technology
With the continuous development of computer technology, the complexity more and more higher of software systems, size of code is also increasing, often Software systems need hundreds of thousands, or even the code of row up to a million easily, therefore it is common to generally require many name developers Cooperation is developed, but the coding style difference between different developers is larger, and the code that a certain developer writes is past It is past to be difficult to be understood by another developer.Therefore, understand its code content for the ease of other developers, developer except Write outside code, it is also necessary to expend considerable time and effort and write corresponding interface document, so as to cause work to be imitated Rate is low, and development cost is higher.
The content of the invention
In view of this, the embodiments of the invention provide a kind of interface document generation method and terminal device, to solve because needing Want developer to expend considerable time and effort to write interface document and cause operating efficiency low, development cost is higher to ask Topic.
The first aspect of the embodiment of the present invention provides a kind of interface document generation method, can include:
After the instruction of interface document for the generation object code that developer issues is received, generation and the target generation Interface document corresponding to code;
The code comments of the object code are obtained, the code comments are in the object code by the developer Compiling procedure in synchronously added on corresponding code segment;
The annotating information of default first identifier mark is extracted from the code comments, according to first identifier The annotating information of mark generates the summary info of the object code, and the summary info is added into the interface document In;
The annotating information of default second identifier mark is extracted from the code comments, according to second identifier The annotating information of mark generates the parameter information of the object code, and the parameter information is added into the interface document In;
The annotating information of default 3rd identifier mark is extracted from the code comments, according to the 3rd identifier The annotating information of mark determines the class of service of the object code;
The interface document is stored into the document library being pre-created corresponding with the class of service of the object code.
The second aspect of the embodiment of the present invention provides a kind of computer-readable recording medium, the computer-readable storage Media storage has computer program, and the computer program realizes following steps when being executed by processor:
After the instruction of interface document for the generation object code that developer issues is received, generation and the target generation Interface document corresponding to code;
The code comments of the object code are obtained, the code comments are in the object code by the developer Compiling procedure in synchronously added on corresponding code segment;
The annotating information of default first identifier mark is extracted from the code comments, according to first identifier The annotating information of mark generates the summary info of the object code, and the summary info is added into the interface document In;
The annotating information of default second identifier mark is extracted from the code comments, according to second identifier The annotating information of mark generates the parameter information of the object code, and the parameter information is added into the interface document In;
The annotating information of default 3rd identifier mark is extracted from the code comments, according to the 3rd identifier The annotating information of mark determines the class of service of the object code;
The interface document is stored into the document library being pre-created corresponding with the class of service of the object code.
The third aspect of the embodiment of the present invention provides a kind of interface document generation terminal device, including memory, processing Device and the computer program that can be run in the memory and on the processor is stored in, described in the computing device Following steps are realized during computer program:
After the instruction of interface document for the generation object code that developer issues is received, generation and the target generation Interface document corresponding to code;
The code comments of the object code are obtained, the code comments are in the object code by the developer Compiling procedure in synchronously added on corresponding code segment;
The annotating information of default first identifier mark is extracted from the code comments, according to first identifier The annotating information of mark generates the summary info of the object code, and the summary info is added into the interface document In;
The annotating information of default second identifier mark is extracted from the code comments, according to second identifier The annotating information of mark generates the parameter information of the object code, and the parameter information is added into the interface document In;
The annotating information of default 3rd identifier mark is extracted from the code comments, according to the 3rd identifier The annotating information of mark determines the class of service of the object code;
The interface document is stored into the document library being pre-created corresponding with the class of service of the object code.
Existing beneficial effect is the embodiment of the present invention compared with prior art:The embodiment of the present invention is receiving exploit person After the instruction of the interface document for the generation object code that member issues, interface document corresponding with the object code is firstly generated, The code comments of the object code are obtained, the note of default first identifier mark is then extracted from the code comments Information, the annotating information identified according to first identifier generate the summary info of the object code, and by the summary Information is added into the interface document, and the annotating information of default second identifier mark is extracted from the code comments, The annotating information identified according to second identifier generates the parameter information of the object code, and the parameter information is added Add in the interface document, the annotating information of default 3rd identifier mark, root are finally extracted from the code comments The annotating information identified according to the 3rd identifier determines the class of service of the object code, and the interface document is stored into In the document library being pre-created corresponding with the class of service of the object code.By the embodiment of the present invention, developer exists In the compiling procedure of code on code segment synchronously addition corresponding to code comments, default mark is used in these code comments Know symbol and identify the contents such as summary info, parameter information and class of service respectively, when developer's completion code is write and issues After the instruction for generating interface document, the method for the embodiment of the present invention can extract the annotating information of these identifiers mark respectively, It is added in the interface document of generation, so as to be automatically completed writing for interface document, and can be automatically by generation Interface document is stored into corresponding document library, is greatly reduced the time for needing developer to participate in, can be effectively improved Operating efficiency simultaneously reduces development cost.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art In the required accompanying drawing used be briefly described, it should be apparent that, drawings in the following description be only the present invention some Embodiment, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these Accompanying drawing obtains other accompanying drawings.
Fig. 1 is a kind of one embodiment flow chart of interface document generation method in the embodiment of the present invention;
Fig. 2 is signals of a kind of interface document generation method step S103 under an application scenarios in the embodiment of the present invention Flow chart;
Fig. 3 is exemplary flow of the process that is updated of docking port document under an application scenarios in the embodiment of the present invention Figure;
Fig. 4 is the schematic block diagram that interface document provided in an embodiment of the present invention generates terminal device;
Fig. 5 is interface document generator routine module map provided in an embodiment of the present invention.
Embodiment
To enable goal of the invention, feature, the advantage of the present invention more obvious and understandable, below in conjunction with the present invention Accompanying drawing in embodiment, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that disclosed below Embodiment be only part of the embodiment of the present invention, and not all embodiment.Based on the embodiment in the present invention, this area All other embodiment that those of ordinary skill is obtained under the premise of creative work is not made, belongs to protection of the present invention Scope.
The embodiment of the present invention need developer in the compiling procedure of code on code segment synchronously addition corresponding to generation Code is explained, and summary info, parameter information and class of service are identified respectively using default identifier in these code comments Etc. content, after developer's completion code is write and issues the instruction of generation interface document, the method for the embodiment of the present invention can To extract the annotating information of these identifiers mark respectively, it is added in the interface document of generation, so as to be automatically completed Writing for interface document, and can automatically by the interface document of generation be stored into corresponding in document library.
Referring to Fig. 1, a kind of one embodiment of interface document generation method can include in the embodiment of the present invention:
Step S101, after the instruction of interface document for the generation object code that developer issues is received, generation with Interface document corresponding to the object code.
It should be noted that interface document now is blank, particular content therein needs to add in subsequent step Add.
Step S102, the code comments of the object code are obtained.
The code comments are synchronously to be added to correspond in the compiling procedure of the object code by the developer Code segment on.
The form of code comments addition is diversified, can be configured according to actual conditions.
As one of example, the code comments in the present embodiment can use following form:
@PAFDoc (desc=" ");
@PAFInput (desc=" ");
@PAFOutput (desc=" ");
@PAFField (desc=" ");
@PAFCat (name=" ");
Wherein, the content in double quotation marks is the text of code comments.
It is of course also possible to be selected to set the code comments of other forms according to actual conditions, this implementation is not made specifically to this Limit.
Step S103, the annotating information of default first identifier mark is extracted from the code comments, according to described The annotating information of first identifier mark generates the summary info of the object code, and the summary info can include to name The description of the substances such as title, author, version, function, and the summary info is added into the interface document.
For example, first identifier could be arranged to@PAFDoc, then in code comments@PAFDoc (desc=" ") in, Content in double quotation marks is the annotating information of the first identifier mark.It is of course also possible to set according to actual conditions selection Other first identifiers are put, this implementation is not especially limited to this.
Preferably, step S103 can specifically include step as shown in Figure 2:
Step S1031, in the first trip code for obtaining code segment corresponding with the annotating information of first identifier mark Keyword.
Keyword is predefined in code, there is the identifier of special meaning, is called reserved word sometimes, keyword is to compiling Translating device has special meaning, for representing a kind of data type, or structure of representation program etc..For example, keyword class is used In representing the class in code, keyword boolean is used for the basic data type for representing Boolean type, and keyword char is used for table Show the basic data type of character types, keyword float is used for the basic data type for representing single-precision floating point type.Except this Outside, the also keyword such as public, private, static, void is not enumerated and illustrated herein.
Step S1032, it is corresponding according to the annotating information that the keyword of acquisition judges with first identifier identifies Code segment whether be category code.
If including keyword class in the keyword obtained, can determine that and first identifier mark Code segment corresponding to annotating information is category code, otherwise, then can be determined that the annotating information pair with first identifier mark The code segment answered is function code or method code.
Wherein, category code is the code being defined to class, correspondingly, the generation being also defined to function or method Code, i.e. function code or method code.Usually, function and method are being abstracted to the object with common trait, but in C In langue, function is referred to as, in JAVA language system, is referred to as method.
If code segment corresponding with the annotating information of first identifier mark is category code, step S1033 is performed, If code segment corresponding with the annotating information of first identifier mark is function code or method code, step is performed S1034。
Step S1033, the annotating information identified according to first identifier generates the overall summary of the object code Information.
The overall summary info is the summary description to whole document, for example, can include document title, document is made Function that person, documentation release and document are realized etc..
In the present embodiment, a document is corresponding with a class, namely each class can be generated corresponding Document.
Step S1034, the annotating information identified according to first identifier generates the chapters and sections summary of the object code Information.
The chapters and sections summary info be in document some chapters and sections summary describe, for example, can include section name, Function that chapters and sections author, chapters and sections version and chapters and sections are realized etc..
In the present embodiment, a chapters and sections are corresponding with a function in class or method, namely to each function or Method can all generate corresponding chapters and sections.
Illustrated below with the corresponding code sample section of the annotating information identified with first identifier:
In the code segment, the keyword class of class is included in first trip code, it is category code to illustrate the code segment, this When, the annotating information identified according to first identifier generates the overall summary info (i.e. " title of the object code:Step on Record is handled;Author:Zhang San;Version:20170101;Functional overview:Xxxxxx "), and the overall summary info is added into institute State in interface document.
And if not including the keyword class of class in first trip code, it is function code or method generation to illustrate the code segment Code, now, the annotating information identified according to first identifier generate the chapters and sections summary info of the object code, and by institute Chapters and sections summary info is stated to be added into the interface document.
By step S103, the overall summary of interface document and the summary of each chapters and sections can be generated, that is, completes interface Document framework is built, and the filling of wherein particular content is then completed by subsequent step.
Step S104, the annotating information of default second identifier mark is extracted from the code comments, according to described The annotating information of second identifier mark generates the parameter information of the object code, the parameter information be to input parameter, The explanation of output parameter and member variable etc., and the parameter information is added into the interface document.
For example, second identifier could be arranged to@PAFInput ,@PAFOutput and@PAFField, then in code Explain@PAFInput (desc=" ") ,@PAFOutput (desc=" ") and@PAFField (desc=" ") in, in double quotation marks Content be second identifier mark annotating information.Specifically, input ginseng can be explained using@PAFInput Number, explains output parameter using@PAFOutput, explains member variable using@PAFField, then the content in double quotation marks Respectively to input parameter, output parameter, member variable annotating information.
In code below section:
Two member variables are shared in class UserResponse ,@PAFField are all employ before each member variable It is explained, then parameter information (i.e. " the name of the object code can be generated according to the annotating information of its mark:Surname Name " and " id:Identification card number "), and the parameter information is added into the interface document.
It is of course also possible to be selected to set other second identifiers according to actual conditions, this implementation is not limited specifically this It is fixed.
By step S104, the parameter information of each chapters and sections in interface document can be specifically generated, when all parameter informations After the completion of all adding, the interface document is plastic.
Preferably, can also be in the interface document after the parameter information is added into the interface document Establishment is corresponding with the parameter information to be linked, and when detecting that the link is clicked, is transferred and is shown the object code In the corresponding code segment of annotating information with second identifier mark.
For example, when member variable of the developer in a class in reading interface document, if wanting to check in code Actual conditions, the link provided in interface document can be provided, jump to corresponding code segment automatically.
Step S105, the annotating information of default 3rd identifier mark is extracted from the code comments, according to described The annotating information of 3rd identifier mark determines the class of service of the object code.
For example, the 3rd identifier could be arranged to@PAFCat, then in code comments@PAFCat (name=" ") in, Content in double quotation marks is the annotating information of the 3rd identifier mark, if the code comments are@PAFCat (name=" Insure "), it is determined that the class of service of the object code is insurance business, if the code comments are that (name=" is managed@PAFCat Wealth "), it is determined that the class of service of the object code is finance services.
It is of course also possible to be selected to set other 3rd identifiers according to actual conditions, this implementation is not limited specifically this It is fixed.
Step S106, the interface document is stored into be pre-created with the class of service of the object code corresponding In document library.
In the present embodiment, multiple document libraries have been pre-created according to class of service, stored in different document libraries different The interface document of class of service, if the class of service of the object code is insurance business, its interface document is stored into guarantor Dangerous service profile storehouse, if the class of service of the object code is finance services, its interface document is stored into finance services Document library.The interface document of generation is classified, is easy to developer to search.
Preferably, when developer carries out code revision and annotating information corresponding to synchronous vacations, the embodiment of the present invention New interface document can be generated according to step as shown in Figure 3:
Step S301, after detecting that the object code is changed by the developer, the object code is obtained Amended code comments.
The amended code comments are the code comments of the amended object code.
Step S302, the amended code comments are explained with the source code pre-saved and contrasted, obtained Difference between the amended code comments and source code note.
The source code is explained as the code comments of the object code before modification.
Difference between the amended code comments and the source code are explained includes:The amended code Explain with the source code explain compared to increased code comments, deletion code comments and/or change code comments.
Step S303, connect according to the difference between the amended code comments and source code note to described Mouth document is revised.
Specifically, step S303 can include:
The annotating information of the second identifier mark is extracted from the increased code comments, according to the described second mark The annotating information for knowing symbol mark generates increased parameter information, and the increased parameter information is added into the interface document In;
And/or
Parameter information corresponding to the code comments of the deletion is deleted from the interface document;
And/or
The annotating information of the second identifier mark is extracted from the code comments of the change, according to the described second mark Know the parameter information of the annotating information generation change of symbol mark, and the interface document is replaced using the parameter information of the change In corresponding parameter information.
By step as shown in Figure 3, after each object code is developed personnel's modification, first check which is explained in code Information is changed, only the part that changes is regenerated (specifically include it is newly-increased, delete, replace these three feelings Condition), keep other parts constant.In general, during each code revision, modification amount is not too large, therefore, in interface document Modification by a small margin need to be only made accordingly, accelerated the speed that interface document is synchronously revised, reduced interface document and synchronously repair The workload ordered.
In summary, synchronously added on code segment in the compiling procedure of code by the embodiment of the present invention, developer Add corresponding code comments, in these code comments using default identifier identify respectively summary info, parameter information with And the content such as class of service, after developer's completion code is write and issues the instruction of generation interface document, the present invention is implemented The method of example can extract the annotating information of these identifiers mark respectively, be added in the interface document of generation, so as to Writing for interface document has been automatically completed, and automatically the interface document of generation can be stored into corresponding document library, greatly It is big to reduce the time for needing developer to participate in, operating efficiency can be effectively improved and reduce development cost.
Corresponding to the interface document generation method described in foregoing embodiments, Fig. 4 shows provided in an embodiment of the present invention connect The schematic block diagram of mouth document structure tree terminal device, for convenience of description, illustrate only the part related to the embodiment of the present invention.
In the present embodiment, the interface document generation terminal device can be desktop PC, notebook, palm electricity The computing device such as brain and cloud server.Interface document generation terminal device may include:Processor 40, memory 41 and deposit Store up the computer program 42 that can be run in the memory 41 and on the processor 40.
The processor 40 can be CPU (Central Processing Unit, CPU), can also be Other general processors, digital signal processor (Digital Signal Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), field programmable gate array (Field- Programmable Gate Array, FPGA) either other PLDs, discrete gate or transistor logic, Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor Deng.
The memory 41 can be the internal storage unit of interface document generation terminal device 4, such as interface text The hard disk or internal memory of shelves generation terminal device 4.The memory 41 can also be the outer of the interface document generation terminal device 4 The plug-in type hard disk being equipped with portion's storage device, such as interface document generation terminal device 4, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card, flash card (Flash Card) etc..Further, The memory 41 can also both include the internal storage unit of interface document generation terminal device 4 or including external storage Equipment.The memory 41 be used for store the computer program and the interface document generation terminal device 4 needed for its Its program and data.The memory 41 can be also used for temporarily storing the data that has exported or will export.
Referring to Fig. 5, it is the Program modual graph of computer program 42 provided in an embodiment of the present invention.In the present embodiment, Described computer program 42 can be divided into one or more program modules, and one or more of program modules are deposited It is stored in the memory 41, and as performed by the processor 40, to complete the present invention.For example, in Figure 5, described meter Calculation machine program 42, namely interface document generation program can be divided into interface document generation module 501, code comments obtain mould Block 502, summary info generation module 503, parameter information generation module 504, class of service determining module 505, interface document are deposited Store up module 506.Program module alleged by the present invention is the series of computation machine programmed instruction section for referring to complete specific function, than Program is more suitable for describing implementation procedure of the computer program 42 in the interface document generates terminal device.Retouch below The function of the program module 501-506 will specifically be introduced by stating.
Interface document generation module 501, for receiving the interface document for the generation object code that developer issues Instruction after, generate corresponding with object code interface document;
Code comments acquisition module 502, for obtaining the code comments of the object code, the code comments are by institute Developer is stated synchronously to be added on corresponding code segment in the compiling procedure of the object code;
Summary info generation module 503, for extracting the note of default first identifier mark from the code comments Information is solved, the annotating information identified according to first identifier generates the summary info of the object code, and will be described general Information is wanted to be added into the interface document;
Parameter information generation module 504, for extracting the note of default second identifier mark from the code comments Information is solved, the annotating information identified according to second identifier generates the parameter information of the object code, and by the ginseng Number information is added into the interface document;
Class of service determining module 505, for extracting the note of default 3rd identifier mark from the code comments Information is solved, the annotating information identified according to the 3rd identifier determines the class of service of the object code;
Interface document memory module 506, for the interface document to be stored into the class of service with the object code In the corresponding document library being pre-created.
Further, the summary info generation module 503 can include:
Keyword acquiring unit, for obtaining the head of code segment corresponding with the annotating information of first identifier mark Keyword in line code;
Code segment judging unit, for the note for judging to identify with first identifier according to the keyword of acquisition Whether code segment corresponding to information is category code;
Overall summary info generation unit, if the corresponding code segment of annotating information for being identified with first identifier For category code, then the annotating information identified according to first identifier generates the overall summary info of the object code;
Chapters and sections summary info generation unit, if the corresponding code segment of annotating information for being identified with first identifier For function code or method code, then the annotating information identified according to first identifier generates the chapters and sections of the object code Summary info.
Further, can also include in the computer program 42:
Amended code comments acquisition module, detect that the object code is changed by the developer for working as Afterwards, the amended code comments of the object code are obtained;
Code comments contrast module, for the amended code comments are explained with the source code pre-saved into Row contrast, obtains the difference between the amended code comments and source code note, and the source code is explained For the code comments of the object code before modification;
Interface document revises module, between being explained according to the amended code comments and the source code Difference is revised to the interface document.
Further, the difference between the amended code comments and the source code are explained includes:
The amended code comments with the source code explain compared to increased code comments, deletion code The code comments explained and/or changed;
The interface document revision module includes:
Adding device, for extracting the annotating information of the second identifier mark from the increased code comments, The annotating information identified according to second identifier generates increased parameter information, and the increased parameter information is added Enter in the interface document;
And/or
Unit is deleted, for the parameter information corresponding to the code comments of the deletion to be deleted from the interface document Remove;
And/or
Replacement unit, for extracting the annotating information of the second identifier mark from the code comments of the change, The parameter information of the annotating information generation change identified according to second identifier, and replaced using the parameter information of the change Change corresponding parameter information in the interface document.
Further, can also include in the computer program 42:
Creation module is linked, for creating link corresponding with the parameter information in the interface document;
Code segment calling module, for when detecting that the link is clicked, transferring and showing in the object code Code segment corresponding with the annotating information of second identifier mark.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description, The specific work process of device and unit, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In the above-described embodiments, the description to each embodiment all emphasizes particularly on different fields, and is not described in detail or remembers in some embodiment The part of load, it may refer to the associated description of other embodiments.
Those of ordinary skill in the art are it is to be appreciated that each embodiment described with reference to the embodiments described herein Module, unit and/or method and step, it can be realized with the combination of electronic hardware or computer software and electronic hardware.This A little functions are performed with hardware or software mode actually, application-specific and design constraint depending on technical scheme.Specially Industry technical staff can realize described function using distinct methods to each specific application, but this realization is not It is considered as beyond the scope of this invention.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method can be with Realize by another way.For example, device embodiment described above is only schematical, for example, the unit Division, only a kind of division of logic function, can there is other dividing mode, such as multiple units or component when actually realizing Another system can be combined or be desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or The mutual coupling discussed or direct-coupling or communication connection can be the indirect couplings by some interfaces, device or unit Close or communicate to connect, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs 's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also That unit is individually physically present, can also two or more units it is integrated in a unit.Above-mentioned integrated list Member can both be realized in the form of hardware, can also be realized in the form of SFU software functional unit.
If the integrated unit is realized in the form of SFU software functional unit and is used as independent production marketing or use When, it can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially The part to be contributed in other words to prior art or all or part of the technical scheme can be in the form of software products Embody, the computer software product is stored in a storage medium, including some instructions are causing a computer Equipment (can be personal computer, server, or network equipment etc.) performs the complete of each embodiment methods described of the present invention Portion or part steps.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. are various can store journey The medium of sequence code.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to foregoing reality Example is applied the present invention is described in detail, it will be understood by those within the art that:It still can be to foregoing each Technical scheme described in embodiment is modified, or carries out equivalent substitution to which part technical characteristic;And these are changed Or replace, the essence of appropriate technical solution is departed from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (10)

  1. A kind of 1. interface document generation method, it is characterised in that including:
    After the instruction of interface document for the generation object code that developer issues is received, generation and the object code pair The interface document answered;
    Obtain the code comments of the object code, the code comments be by the developer the object code volume During writing synchronously corresponding on code segment;
    The annotating information of default first identifier mark is extracted from the code comments, is identified according to first identifier Annotating information generate the summary info of the object code, and the summary info is added into the interface document;
    The annotating information of default second identifier mark is extracted from the code comments, is identified according to second identifier Annotating information generate the parameter information of the object code, and the parameter information is added into the interface document;
    The annotating information of default 3rd identifier mark is extracted from the code comments, is identified according to the 3rd identifier Annotating information determine the class of service of the object code;
    The interface document is stored into the document library being pre-created corresponding with the class of service of the object code.
  2. 2. interface document generation method according to claim 1, it is characterised in that described according to the first identifier mark The summary info that the annotating information of knowledge generates the object code includes:
    Obtain the keyword in the first trip code of code segment corresponding with the annotating information of first identifier mark;
    According to the keyword of acquisition judge with the corresponding code segment of annotating information of first identifier mark whether be Category code;
    If code segment corresponding with the annotating information of first identifier mark is category code, according to first identifier The annotating information of mark generates the overall summary info of the object code;
    If code segment corresponding with the annotating information of first identifier mark is function code or method code, according to institute The annotating information for stating the first identifier mark generates the chapters and sections summary info of the object code.
  3. 3. interface document generation method according to claim 1, it is characterised in that by the interface document be stored into After in the document library being pre-created corresponding to the class of service of the object code, in addition to:
    After detecting that the object code is changed by the developer, the amended code note of the object code is obtained Solution;
    The amended code comments are explained with the source code pre-saved and contrasted, obtain the amended generation Code explains the difference between source code note, and the source code was explained as the generation of the object code before modification Code is explained;
    Difference between being explained according to the amended code comments and the source code is repaiied to the interface document Order.
  4. 4. interface document generation method according to claim 3, it is characterised in that the amended code comments and institute The difference stated between source code note includes:
    The amended code comments with the source code explain compared to increased code comments, deletion code comments And/or the code comments of change;
    The difference according between the amended code comments and source code note is entered to the interface document Row revision includes:
    The annotating information of the second identifier mark is extracted from the increased code comments, according to second identifier The annotating information of mark generates increased parameter information, and the increased parameter information is added into the interface document;
    And/or
    Parameter information corresponding to the code comments of the deletion is deleted from the interface document;
    And/or
    The annotating information of the second identifier mark is extracted from the code comments of the change, according to second identifier The parameter information of the annotating information generation change of mark, and using right in the parameter information replacement interface document of the change The parameter information answered.
  5. 5. interface document generation method according to any one of claim 1 to 4, it is characterised in that according to described The annotating information of two identifiers mark generates the parameter information of the object code, and the parameter information is added into described connect After in mouth document, in addition to:
    Link corresponding with the parameter information is created in the interface document;
    When detecting that the link is clicked, transfer and show the note in the object code with second identifier mark Solve code segment corresponding to information.
  6. 6. a kind of computer-readable recording medium, the computer-readable recording medium storage has computer program, and its feature exists In interface document generation side of the realization as any one of claim 1 to 5 when the computer program is executed by processor The step of method.
  7. 7. a kind of terminal device, including memory, processor and it is stored in the memory and can be on the processor The computer program of operation, it is characterised in that realize following steps during computer program described in the computing device:
    After the instruction of interface document for the generation object code that developer issues is received, generation and the object code pair The interface document answered;
    Obtain the code comments of the object code, the code comments be by the developer the object code volume During writing synchronously corresponding on code segment;
    The annotating information of default first identifier mark is extracted from the code comments, is identified according to first identifier Annotating information generate the summary info of the object code, and the summary info is added into the interface document;
    The annotating information of default second identifier mark is extracted from the code comments, is identified according to second identifier Annotating information generate the parameter information of the object code, and the parameter information is added into the interface document;
    The annotating information of default 3rd identifier mark is extracted from the code comments, is identified according to the 3rd identifier Annotating information determine the class of service of the object code;
    The interface document is stored into the document library being pre-created corresponding with the class of service of the object code.
  8. 8. terminal device according to claim 7, it is characterised in that the note identified according to first identifier The summary info that information generates the object code includes:
    Obtain the keyword in the first trip code of code segment corresponding with the annotating information of first identifier mark;
    According to the keyword of acquisition judge with the corresponding code segment of annotating information of first identifier mark whether be Category code;
    If code segment corresponding with the annotating information of first identifier mark is category code, according to first identifier The annotating information of mark generates the overall summary info of the object code;
    If code segment corresponding with the annotating information of first identifier mark is function code or method code, according to institute The annotating information for stating the first identifier mark generates the chapters and sections summary info of the object code.
  9. 9. terminal device according to claim 7, it is characterised in that be stored into and the target by the interface document After in the document library being pre-created corresponding to the class of service of code, in addition to:
    After detecting that the object code is changed by the developer, the amended code note of the object code is obtained Solution;
    The amended code comments are explained with the source code pre-saved and contrasted, obtain the amended generation Code explains the difference between source code note, and the source code was explained as the generation of the object code before modification Code is explained;
    Difference between being explained according to the amended code comments and the source code is repaiied to the interface document Order.
  10. 10. according to the terminal device described in claim 9, it is characterised in that the amended code comments and the original Difference between beginning code comments includes:
    The amended code comments with the source code explain compared to increased code comments, deletion code comments And/or the code comments of change;
    The difference according between the amended code comments and source code note is entered to the interface document Row revision includes:
    The annotating information of the second identifier mark is extracted from the increased code comments, according to second identifier The annotating information of mark generates increased parameter information, and the increased parameter information is added into the interface document;
    And/or
    Parameter information corresponding to the code comments of the deletion is deleted from the interface document;
    And/or
    The annotating information of the second identifier mark is extracted from the code comments of the change, according to second identifier The parameter information of the annotating information generation change of mark, and using right in the parameter information replacement interface document of the change The parameter information answered.
CN201710975968.XA 2017-10-19 2017-10-19 A kind of interface document generation method and terminal device Pending CN107885499A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710975968.XA CN107885499A (en) 2017-10-19 2017-10-19 A kind of interface document generation method and terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710975968.XA CN107885499A (en) 2017-10-19 2017-10-19 A kind of interface document generation method and terminal device

Publications (1)

Publication Number Publication Date
CN107885499A true CN107885499A (en) 2018-04-06

Family

ID=61781849

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710975968.XA Pending CN107885499A (en) 2017-10-19 2017-10-19 A kind of interface document generation method and terminal device

Country Status (1)

Country Link
CN (1) CN107885499A (en)

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804083A (en) * 2018-05-23 2018-11-13 有米科技股份有限公司 A kind of code operation method and device
CN108932122A (en) * 2018-06-19 2018-12-04 上海陆家嘴国际金融资产交易市场股份有限公司 Interface document generation method, device, computer equipment and storage medium
CN109298882A (en) * 2018-09-26 2019-02-01 深圳壹账通智能科技有限公司 Management method, computer readable storage medium and the terminal device of interface
CN109375922A (en) * 2018-09-26 2019-02-22 深圳壹账通智能科技有限公司 A kind of automatic generation method and terminal device of interface document
CN109375901A (en) * 2018-09-03 2019-02-22 平安普惠企业管理有限公司 Interface message management method, device, computer equipment and storage medium
CN110196733A (en) * 2019-06-06 2019-09-03 深圳市伊欧乐科技有限公司 A kind of default API document structure tree method, apparatus, equipment and storage medium
CN110308900A (en) * 2019-06-27 2019-10-08 广州华多网络科技有限公司 Generation method, device, computer equipment and the storage medium of page route documents
CN110321154A (en) * 2019-06-25 2019-10-11 北京奇艺世纪科技有限公司 A kind of interface message methods of exhibiting, device and the electronic equipment of micro services
CN110333850A (en) * 2019-05-30 2019-10-15 重庆金融资产交易所有限责任公司 Generation method, device, computer equipment and the storage medium of interface document
CN110377336A (en) * 2019-06-17 2019-10-25 平安普惠企业管理有限公司 Interface document generation method, device, computer equipment and storage medium
CN110806863A (en) * 2019-11-05 2020-02-18 泰康保险集团股份有限公司 Interface document generation method and device, electronic equipment and storage medium
CN110825431A (en) * 2019-11-14 2020-02-21 京东数字科技控股有限公司 Interface document processing method, device, system, storage medium and electronic equipment
CN111078215A (en) * 2019-12-25 2020-04-28 广州华多网络科技有限公司 Software product application method and device, storage medium and electronic equipment
CN111240653A (en) * 2019-12-31 2020-06-05 瑞庭网络技术(上海)有限公司 Interface document generation method and device and readable storage medium
CN111651196A (en) * 2020-06-24 2020-09-11 腾讯科技(深圳)有限公司 Document publishing method, device and server
CN111984228A (en) * 2020-07-09 2020-11-24 招联消费金融有限公司 Interface document processing method and device, computer equipment and storage medium
CN112148356A (en) * 2019-06-28 2020-12-29 腾讯科技(深圳)有限公司 Document generation method, interface development method, device, server and storage medium
CN112162751A (en) * 2020-09-09 2021-01-01 杭州涂鸦信息技术有限公司 Automatic generation method and system of interface document
CN112181472A (en) * 2020-08-31 2021-01-05 贝壳技术有限公司 Code adding method and device based on Flutter, electronic equipment and storage medium
WO2021003913A1 (en) * 2019-07-11 2021-01-14 平安普惠企业管理有限公司 Method and device for processing annotation information, computer apparatus, and storage medium
CN112799659A (en) * 2021-01-12 2021-05-14 杨飞 Method, device and terminal for automatically generating data interface without programming
CN113296763A (en) * 2021-05-24 2021-08-24 北京思特奇信息技术股份有限公司 Application capability management method and system
CN113591422A (en) * 2021-08-03 2021-11-02 眸芯科技(上海)有限公司 System for generating test case flow information in chip verification and application
CN115904482A (en) * 2022-11-30 2023-04-04 杭州巨灵兽智能科技有限公司 Interface document generation method, device, equipment and storage medium
CN108932122B (en) * 2018-06-19 2024-05-28 深圳市小雨滴信息技术有限公司 Interface document generation method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020059348A1 (en) * 2000-11-14 2002-05-16 Cypress Semiconductor Corp. Automatic documentation generation tool and associated method
CN102129365A (en) * 2010-01-20 2011-07-20 阿里巴巴集团控股有限公司 Method and device for generating code documentations
CN103473045A (en) * 2013-08-27 2013-12-25 广州华多网络科技有限公司 Method and device for generating interface documents
CN104484216A (en) * 2014-12-29 2015-04-01 广州唯品会网络技术有限公司 Method and device for generating service interface document and on-line test tool
CN105117233A (en) * 2015-09-14 2015-12-02 百度在线网络技术(北京)有限公司 API calling method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020059348A1 (en) * 2000-11-14 2002-05-16 Cypress Semiconductor Corp. Automatic documentation generation tool and associated method
CN102129365A (en) * 2010-01-20 2011-07-20 阿里巴巴集团控股有限公司 Method and device for generating code documentations
CN103473045A (en) * 2013-08-27 2013-12-25 广州华多网络科技有限公司 Method and device for generating interface documents
CN104484216A (en) * 2014-12-29 2015-04-01 广州唯品会网络技术有限公司 Method and device for generating service interface document and on-line test tool
CN105117233A (en) * 2015-09-14 2015-12-02 百度在线网络技术(北京)有限公司 API calling method and device

Cited By (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108804083A (en) * 2018-05-23 2018-11-13 有米科技股份有限公司 A kind of code operation method and device
CN108804083B (en) * 2018-05-23 2022-01-11 有米科技股份有限公司 Code operation method and device
CN108932122A (en) * 2018-06-19 2018-12-04 上海陆家嘴国际金融资产交易市场股份有限公司 Interface document generation method, device, computer equipment and storage medium
CN108932122B (en) * 2018-06-19 2024-05-28 深圳市小雨滴信息技术有限公司 Interface document generation method, device, computer equipment and storage medium
CN109375901A (en) * 2018-09-03 2019-02-22 平安普惠企业管理有限公司 Interface message management method, device, computer equipment and storage medium
CN109298882A (en) * 2018-09-26 2019-02-01 深圳壹账通智能科技有限公司 Management method, computer readable storage medium and the terminal device of interface
CN109375922A (en) * 2018-09-26 2019-02-22 深圳壹账通智能科技有限公司 A kind of automatic generation method and terminal device of interface document
CN110333850A (en) * 2019-05-30 2019-10-15 重庆金融资产交易所有限责任公司 Generation method, device, computer equipment and the storage medium of interface document
CN110196733A (en) * 2019-06-06 2019-09-03 深圳市伊欧乐科技有限公司 A kind of default API document structure tree method, apparatus, equipment and storage medium
CN110377336A (en) * 2019-06-17 2019-10-25 平安普惠企业管理有限公司 Interface document generation method, device, computer equipment and storage medium
CN110321154A (en) * 2019-06-25 2019-10-11 北京奇艺世纪科技有限公司 A kind of interface message methods of exhibiting, device and the electronic equipment of micro services
CN110308900B (en) * 2019-06-27 2023-08-08 广州方硅信息技术有限公司 Page routing document generation method and device, computer equipment and storage medium
CN110308900A (en) * 2019-06-27 2019-10-08 广州华多网络科技有限公司 Generation method, device, computer equipment and the storage medium of page route documents
CN112148356B (en) * 2019-06-28 2024-03-22 腾讯科技(深圳)有限公司 Document generation method, interface development method, device, server and storage medium
CN112148356A (en) * 2019-06-28 2020-12-29 腾讯科技(深圳)有限公司 Document generation method, interface development method, device, server and storage medium
WO2021003913A1 (en) * 2019-07-11 2021-01-14 平安普惠企业管理有限公司 Method and device for processing annotation information, computer apparatus, and storage medium
CN110806863A (en) * 2019-11-05 2020-02-18 泰康保险集团股份有限公司 Interface document generation method and device, electronic equipment and storage medium
CN110825431A (en) * 2019-11-14 2020-02-21 京东数字科技控股有限公司 Interface document processing method, device, system, storage medium and electronic equipment
CN110825431B (en) * 2019-11-14 2021-07-20 京东数字科技控股有限公司 Interface document processing method, device, system, storage medium and electronic equipment
CN111078215A (en) * 2019-12-25 2020-04-28 广州华多网络科技有限公司 Software product application method and device, storage medium and electronic equipment
CN111078215B (en) * 2019-12-25 2023-04-28 广州方硅信息技术有限公司 Software product application method and device, storage medium and electronic equipment
CN111240653A (en) * 2019-12-31 2020-06-05 瑞庭网络技术(上海)有限公司 Interface document generation method and device and readable storage medium
CN111240653B (en) * 2019-12-31 2024-02-02 瑞庭网络技术(上海)有限公司 Interface document generation method, device and readable storage medium
CN111651196A (en) * 2020-06-24 2020-09-11 腾讯科技(深圳)有限公司 Document publishing method, device and server
CN111984228B (en) * 2020-07-09 2023-12-12 招联消费金融有限公司 Interface document processing method and device, computer equipment and storage medium
CN111984228A (en) * 2020-07-09 2020-11-24 招联消费金融有限公司 Interface document processing method and device, computer equipment and storage medium
CN112181472A (en) * 2020-08-31 2021-01-05 贝壳技术有限公司 Code adding method and device based on Flutter, electronic equipment and storage medium
CN112162751A (en) * 2020-09-09 2021-01-01 杭州涂鸦信息技术有限公司 Automatic generation method and system of interface document
CN112799659A (en) * 2021-01-12 2021-05-14 杨飞 Method, device and terminal for automatically generating data interface without programming
CN113296763A (en) * 2021-05-24 2021-08-24 北京思特奇信息技术股份有限公司 Application capability management method and system
CN113296763B (en) * 2021-05-24 2023-07-04 北京思特奇信息技术股份有限公司 Application capability management method and system
CN113591422A (en) * 2021-08-03 2021-11-02 眸芯科技(上海)有限公司 System for generating test case flow information in chip verification and application
CN113591422B (en) * 2021-08-03 2024-01-30 眸芯科技(上海)有限公司 System for generating test case flow information in chip verification and application
CN115904482A (en) * 2022-11-30 2023-04-04 杭州巨灵兽智能科技有限公司 Interface document generation method, device, equipment and storage medium
CN115904482B (en) * 2022-11-30 2023-09-26 杭州巨灵兽智能科技有限公司 Interface document generation method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107885499A (en) A kind of interface document generation method and terminal device
US9542477B2 (en) Method of automated discovery of topics relatedness
CN108509185B (en) System and method for arbitrary software logic modeling
CN104268428B (en) A kind of visual configuration method calculated for index
CN111813963B (en) Knowledge graph construction method and device, electronic equipment and storage medium
US9465790B2 (en) SVO-based taxonomy-driven text analytics
CN109375922A (en) A kind of automatic generation method and terminal device of interface document
CN103617047A (en) Method, device and processor for developing business processes
CN109508355A (en) A kind of data pick-up method, system and terminal device
US8775392B1 (en) Revision control and configuration management
CN105446952B (en) For handling the method and system of semantic segment
CN106445645B (en) Method and apparatus for executing distributed computing task
US20130151519A1 (en) Ranking Programs in a Marketplace System
US9639587B2 (en) Social network analyzer
CN103077192A (en) Data processing method and system thereof
Misirli et al. Annotation of rule-based models with formal semantics to enable creation, analysis, reuse and visualization
CN107977504A (en) A kind of asymmetric in-core fuel management computational methods, device and terminal device
CN107766036A (en) A kind of construction method of module, construction device and terminal device
CN114168149A (en) Data conversion method and device
CN109542657A (en) The processing method and server of system exception
CN110704635B (en) Method and device for converting triplet data in knowledge graph
US9679092B1 (en) Constraint handling for parameterizable hardware description language
US20150088483A1 (en) Simulated component connector definition and connection process
Winter et al. Deriving and combining mixed graphs from regulatory documents based on constraint relations
JP2022536019A (en) Automatic Resolution of Overspecified and Underspecified in Knowledge Graph

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180406