CN115904482B - Interface document generation method, device, equipment and storage medium - Google Patents

Interface document generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN115904482B
CN115904482B CN202211519714.4A CN202211519714A CN115904482B CN 115904482 B CN115904482 B CN 115904482B CN 202211519714 A CN202211519714 A CN 202211519714A CN 115904482 B CN115904482 B CN 115904482B
Authority
CN
China
Prior art keywords
standard
annotation information
word
words
line
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211519714.4A
Other languages
Chinese (zh)
Other versions
CN115904482A (en
Inventor
陈武
林志可
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Giant Intelligent Technology Co ltd
Original Assignee
Hangzhou Giant Intelligent Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Giant Intelligent Technology Co ltd filed Critical Hangzhou Giant Intelligent Technology Co ltd
Priority to CN202211519714.4A priority Critical patent/CN115904482B/en
Publication of CN115904482A publication Critical patent/CN115904482A/en
Application granted granted Critical
Publication of CN115904482B publication Critical patent/CN115904482B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides a method, a device, equipment and a storage medium for generating an interface document, wherein the method comprises the steps of obtaining a source code and extracting annotation information in the source code; screening and reorganizing standard words in each row of annotation information based on the pre-training model to obtain standard annotation information; and calling an interface document generating tool to perform format conversion on the standard annotation information so as to generate a target interface document. After the annotation information in the source code is extracted, the standard words in the annotation information can be extracted through the pre-training model, unnecessary or spoken words in the annotation information are removed, or the non-standard words are subjected to standardized conversion, so that the annotation information is standardized, the generated interface document is more accurate, the task amount of manual correction is reduced, and the writing efficiency of the interface document is improved.

Description

Interface document generation method, device, equipment and storage medium
Technical Field
The present application relates to the field of information processing technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating an interface document.
Background
The interface document is a document used for communication and communication between front and rear end engineers in the project development process, the front and rear end engineers of the project are separated and developed, the front and rear end engineers are required to define an interface together, the interface document is written, then the development is carried out according to the interface document, and the maintenance is required until the project is finished.
The interface document is converted according to the annotation information in the code, and because of different personal development habits, unnecessary or spoken words exist in the annotation information, so that the generated information of the interface document is inaccurate, manual correction is needed, and the writing efficiency of the interface document is low. Therefore, how to solve the problem that the writing efficiency of the current interface document is low becomes a technical problem to be solved.
Disclosure of Invention
The application provides a method, a device, equipment and a storage medium for generating an interface document, which aim to solve the technical problem of low writing efficiency of the conventional interface document.
In a first aspect, the present application provides an interface document generation method, including the steps of:
acquiring a source code and extracting annotation information in the source code;
screening and reorganizing standard words in each row of annotation information based on the pre-training model to obtain standard annotation information;
and calling an interface document generating tool to perform format conversion on the standard annotation information so as to generate a target interface document.
In a second aspect, the present application also provides an interface document generating apparatus, the interface document generating apparatus comprising:
the annotation information extraction module is used for acquiring source codes and extracting annotation information in the source codes;
the standard annotation information acquisition module is used for screening and reorganizing standard words in each row of annotation information based on the pre-training model to obtain standard annotation information;
and the target interface document generation module is used for calling an interface document generation tool, carrying out format conversion on the standard annotation information and generating a target interface document.
In a third aspect, the present application also provides a computer device comprising a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program when executed by the processor implements the steps of the interface document generation method as described above.
In a fourth aspect, the present application also provides a computer readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of an interface document generation method as described above.
The application provides a method, a device, equipment and a storage medium for generating an interface document, which are used for acquiring a source code and extracting annotation information in the source code; screening and reorganizing standard words in each row of annotation information based on the pre-training model to obtain standard annotation information; and calling an interface document generating tool to perform format conversion on the standard annotation information so as to generate a target interface document. Through the method, after the annotation information in the source code is extracted, the standard words in the annotation information can be extracted through the pre-training model, unnecessary or spoken words in the annotation information are removed, or the non-standard words are subjected to standardized conversion, so that the annotation information is standardized, the generated interface document is more accurate, the task amount of manual correction is reduced, and the writing efficiency of the interface document is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a diagram of an interface document generation system provided by an embodiment of the present application;
FIG. 2 is a flowchart of a first embodiment of an interface document generation method according to an embodiment of the present application;
FIG. 3 is a flowchart of a second embodiment of an interface document generation method according to an embodiment of the present application;
FIG. 4 is a flowchart of a third embodiment of an interface document generation method according to an embodiment of the present application;
FIG. 5 is a schematic block diagram of an interface document generation apparatus provided by an embodiment of the present application;
fig. 6 is a schematic block diagram of a computer device according to an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The flow diagrams depicted in the figures are merely illustrative and not necessarily all of the elements and operations/steps are included or performed in the order described. For example, some operations/steps may be further divided, combined, or partially combined, so that the order of actual execution may be changed according to actual situations.
Some embodiments of the present application are described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
The embodiment of the application provides an interface document generation method, an interface document generation device, computer equipment and a storage medium, which are used for extracting standard words in annotation information through a pre-training model, so that the annotation information is standardized, the accuracy of the interface document is improved, and the writing efficiency of the interface document is improved.
As shown in fig. 1, fig. 1 is an interface document generating system according to an embodiment of the present application, where the system includes a terminal and a server, the terminal is communicatively connected to the server, and the server is communicatively connected to a standard word stock.
The terminal comprises electronic equipment such as a mobile phone, a tablet personal computer, a notebook computer, a desktop computer, a personal digital assistant, wearable equipment and the like.
Wherein the server comprises a single server or a cluster of servers.
Hereinafter, an interface document generation method provided by an embodiment of the present application will be described in detail based on the interface document generation system.
Referring to fig. 2, fig. 2 is a flowchart of a first embodiment of an interface document generating method according to an embodiment of the present application.
As shown in fig. 2, the interface document generation method includes steps S101 to S103.
Step S101, acquiring a source code and extracting annotation information in the source code;
in this embodiment, in the code editing process, in order to facilitate reading and understanding of the program code, a developer is required to edit the corresponding annotation information, and the annotation language is accurate, easy to understand and simple.
In an embodiment, the annotation information comprises interface information.
Step S102, screening and reorganizing standard words in each row of annotation information based on a pre-training model to obtain standard annotation information;
in this embodiment, the pre-training model may remove unnecessary vocabularies in the annotation information, and normalize non-standard vocabularies such as spoken vocabularies, so as to convert the annotation information into standard language annotation information, thereby improving accuracy of the interface document.
In an embodiment, the pre-training model may be trained according to developer input or source code writing specifications, so that the pre-training model may identify standard words and identify standard words corresponding to spoken words, and therefore annotation information may be converted in a standardized manner through the pre-training model.
In an embodiment, the training process of the pre-training model may further include training the association relationship between the standard word and the corresponding source code, and training the association relationship between the standard word and the word, for example, when one code in the source code corresponds to a plurality of standard words, definition corresponding to the code may be defined by other codes used in combination with the code, and further definition may be performed on the standard word corresponding to the code, so that annotation information of the standard word in the scene is unique.
In an embodiment, the training process of the pre-training model may further include training of the paraphrasing words, in the annotation information, because of factors such as personal habits of developers, different developers have different naming modes for paraphrasing the same code, so that often a plurality of annotation words corresponding to one code may exist, but the meaning of expression is the same, that is, a plurality of annotation words may correspond to the same standard word, so that the paraphrasing words corresponding to the standard word may be learned through training of the pre-training model, and in the application process, the paraphrasing words are accurately identified and converted into the same standard word.
And step S103, calling an interface document generation tool, and carrying out format conversion on the standard annotation information to generate a target interface document.
In this embodiment, after normalization of the annotation information is completed, the annotation information may be subjected to format conversion by the interface document generation tool, thereby generating a target interface document.
In one embodiment, the interface document generation tool may be a swagger, gdoc, or the like tool. For example, gdoc is mainly composed of a parser, a mapper, a value generator and a data processor, wherein the parser extracts and generates corresponding defined entities by scanning classes, fields and comments on the method in the java file and more relevant rules; the mapper is used for converting the extracted entity into a format required by the corresponding API platform; the value generator mainly generates test data corresponding to the relevant fields; the data processor mainly aggregates data to output, such as writing into a database, calling an HTTP interface, generating a file, and the like.
The embodiment provides an interface document generation method, which comprises the steps of obtaining source codes and extracting annotation information in the source codes; screening and reorganizing standard words in each row of annotation information based on the pre-training model to obtain standard annotation information; and calling an interface document generating tool to perform format conversion on the standard annotation information so as to generate a target interface document. After the annotation information in the source code is extracted, the standard words in the annotation information can be extracted through the pre-training model, unnecessary or spoken words in the annotation information are removed, or the non-standard words are subjected to standardized conversion, so that the annotation information is standardized, the generated interface document is more accurate, the task amount of manual correction is reduced, and the writing efficiency of the interface document is improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a second embodiment of an interface document generating method according to an embodiment of the present application.
As shown in fig. 3, based on the embodiment shown in fig. 2, in this embodiment, the step S102 specifically includes:
step S201, inputting the annotation information into the pre-training model line by line, and extracting keywords in each line of annotation information based on the pre-training model;
in an embodiment, annotation information can be input into the pre-training model line by line, and after keyword extraction and standard word conversion of one line of annotation information are completed, normalization of the next line of annotation information is performed, so that recombination interference and error of the annotation information are avoided to the greatest extent.
In one embodiment, the annotation information may be segmented according to the execution order or node in the source code, and the annotation information segments may be normalized sequentially.
In one embodiment, annotation information may be entered into the pre-trained model at one time, normalizing the annotation information as a whole.
Step S202, converting keywords in each row of annotation information into corresponding standard words based on a standard word stock and the pre-training model;
in this embodiment, the pre-training model is associated with a standard word stock, annotation information is input into the pre-training model in rows, and the pre-training model splits the annotation information according to standard words in the standard word stock and matches the annotation information with the standard words, so as to extract keywords in the annotation information.
In an embodiment, the pre-training model can identify the vocabulary in the annotation information through image recognition or character recognition and the like, split the vocabulary, then match the split vocabulary with standard words in the standard vocabulary, so as to identify the keywords in the annotation information, and replace the keywords according to the standard words corresponding to the keywords.
In one embodiment, when the keyword which is not matched with the standard word exists, the keyword is used as a candidate standard word, and whether the candidate standard word is a near meaning word of the standard word existing in the standard word stock is judged based on the pre-training model.
In one embodiment, the keywords extracted from the annotation information may not be standard words, and when matching, the keywords may be matched with standard words similar to the definitions of the keywords, or may be other words not entered into the standard word stock.
In an embodiment, other keywords and/or standard words in the line annotation information corresponding to the candidate standard word are obtained, and at least one similar standard word of the candidate standard word in the standard word bank is determined based on the keywords and/or standard words; calculating the approximation degree of the candidate standard word and the similar standard word based on the pre-training model, the key word and/or the standard word; when at least one similarity is larger than or equal to a preset similarity, screening the similar standard words with the highest similarity as the standard words corresponding to the candidate standard words.
In an embodiment, the candidate standard word may correspond to a plurality of different paraphrases, where the paraphrases of the candidate standard word may be defined in combination with the usage scenario of the candidate standard word, for example, the word meaning of the candidate standard word is inferred according to other standard words or keywords in the line annotation information where the candidate standard word is located.
In an embodiment, when the candidate standard word is matched with a plurality of standard words, the similarity between the candidate standard word and each matching standard word can be calculated according to the associated vocabulary of the candidate standard word in the current annotation information, and when the similarity is greater than a preset similarity (for example, 0.8, the maximum similarity is 1), the corresponding matching standard word can be considered as a replacement word of the candidate standard word.
In an embodiment, when the similarity between the plurality of matching standard words and the candidate standard word is greater than a preset similarity, the similarity is ranked, and the standard word with the highest similarity is selected as the replacement word of the candidate standard word.
In an embodiment, when the approximations of the matching standard word and the candidate standard word are smaller than the preset approximation, the candidate standard word and the matching standard word may be sent to the development terminal, and the developer makes a decision, specifies or modifies.
In an embodiment, when the candidate standard word is a paraphrase of an existing standard word in the standard word library, the corresponding existing standard word is used as the standard word corresponding to the candidate standard word.
In an embodiment, a keyword which is not matched with a corresponding standard word is used as a candidate standard word, when a standard word with similar paraphrasing of the candidate standard word exists in a standard word library, the candidate standard word can be considered to be a similar meaning word written by personal habit of a developer, and the candidate standard word can be replaced by the similar meaning standard word.
In one embodiment, when the paraphrasing of the candidate standard word does not exist in the standard word library, the candidate standard word is sent to a development end, and indication information fed back by the development end is received; wherein the indication information comprises confirmation information and/or modification information;
in an embodiment, when a candidate standard word is not searched in the standard word library and an existing standard word with similar paraphrasing is not matched, the candidate standard word may be a standard word written by a developer or not recorded in the standard word library, at this time, the candidate standard word may be sent to the development terminal, the developer determines whether to write the error or not or whether to not record the standard word, and after confirmation, the developer feeds back an indication information, so that the preset training model performs a corresponding operation on the candidate standard word.
In an embodiment, when the indication information includes the standard word modified by the development end, the modified standard word is used as the standard word corresponding to the candidate standard word;
or based on the confirmation information in the indication information, the candidate standard word is used as a standard word and is input into the standard word stock.
In one embodiment, when the candidate standard word is an error word, the development end may feed back a modified word, and then re-match the modified word, so as to replace the candidate standard word with the matched standard word.
In an embodiment, the development end may directly designate the standard word corresponding to the candidate standard word, and replace the candidate standard word with the designated standard word.
In one embodiment, when the developer determines that the candidate standard word is a standard word not input into the standard word bank, the candidate standard word is directly adopted without replacement, and the candidate standard word is input into the standard word bank to enrich the vocabulary of the standard word bank.
Step 203, reorganizing the standard words corresponding to the annotation information of each row based on the extraction sequence of each standard word in the annotation information of each row, so as to obtain the standard annotation information corresponding to the annotation information of each row.
In this embodiment, in order to avoid damaging the paraphrasing of the original annotation information, after the keywords of the line annotation information are converted into standard words, the standard words corresponding to the keywords are recombined according to the corresponding sequence according to the extraction sequence of the keywords, so as to avoid the paraphrasing error caused by the sequence error of the standard words.
Referring to fig. 4, fig. 4 is a flowchart illustrating a third embodiment of an interface document generating method according to an embodiment of the present application.
As shown in fig. 4, based on the embodiment shown in fig. 2, in this embodiment, after step S103, the method specifically further includes:
step 301, based on the execution sequence of each line of execution codes in the source code, constructing a standard annotation information tree by taking standard annotation information corresponding to each line of execution codes as a node;
step S302, associating each node of the standard annotation information tree with the corresponding annotation information and each document information based on the annotation information corresponding to each line of standard annotation information and each document information in the target interface document corresponding to each line of standard annotation information.
In an embodiment, standard annotation information corresponding to each line of execution codes can be sequentially arranged in a tree form such as a binary tree, the standard annotation information corresponding to each line of execution codes is used as each node of a tree diagram, and the execution codes corresponding to each standard annotation information and the corresponding document information segments in an interface document are associated, so that the execution codes and the document information corresponding to each standard annotation information can be conveniently searched.
In an embodiment, when the source code needs to be modified, modifying standard annotation information on nodes corresponding to the line labels in the standard annotation information tree based on line labels corresponding to modified line codes and modified annotation information corresponding to the modified line codes to obtain modified standard annotation information; and modifying the document information corresponding to the modified standard annotation information based on the association relation between the standard annotation information tree node and the target interface document, and updating the target interface document.
In one embodiment, the source code is adjusted accordingly during the project development process according to the change in demand, whereby the developer needs to maintain and update the interface document continuously, in real time and accurately. When the source code is modified, according to the execution code associated with each standard annotation information in the standard annotation information tree, the corresponding standard annotation information node is accurately positioned in the standard annotation information tree, the document information in the corresponding interface document is accurately positioned, the standard annotation information and the document information are modified and updated, and the updating rate of the interface document is improved.
Referring to fig. 5, fig. 5 is a schematic block diagram of an interface document generating apparatus for performing the aforementioned interface document generating method according to an embodiment of the present application. Wherein the interface document generating device can be configured in the terminal.
As shown in fig. 5, the interface document generating apparatus 100 includes: the system comprises an annotation information extraction module 101, a standard annotation information acquisition module 102 and a target interface document generation module 103.
The annotation information extraction module 101 is configured to obtain a source code and extract annotation information in the source code;
the standard annotation information acquisition module 102 is used for screening and reorganizing standard words in each row of annotation information based on the pre-training model to obtain standard annotation information;
and the target interface document generation module 103 is used for calling an interface document generation tool, carrying out format conversion on the standard annotation information and generating a target interface document.
In an embodiment, the standard annotation information obtaining module 102 is further configured to input the annotation information into the pre-training model line by line, and extract keywords in the annotation information of each line based on the pre-training model; based on a standard word stock and the pre-training model, converting keywords in each row of annotation information into corresponding standard words; and reorganizing the standard words corresponding to each line of annotation information based on the extraction sequence of each standard word in each line of annotation information to obtain the standard annotation information corresponding to each line of annotation information.
In an embodiment, the standard annotation information obtaining module 102 is further configured to, when the keyword that is not matched with the standard word exists, use the keyword as a candidate standard word, and determine, based on the pre-training model, whether the candidate standard word is a near meaning word of a standard word existing in the standard word stock; when the candidate standard word is a near meaning word of the existing standard word in the standard word library, the corresponding existing standard word is used as the standard word corresponding to the candidate standard word.
In an embodiment, the standard annotation information obtaining module 102 is further configured to send the candidate standard word to a development end and receive indication information fed back by the development end when the paraphrasing of the candidate standard word does not exist in the standard word stock; wherein the indication information comprises confirmation information and/or modification information; when the indication information comprises the standard words modified by the development end, the modified standard words are used as standard words corresponding to the candidate standard words; or based on the confirmation information in the indication information, the candidate standard word is used as a standard word and is input into the standard word stock.
In an embodiment, the standard annotation information obtaining module 102 is further configured to obtain other keywords and/or standard words in the line annotation information corresponding to the candidate standard word, and determine at least one similar standard word of the candidate standard word in the standard word bank based on the keywords and/or standard words; calculating the approximation degree of the candidate standard word and the similar standard word based on the pre-training model, the key word and/or the standard word; when at least one similarity is larger than or equal to a preset similarity, screening the similar standard words with the highest similarity as the standard words corresponding to the candidate standard words.
In one embodiment, the interface document generating apparatus 100 further includes a standard annotation information tree creation module, configured to construct a standard annotation information tree using standard annotation information corresponding to each line of execution codes as a node based on an execution sequence of each line of execution codes in the source code; and based on the annotation information corresponding to each row of standard annotation information and each row of document information corresponding to the target interface document, associating each node of the standard annotation information tree with the corresponding annotation information and each document information.
In an embodiment, the interface document generating apparatus 100 further includes an interface document updating module, configured to, when the source code needs to be modified, modify standard annotation information on a node corresponding to the line tag in the standard annotation information tree based on a line tag corresponding to a modified line code and modified annotation information corresponding to the modified line code, to obtain modified standard annotation information; and modifying the document information corresponding to the modified standard annotation information based on the association relation between the standard annotation information tree node and the target interface document, and updating the target interface document.
It should be noted that, for convenience and brevity of description, specific working processes of the above-described apparatus and each module may refer to corresponding processes in the foregoing embodiment of the interface document generating method, which are not described herein again.
The apparatus provided by the above embodiments may be implemented in the form of a computer program which may be run on a computer device as shown in fig. 6.
Referring to fig. 6, fig. 6 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device may be a terminal.
With reference to FIG. 6, the computer device includes a processor, memory, and a network interface connected by a system bus, where the memory may include a non-volatile storage medium and an internal memory.
The non-volatile storage medium may store an operating system and a computer program. The computer program comprises program instructions that, when executed, cause a processor to perform any of a number of interface document generation methods.
The processor is used to provide computing and control capabilities to support the operation of the entire computer device.
The internal memory provides an environment for the execution of a computer program in a non-volatile storage medium that, when executed by a processor, causes the processor to perform any of the interface document generation methods.
The network interface is used for network communication such as transmitting assigned tasks and the like. It will be appreciated by those skilled in the art that the structure shown in FIG. 5 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
It should be appreciated that the processor may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Wherein in one embodiment the processor is configured to run a computer program stored in the memory to implement the steps of:
acquiring a source code and extracting annotation information in the source code;
screening and reorganizing standard words in each row of annotation information based on the pre-training model to obtain standard annotation information;
and calling an interface document generating tool to perform format conversion on the standard annotation information so as to generate a target interface document.
In an embodiment, when the processor filters and reorganizes standard words in each line of annotation information based on the pre-training model, the processor is configured to implement:
inputting the annotation information into the pre-training model line by line, and extracting keywords in each line of annotation information based on the pre-training model;
based on a standard word stock and the pre-training model, converting keywords in each row of annotation information into corresponding standard words;
and reorganizing the standard words corresponding to each line of annotation information based on the extraction sequence of each standard word in each line of annotation information to obtain the standard annotation information corresponding to each line of annotation information.
In an embodiment, when implementing the standard word library and the pre-training model, the processor is configured to implement:
when the keywords which are not matched with the standard words exist, the keywords are used as candidate standard words, and whether the candidate standard words are the similar meaning words of the standard words existing in the standard word stock is judged based on the pre-training model;
when the candidate standard word is a near meaning word of the existing standard word in the standard word library, the corresponding existing standard word is used as the standard word corresponding to the candidate standard word.
In an embodiment, after implementing the pre-training model, the processor is further configured to, after implementing the determining whether the candidate standard word is a paraphrase of a standard word existing in the standard word library, implement:
when the standard word library does not contain the near meaning word of the candidate standard word, the candidate standard word is sent to a development end, and indication information fed back by the development end is received; wherein the indication information comprises confirmation information and/or modification information;
when the indication information comprises the standard words modified by the development end, the modified standard words are used as standard words corresponding to the candidate standard words;
or based on the confirmation information in the indication information, the candidate standard word is used as a standard word and is input into the standard word stock.
In an embodiment, when implementing the pre-training model, the processor is configured to, when determining whether the candidate standard word is a paraphrasing word of a standard word existing in the standard word library, implement:
acquiring other keywords and/or standard words in the line annotation information corresponding to the candidate standard words, and determining at least one similar standard word of the candidate standard words in the standard word bank based on the keywords and/or standard words;
calculating the approximation degree of the candidate standard word and the similar standard word based on the pre-training model, the key word and/or the standard word;
when at least one similarity is larger than or equal to a preset similarity, screening the similar standard words with the highest similarity as the standard words corresponding to the candidate standard words.
In an embodiment, after implementing the calling interface document generation tool to perform format conversion on the standard annotation information and generate a target interface document, the processor is further configured to implement:
based on the execution sequence of each line of execution codes in the source codes, standard annotation information corresponding to each line of execution codes is used as a node to construct a standard annotation information tree;
and based on the annotation information corresponding to each row of standard annotation information and each row of document information corresponding to the target interface document, associating each node of the standard annotation information tree with the corresponding annotation information and each document information.
In an embodiment, after implementing the standard annotation information corresponding to each line of annotation information, the processor is further configured to, after associating each document information corresponding to each line of standard annotation information of the target interface document with each node of the annotation information tree:
when the source code needs to be modified, modifying the standard annotation information of the node corresponding to the line label in the standard annotation information tree based on the line label corresponding to the modified line code and the modified annotation information corresponding to the modified line code to obtain modified standard annotation information;
and modifying the document information corresponding to the modified standard annotation information based on the association relation between the standard annotation information tree node and the target interface document, and updating the target interface document.
The computer readable storage medium may be an internal storage unit of the computer device according to the foregoing embodiment, for example, a hard disk or a memory of the computer device. The computer readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, which are provided on the computer device.
While the application has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the application. Therefore, the protection scope of the application is subject to the protection scope of the claims.

Claims (6)

1. A method of generating an interface document, the method comprising the steps of:
acquiring a source code and extracting annotation information in the source code;
screening and reorganizing standard words in each row of annotation information based on the pre-training model to obtain standard annotation information;
calling an interface document generation tool to perform format conversion on the standard annotation information to generate a target interface document;
based on the execution sequence of each line of execution codes in the source codes, standard annotation information corresponding to each line of execution codes is used as a node to construct a standard annotation information tree;
establishing association between each node of the standard annotation information tree and the corresponding annotation information and each document information based on the annotation information corresponding to each line of standard annotation information and each document information in the target interface document corresponding to each line of standard annotation information;
the method for obtaining the standard annotation information comprises the steps of:
inputting the annotation information into the pre-training model line by line, and extracting keywords in each line of annotation information based on the pre-training model;
based on a standard word stock and the pre-training model, converting keywords in each row of annotation information into corresponding standard words;
when the keywords which are not matched with the standard words exist, the keywords are used as candidate standard words, and whether the candidate standard words are the similar meaning words of the standard words existing in the standard word stock is judged based on the pre-training model;
when the candidate standard word is a near meaning word of the existing standard word in the standard word library, the corresponding existing standard word is used as the standard word corresponding to the candidate standard word;
based on the extraction sequence of each standard word in each line of annotation information, reorganizing the standard words corresponding to each line of annotation information to obtain the standard annotation information corresponding to each line of annotation information;
the step of judging whether the candidate standard word is a near meaning word of the standard word existing in the standard word bank based on the pre-training model comprises the following steps:
acquiring other keywords and/or standard words in the line annotation information corresponding to the candidate standard words, and determining at least one similar standard word of the candidate standard words in the standard word bank based on the keywords and/or standard words;
calculating the approximation degree of the candidate standard word and the similar standard word based on the pre-training model, the key word and/or the standard word;
when at least one similarity is larger than or equal to a preset similarity, screening the similar standard words with the highest similarity as the standard words corresponding to the candidate standard words.
2. The method according to claim 1, wherein after determining whether the candidate standard word is a paraphrase of a standard word existing in the standard word library based on the pre-training model, further comprising:
when the standard word library does not contain the near meaning word of the candidate standard word, the candidate standard word is sent to a development end, and indication information fed back by the development end is received; wherein the indication information comprises confirmation information and/or modification information;
when the indication information comprises the standard words modified by the development end, the modified standard words are used as standard words corresponding to the candidate standard words;
or based on the confirmation information in the indication information, the candidate standard word is used as a standard word and is input into the standard word stock.
3. The interface document generation method according to claim 1, wherein after associating each document information of each line of standard annotation information corresponding to the target interface document with each node of the annotation information tree based on the standard annotation information corresponding to each line of annotation information, further comprising:
when the source code needs to be modified, modifying the standard annotation information of the node corresponding to the line label in the standard annotation information tree based on the line label corresponding to the modified line code and the modified annotation information corresponding to the modified line code to obtain modified standard annotation information;
and modifying the document information corresponding to the modified standard annotation information based on the association relation between the standard annotation information tree node and the target interface document, and updating the target interface document.
4. An interface document generation apparatus, characterized in that the interface document generation apparatus comprises:
the annotation information extraction module is used for acquiring source codes and extracting annotation information in the source codes;
the standard annotation information acquisition module is used for screening and reorganizing standard words in each row of annotation information based on the pre-training model to obtain standard annotation information;
the target interface document generation module is used for calling an interface document generation tool, carrying out format conversion on the standard annotation information and generating a target interface document;
the standard annotation information tree building module is used for building a standard annotation information tree by taking standard annotation information corresponding to each line of execution codes as a node based on the execution sequence of each line of execution codes in the source code; establishing association between each node of the standard annotation information tree and the corresponding annotation information and each document information based on the annotation information corresponding to each line of standard annotation information and each document information in the target interface document corresponding to each line of standard annotation information;
the method for obtaining the standard annotation information comprises the steps of:
inputting the annotation information into the pre-training model line by line, and extracting keywords in each line of annotation information based on the pre-training model;
based on a standard word stock and the pre-training model, converting keywords in each row of annotation information into corresponding standard words;
when the keywords which are not matched with the standard words exist, the keywords are used as candidate standard words, and whether the candidate standard words are the similar meaning words of the standard words existing in the standard word stock is judged based on the pre-training model;
when the candidate standard word is a near meaning word of the existing standard word in the standard word library, the corresponding existing standard word is used as the standard word corresponding to the candidate standard word;
based on the extraction sequence of each standard word in each line of annotation information, reorganizing the standard words corresponding to each line of annotation information to obtain the standard annotation information corresponding to each line of annotation information;
the step of judging whether the candidate standard word is a near meaning word of the standard word existing in the standard word bank based on the pre-training model comprises the following steps:
acquiring other keywords and/or standard words in the line annotation information corresponding to the candidate standard words, and determining at least one similar standard word of the candidate standard words in the standard word bank based on the keywords and/or standard words;
calculating the approximation degree of the candidate standard word and the similar standard word based on the pre-training model, the key word and/or the standard word;
when at least one similarity is larger than or equal to a preset similarity, screening the similar standard words with the highest similarity as the standard words corresponding to the candidate standard words.
5. A computer device comprising a processor, a memory, and a computer program stored on the memory and executable by the processor, wherein the computer program when executed by the processor implements the steps of the interface document generation method of any of claims 1 to 3.
6. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program, wherein the computer program, when executed by a processor, implements the steps of the interface document generation method of any of claims 1 to 3.
CN202211519714.4A 2022-11-30 2022-11-30 Interface document generation method, device, equipment and storage medium Active CN115904482B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211519714.4A CN115904482B (en) 2022-11-30 2022-11-30 Interface document generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211519714.4A CN115904482B (en) 2022-11-30 2022-11-30 Interface document generation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115904482A CN115904482A (en) 2023-04-04
CN115904482B true CN115904482B (en) 2023-09-26

Family

ID=86482207

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211519714.4A Active CN115904482B (en) 2022-11-30 2022-11-30 Interface document generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115904482B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116562271B (en) * 2023-07-10 2023-10-10 之江实验室 Quality control method and device for electronic medical record, storage medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861927A (en) * 2017-09-21 2018-03-30 广州视源电子科技股份有限公司 Document annotation, device, readable storage medium storing program for executing and computer equipment
CN107885499A (en) * 2017-10-19 2018-04-06 平安壹钱包电子商务有限公司 A kind of interface document generation method and terminal device
CN110955416A (en) * 2019-10-12 2020-04-03 平安普惠企业管理有限公司 Interface document generation method, device, equipment and computer storage medium
CN112559684A (en) * 2020-12-10 2021-03-26 中科院计算技术研究所大数据研究院 Keyword extraction and information retrieval method
CN112632292A (en) * 2020-12-23 2021-04-09 深圳壹账通智能科技有限公司 Method, device and equipment for extracting service keywords and storage medium
CN114201215A (en) * 2021-11-19 2022-03-18 广东三维家信息科技有限公司 Interface document generation method and device, electronic equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10127214B2 (en) * 2014-12-09 2018-11-13 Sansa Al Inc. Methods for generating natural language processing systems

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107861927A (en) * 2017-09-21 2018-03-30 广州视源电子科技股份有限公司 Document annotation, device, readable storage medium storing program for executing and computer equipment
CN107885499A (en) * 2017-10-19 2018-04-06 平安壹钱包电子商务有限公司 A kind of interface document generation method and terminal device
CN110955416A (en) * 2019-10-12 2020-04-03 平安普惠企业管理有限公司 Interface document generation method, device, equipment and computer storage medium
CN112559684A (en) * 2020-12-10 2021-03-26 中科院计算技术研究所大数据研究院 Keyword extraction and information retrieval method
CN112632292A (en) * 2020-12-23 2021-04-09 深圳壹账通智能科技有限公司 Method, device and equipment for extracting service keywords and storage medium
CN114201215A (en) * 2021-11-19 2022-03-18 广东三维家信息科技有限公司 Interface document generation method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN115904482A (en) 2023-04-04

Similar Documents

Publication Publication Date Title
CN107220235B (en) Speech recognition error correction method and device based on artificial intelligence and storage medium
CN109086199B (en) Method, terminal and storage medium for automatically generating test script
US11010673B2 (en) Method and system for entity relationship model generation
CN110795938B (en) Text sequence word segmentation method, device and storage medium
CN111079432B (en) Text detection method and device, electronic equipment and storage medium
CN112540862A (en) Interface document data generation method, device, equipment and storage medium
US20220414463A1 (en) Automated troubleshooter
CN115904482B (en) Interface document generation method, device, equipment and storage medium
US20230177267A1 (en) Automated classification and interpretation of life science documents
CN111325031B (en) Resume analysis method and device
CN112784009A (en) Subject term mining method and device, electronic equipment and storage medium
CN114647732A (en) Weak supervision-oriented text classification system, method and device
CN116822464A (en) Text error correction method, system, equipment and storage medium
CN109344374B (en) Report generation method and device based on big data, electronic equipment and storage medium
CN112464927B (en) Information extraction method, device and system
CN113642569A (en) Unstructured data document processing method and related equipment
CN115345600B (en) RPA flow generation method and device
CN116860747A (en) Training sample generation method and device, electronic equipment and storage medium
CN114201961A (en) Comment prediction method, device, equipment and readable storage medium
WO2023007791A1 (en) Program code automatic generation system
CN113158988B (en) Financial statement processing method, device and computer readable storage medium
CN115130437A (en) Intelligent document filling method and device and storage medium
CN112733517B (en) Method for checking requirement template conformity, electronic equipment and storage medium
CN110780850B (en) Requirement case auxiliary generation method and device, computer equipment and storage medium
CN113763949A (en) Speech recognition correction method, electronic device, and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant