CN113094036B - Software engineering directory structure annotation aerial view generation method and system - Google Patents

Software engineering directory structure annotation aerial view generation method and system Download PDF

Info

Publication number
CN113094036B
CN113094036B CN202110418957.8A CN202110418957A CN113094036B CN 113094036 B CN113094036 B CN 113094036B CN 202110418957 A CN202110418957 A CN 202110418957A CN 113094036 B CN113094036 B CN 113094036B
Authority
CN
China
Prior art keywords
tree
annotation
folder
file
directory
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
CN202110418957.8A
Other languages
Chinese (zh)
Other versions
CN113094036A (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.)
Ropt Technology Group Co ltd
Ropt Xiamen Big Data Group Co ltd
Original Assignee
Lop Xiamen System Integration Co ltd
Ropt Technology Group 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 Lop Xiamen System Integration Co ltd, Ropt Technology Group Co ltd filed Critical Lop Xiamen System Integration Co ltd
Priority to CN202110418957.8A priority Critical patent/CN113094036B/en
Publication of CN113094036A publication Critical patent/CN113094036A/en
Application granted granted Critical
Publication of CN113094036B publication Critical patent/CN113094036B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a method and a system for generating a software engineering directory structure annotation aerial view, which comprises the steps of compiling an annotation description of a file or a folder by using a file header annotation and an annotation file; traversing all contents under the item folder by using a directory tree recursion algorithm, extracting the annotation description, and generating a directory structure tree; and rendering the directory structure tree into an editable tree, and exporting the directory structure tree to an initial aerial view for storage. By using the method and the system, the overview of the project structure can be realized, and a convenient way is provided for project research personnel to quickly know the project.

Description

Software engineering directory structure annotation aerial view generation method and system
Technical Field
The invention relates to the technical field of computer software engineering, in particular to a method and a system for generating a software engineering catalogue structure annotation aerial view.
Background
Software structure refers to a hierarchical schema that constructs the processes, methods, and representations of software from its constituent software components. The software structure mainly comprises a program structure and a document structure. The program structure has two layers of meanings, namely a data structure and a control structure of the program; another refers to the process, method, and representation of a program consisting of program units (modules) that are one level lower than the program. In the latter sense, both block and nested structures are representative. The block structure is natural, all parts are connected through some common variables, the nesting structure introduces locality and dynamics on the basis of nesting subprograms so as to reduce the initial information amount of the program, and the nesting structure is not as intuitive as the block structure and is inconvenient to debug.
Some programs are of a single module structure and some are of a multi-module structure. The modules are inseparable in program logic, can be written in different programming languages, can be separately compiled by corresponding compilers, and can be combined with other program units and loaded into a computer to run. Due to the requirement of writing a large program and the fact that the module can be used for many times, modularization is a good means. A large program consisting of a set of modules can have three structures, namely a sequential structure, a concurrent structure, and a distributed structure. The sequential structured programming is the oldest, and the programming language used is a sequential programming language, such as ALGOL, FORTRAN, C, etc. The concurrent structured program consists of several modules that can be executed simultaneously. The modules can be executed in parallel on a plurality of processors or can be executed in a cross way on the same processor, and the adopted programming language is a concurrent programming language, such as concurrent PASCAL, Modula-2 and the like. The distributed structure program is composed of several modules which can be independently run, these modules can be distributed in a distributed system, and can be simultaneously run on several computers, and the adopted programming language is distributed programming language. For large programs, a mixture of these three structures is also possible.
The directory structure of the large software engineering project is complex and the hierarchy is deep. The hierarchical structure of the catalog cannot be intuitively known, so that the learning cost of other people for the project is high, and the difficulty of taking over the project is high.
Disclosure of Invention
The invention provides a method and a system for generating a software engineering catalogue structure annotation bird's-eye view, which are used for solving the technical problems that in the prior art, the catalogue structure of a large software engineering project is very deep in complex hierarchy, the catalogue hierarchy structure cannot be intuitively understood, and the learning cost of other people on the project is high, and the difficulty of accepting the project is large.
According to one aspect of the invention, a method for generating a software engineering catalog structure annotation bird's-eye view is provided, which comprises the following steps:
s1: writing an annotation description of a file or a folder by using the file header annotation and the annotation file;
s2: traversing all contents under the item folder by using a directory tree recursion algorithm, extracting annotation descriptions and generating a directory structure tree;
s3: the directory structure tree is rendered as an editable tree and exported as an initial aerial view store.
In some specific embodiments, the directory tree recurrence algorithm in step S2 is a directory tree recurrence algorithm with an ignore condition. By means of which the required data for generating the directory structure tree can be recursively obtained.
In some specific embodiments, step S2 specifically includes: in the process of recursively reading child nodes of the project folder, folders, folder nodes or files of predetermined types are ignored, and the generated directory structure tree is tree data expressing a folder structure.
In some specific embodiments, the predetermined type of folder, folder node, or file comprises dirName or fileName of dirTreeIgnore.
In some specific embodiments, the carrier of the initial aerial view comprises a picture and an html file. Various carrier forms can facilitate the output of the bird's-eye view.
In some specific embodiments, step S3 is followed by: and traversing all contents in the project folder by utilizing a directory and file modification time comparison algorithm, and updating the initial aerial view.
In some specific embodiments, updating the initial aerial view specifically comprises: in response to the fact that the modified content time attribute mtime of the current node is consistent with the modified content time attribute mtime of the initial node, extracting and updating data of the current node to a directory structure tree of the initial aerial view; and responding to the inconsistency of the last change time attribute mtime of the current node and the initial node, and continuing the recursion. The traversal efficiency can be improved by means of the comparison algorithm of the directory and the file modification time.
According to a second aspect of the present invention, there is provided a computer readable storage medium having stored thereon one or more computer programs which, when executed by a computer processor, implement the method of any of the above.
According to a third aspect of the present invention, a system for generating a software engineering catalog structure annotation bird's-eye view comprises:
an annotation description writing unit: configuring an annotation specification for writing a file or folder with a header annotation and an annotation file;
a directory structure tree generation unit: the method comprises the steps that a directory tree recursion algorithm is configured to traverse all contents under a project folder, annotation descriptions are extracted, and a directory structure tree is generated;
bird's eye view derivation unit: configured to render the directory structure tree as an editable tree and export to the initial aerial view storage.
In some specific embodiments, the method further includes: and the configuration is used for traversing all contents in the project folder by utilizing a directory and file modification time comparison algorithm and updating the initial aerial view.
According to the method and the system for generating the software engineering directory structure annotation aerial view, nodes which do not need to be traversed are filtered through a directory tree recursion algorithm with neglect conditions, and only modified nodes are traversed through a directory and file modification time comparison algorithm, so that directory traversal efficiency is improved. The method realizes the overview of the project structure, provides a convenient way for project research personnel to quickly know the project, and provides a method and a way for generating the bird's-eye view of the project structure for project document compiling personnel.
Drawings
The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments and together with the description serve to explain the principles of the invention. Other embodiments and many of the intended advantages of embodiments will be readily appreciated as they become better understood by reference to the following detailed description. Other features, objects and advantages of the present application will become more apparent upon reading of the following detailed description of non-limiting embodiments thereof, made with reference to the accompanying drawings in which:
FIG. 1 is a flowchart of a method for generating a software engineering catalog structure annotation bird's eye view according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for generating a software engineering catalog structure annotation bird's eye view according to a specific embodiment of the present application;
FIG. 3 is a block diagram of a system for generating a software engineering catalog structure annotation bird's eye view of one embodiment of the present application;
FIG. 4 is a block diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the relevant invention and not restrictive of the invention. It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 shows a flowchart of a method for generating a software engineering catalog structure annotation bird's eye view according to an embodiment of the present application. As shown in fig. 1, the method includes:
s101: the header annotation and the annotation file are used to write an annotation specification for a file or folder.
In a specific embodiment, an annotation specification of a file or a folder is written in the forms of a file header annotation, an annotation file and the like, the annotation of the file is added by adopting a plurality of lines of annotations of a file header, and the matching regularity of the plurality of lines of annotations (denoted as: regular A): commensrag =/\\ S \ S + \ S + (\ S) [ \ W ] \ S \/, and the method for extracting the comment content is as follows: [ File content ] match (commensurable region) [1 ]. And (4) directory annotation, namely, reading the content of the file by adopting a file with the file name comment under the directory as a carrier through a readFile method of an fs module.
S102: and traversing all contents in the item folder by using a directory tree recursion algorithm, extracting the annotation description and generating a directory structure tree.
In a specific embodiment, a directory tree recursive algorithm with a neglect condition is adopted for traversal, in the process of recursively reading child nodes of folders, specific folders, folder nodes and files are ignored, and finally tree data expressing a folder structure is generated.
In a specific embodiment, a specific method for generating the directory structure tree is as follows:
1. the specific folders, folder nodes, files that are intended to be ignored are stored by a dirTreeIgnore file under the root directory. The dirTreeIgnore file is read line by line, and filter terms are obtained. Wherein:
dirName/: representing all subdirectories and files under the filtering name dirName folder
A dirName: filtering folder named dirName
filiename: filtering files named as fileName
Identifying a regular expression of dirName/(: regular B): reg =/(\ S }/, where dirName = reg [1]
2. The item folder is read recursively, ignored if a dirName or fileName type of dirtreigore is encountered, and traversal of the subdirectory of dirName is stopped if a dirName/. type is encountered.
3. Generating tree data expressing a folder structure in a recursion process, wherein:
the tree structure data is denoted as DataTree, and the tree structure node data is denoted as DataItem
dataTree = [dataItem…]
dataItem = {
The path is a path of the file,
the fileName is the name of the file,
isdirection-whether a folder is present,
comment-a comment-is given,
mtime-the last change time,
child node of children: [ dataItem … ]
In a specific embodiment, the step S102 includes a plurality of sub-algorithms, and the steps and abbreviated codes of the sub-algorithms are as follows:
1. the method for reading line by line (denoted as sub-algorithm a) includes the following detailed steps:
reading a file through fs.readfile to obtain a data stream of the file;
delivering the data stream to a progressive reading module readline.
Monitoring a line event of a line-by-line reading module, and pushing line data into a stack each time the event is executed;
when the end event triggered by the line-by-line reading module occurs, returning to the stack to finish line-by-line reading; the shorthand code is as follows:
/**
line by line reading
@param filePath
@return {Promise<unknown>}
/
function readLine(filePath){
return new Promise((resolve, reject)=>{
fs.readFile(filePath, function (err,data) {
let baseData = new Buffer.from(data);
var bufferStream = new stream.PassThrough();
bufferStream.end(baseData);
var objReadline = readline.createInterface({
input:bufferStream
});
var arr = [];
objReadline.on('line',function (line) {
arr.push(line);
});
objReadline.on('close',function () {
resolve(arr);
});
});
});
2. dirTreeIgnore, method for obtaining filter terms (denoted as, sub-algorithm B), detailed steps are:
reading data list in a dirTreeIgnore (directory ignore file) file line by line through a sub-algorithm A;
circulating list, and matching whether to filter the filter items of the subset or not through the regular B;
thus splitting the list into two lists and returning: filter terms (dirName/' type) that filter only a subset (denoted as: ignorechldren), filter terms (dirName and fileName type) that filter the current file (denoted as: ignoreSelf). The shorthand code is as follows:
/**
DirTreeIgore, get the filter term
dirName/: representing all subdirectories and files under the filtering name dirName folder
dirName: filtering folder named dirName
fileName: filtering files named as fileName
/
async function getIgnoreList(){
dirTreeIgnore, get a list of ignorions
let ignoreList = await readLine(path.resolve(__dirname, '.dirTreeIgnore'))
.then((data)=>{return data});
let result = {
ignoreChildren: [],
ignoreSelf: [],
};
for(let ignoreItem of ignoreList){
If the match is a filtered subset only
let matchOnlyChildren = ignoreItem.match(/(\S*)\/\*$/);
if(matchOnlyChildren){
result.ignoreChildren.push(matchOnlyChildren[1]);
}else{
result.ignoreSelf.push(ignoreItem);
}
}
return result;
3. The method for reading annotation information (denoted as sub-algorithm C) comprises the following detailed steps:
if the path is a folder, reading the content of the comment file of comment in the directory as the comment content of the path;
if the path is of a file type, matching annotation content by regular A;
and finally returning the annotation content. The shorthand code is as follows:
/**
read annotation information
@param path
@return {*}
/
function readCommet(path){
if(isDirectory(path)){
return readCommentTxt(path);
}else{
let s = fs. readFileSync(path);
let reg = /\/\*+\s*\*+\s+(\S*)[\w\W]*\*+\/$/;
let result = s.match(reg);
return result && result[1];
}
4. Recursion generates a data tree (denoted as sub-algorithm D), recursion: the method in which function a internally calls itself (function a) and conditionally stops the process is called recursion. The detailed steps are as follows:
a recursive function FN (dataItem) is defined, where dataItem is the directory of the current recursive read. treeNode is the current recursion node of the data tree;
reading a child node list of a directory of the dataItem;
traversing the list to obtain the item, if the item is in the ignores self list, skipping, and continuing to execute the next item;
if the item is not in the ignoreSelf list, then a child node of the data tree is defined. Pushing into treeNode;
if the item is not of a folder type, or the item is in an ignoreChildren. If the child node of the item is to be ignored, skipping the recursion of the child node and continuing to execute the next item;
if the item is of folder type, and the item is not in ignoreChildren. Repeating executing FN on item;
therefore, the traversal of all the nodes of the target folder is completed, and a data tree root is generated. The shorthand code is as follows:
function FN(dataItem, treeNode){
let dirPath = dataItem.path;
// read dirPath lower node
let list = fs.readdirSync(dirPath)
let ignoreList = getIgnoreList();
for(let item of list){
if (entry) continue, filter out ignore item
let childNode = {
path: item.path,
fileName: item.fileName,
isDirectory: item.isDirectory,
comment: readCommet(item.path) || '',
mtime: item.mtime,
children: []
}
treeNode.children.push(childNode);
let isIgnoreChildren = ignoreList.ignoreChildren.includes(item)
if(item.isDirectory && !isIgnoreChildren){
FN(item, childNode)
}
}
return treeNode;
let root = {
path: __dirname,
fileName 'root directory name',
isDirectory: true,
comment, 'comment',
mtime: root.mtime,
children: []
;
FN({path: __dirname}, root);
s103: the directory structure tree is rendered as an editable tree and exported as an initial aerial view store. The initial aerial view is the first time the tool is applied to the project catalog, and no data cache file is generated.
In a specific embodiment, the dataTree generated in the above process is rendered into an editable tree by means of vue. Js subcomponent renders: and packaging the tree nodes into a vue.js component A, and circularly and recursively nesting the component A so as to render the tree, wherein the tree can be edited by setting an input in A.
In a specific embodiment, the tree data is derived as html or a bird's eye view in the form of a picture, and the directory structure tree is stored as a local file. And generating aerial views of various carriers by the edited dataTree in the above three methods: 1. generating html into a picture through an html2canvas module; 2. generating json data into a picture by canvas drawing; 3. and directly constructing json data into an html file through the fs module. Specifically, the dataTree data is saved as dataTree in a JSON file JSON (data is recorded as localdatre) through a writeFile of an fs module, a mapping table from itepath to item (recorded as datatremapp) is generated, and a shorthand code:
dataTreeMap = {
path: item node
}。
In a specific embodiment, step 103 is followed by traversing all contents in the project folder using a directory and file modification time comparison algorithm to update the initial bird's eye view. When the aerial view is generated later, the traversal efficiency can be improved through the comparison algorithm of the directory and the file modification time. The principle used by the directory and file modification time comparison algorithm is that when any file at any level of a folder is added, deleted or changed, the attribute mtime is changed. If the content of a file changes, the mtime of the file will also change.
In a specific embodiment, the comparison algorithm of the modification time of the directory and the file comprises: and executing a directory tree recursive algorithm, and comparing mtime of data of a node in the datatremap in detail 4 when traversing to the node. If mtime is inconsistent, indicating that the node or child node has changed, the node is read and recursion is performed. If mtime is consistent, the node is indicated and the child node is not changed, the cache (localdata tree in detail 4) is read, the data of the node of the localdata tree is directly extracted into the current dataTree, and the downward recursion is stopped. A method (sub-algorithm E) for fast mapping localDataTree and the current node: splitting the path of the current node into arrays according to '/', wherein the data corresponding to the node in the localdatreete is localdatreitem = localdatreete [ path [0] ] [ path [1] ] … [ path [ lastIndex ] ]. The detailed steps of the algorithm are as follows:
reading tree data localDataTree generated last time;
executing the directory tree recursion algorithm;
in the traversal process, acquiring a current traversal node item;
and comparing the mtimes, if the mtimes are equal to each other, indicating that the mtimes are not modified, quickly acquiring the data localtem of the current node in the localDataTree through the sub-algorithm E. Directly extracting the data into the current dataTree;
if not, then the modification is indicated, and then the recursion continues. The shorthand code is as follows:
// path to item mapping table
let dataTreeMap = {
' path ': item node '
// last generated tree data
let localDataTree = fs.readFileSync('dataTree.json');
/**
Alignment mtime
@param item
@return {boolean}
/
function isAltered(item){
if(!dataTreeMap || !dataTreeMap[item.path])return;
return item.mtime !== dataTreeMap[item.path]
/**
Get cache node
@param item
@return {null|Buffer}
/
function getLocalData(item){
if(isAltered(item)){
return null;
}
let pathArray = item.path.split('/');
let localItem = localDataTree;
for(let pathItem of pathArray){
localItem = localItem[pathItem];
}
return localItem;
With continued reference to fig. 2, fig. 2 is a flowchart illustrating a method for generating a software engineering catalog structure annotation bird's eye view according to a specific embodiment of the present application, the method specifically comprising the following steps:
step 201: and writing an annotation. And writing the annotation description of the file or the folder in the forms of header annotation, annotation file and the like.
Step 202: recursively reading the directory; step 203: the specified item is ignored. Step 204: and reading the cache. And reading all contents in the item folder by a directory tree recursive algorithm with a neglect condition, and extracting the annotation specification.
Step 205: it is determined whether a cache exists. If there is a cache, go to step 206: comparing the modification time; if no cache exists, go to step 209: reading nodes and annotating.
Step 207: and reading the cache. And if the modification time is consistent, which indicates that the node or the child node is not changed, reading the cache.
Step 208: an editable tree is generated. Js subcomponent rendering results in an editable tree.
Step 210: and (6) editing. Step 211: and generating a bird's-eye view. Step 212: and saving the file data. Exporting the editable tree generated in the step 208 as a html or picture form aerial view, and simultaneously storing the directory structure tree as a local file. And passes the file data saved in step 212 through step 213: path to data mapping and step 214: local TreeData is used as a cache input in step 204.
With continued reference to FIG. 3, FIG. 3 illustrates a framework diagram of a software engineering catalog structure annotation bird's eye view generation system, according to one embodiment of the present application. The system specifically includes an annotation specification writing unit 301, a directory structure tree generation unit 302, and a bird's eye view derivation unit 303. An annotation description writing unit: configuring an annotation specification for writing a file or folder with a header annotation and an annotation file; a directory structure tree generation unit: the method comprises the steps that a directory tree recursion algorithm is configured to traverse all contents under a project folder, annotation descriptions are extracted, and a directory structure tree is generated; bird's eye view derivation means: configured to render the directory structure tree as an editable tree and export to the initial aerial view storage. In some specific embodiments, the method further includes: the configuration is used for traversing all contents in the project folder by utilizing a directory and file modification time comparison algorithm and updating the initial aerial view.
Referring now to FIG. 4, shown is a block diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 4, the computer system includes a Central Processing Unit (CPU) 401 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage section 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for system operation are also stored. The CPU 401, ROM 402, and RAM 403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including a display such as a Liquid Crystal Display (LCD) and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. A driver 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 410 as needed, so that a computer program read out therefrom is mounted in the storage section 408 as needed.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 409, and/or installed from the removable medium 411. The computer program performs the above-described functions defined in the method of the present application when executed by a Central Processing Unit (CPU) 401. It should be noted that the computer readable storage medium of the present application can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable storage medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present application may be implemented by software or hardware.
As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable storage medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: writing an annotation description of a file or a folder by using the file header annotation and the annotation file; traversing all contents under the item folder by using a directory tree recursion algorithm, extracting the annotation description, and generating a directory structure tree; and rendering the directory structure tree into an editable tree, and exporting the directory structure tree to an initial aerial view for storage.
The above description is only a preferred embodiment of the application and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention herein disclosed is not limited to the particular combination of features described above, but also encompasses other arrangements formed by any combination of the above features or their equivalents without departing from the spirit of the invention. For example, the above features may be replaced with (but not limited to) features having similar functions disclosed in the present application.

Claims (8)

1. A method for generating a software engineering catalog structure annotation aerial view is characterized by comprising the following steps:
s1: writing an annotation description of a file or a folder by using the file header annotation and the annotation file;
s2: traversing all contents under the item folder by using a directory tree recursion algorithm, extracting the annotation description, and generating a directory structure tree;
s3: rendering the directory structure tree into an editable tree and exporting the editable tree to an initial aerial view storage, wherein the rendering process comprises the following steps: rendering the generated directory structure tree into an editable tree in a vue.js subcomponent rendering mode; js subcomponent renders as: js component A, circularly and recursively nesting the component A to realize tree rendering, and an input box is arranged in the component A to realize tree editable;
wherein, the S2 specifically includes:
the method comprises the steps of storing specific folders, folder nodes and files to be ignored through a dirTreeIgnore file under a root directory, and reading the dirTreeIgnore file line by line to obtain filter items, wherein dirName/indicates that the filter name is all subdirectories and files under a dirName folder, dirName indicates that the filter name is a dirName folder, and an enfile indicates that the filter name is a fileName file;
recursively traversing the read item folder, if a dirName or fileName type of dirTreeImore is encountered, ignoring the item folder, and if a dirName/type is encountered, stopping traversing the subdirectory of the dirName;
tree data expressing the folder structure is generated in the recursion process.
2. The method for generating a software engineering catalog structure annotation bird' S eye view of claim 1, wherein said catalog tree recursion algorithm in said S2 is a catalog tree recursion algorithm with ignore condition.
3. The method for generating the software engineering catalog structure annotation bird's eye view of claim 1, wherein said carrier of the initial bird's eye view comprises a picture and an html document.
4. The method for generating a software engineering catalog structure annotation aerial view of claim 1, wherein said step S3 is followed by further comprising: and traversing all contents in the project folder by utilizing a directory and file modification time comparison algorithm, and updating the initial aerial view.
5. The method for generating a software engineering catalog structure annotated bird's eye view of claim 3, wherein updating said initial bird's eye view specifically comprises: traversing the compared nodes in the process, and extracting and updating the data of the current node to a directory structure tree of the initial aerial view in response to the fact that the current node is consistent with the time attribute mtime of the modified content of the initial node on the initial aerial view; the recursion continues in response to the current node not coinciding with the last modified time attribute mtime of the initial node on the initial aerial view.
6. A computer-readable storage medium having one or more computer programs stored thereon, which when executed by a computer processor perform the method of any one of claims 1 to 5.
7. A system for generating a software engineering catalog structure annotation bird's eye view, the system comprising:
an annotation description writing unit: configuring an annotation specification for writing a file or folder with a header annotation and an annotation file;
a directory structure tree generation unit: the method comprises the steps that all contents under a project folder are configured and used for traversing by utilizing a directory tree recursion algorithm, the annotation description is extracted, and a directory structure tree is generated;
bird's eye view derivation means: configured to render the directory structure tree as an editable tree and export to an initial aerial view store, comprising: rendering the generated directory structure tree into an editable tree in a vue.js subcomponent rendering mode; js sub-components are rendered as: the tree nodes are packaged into a vue.js component A, the component A is nested in a circulating recursion manner, so that the tree rendering is realized, and the tree editable is realized by setting an input box in the component A;
wherein the directory structure tree generation unit is specifically configured to: the method comprises the steps of storing specific folders, folder nodes and files to be ignored through a dirTreeIgnore file under a root directory, and reading the dirTreeIgnore file line by line to obtain filter items, wherein dirName/indicates that the filter name is all subdirectories and files under a dirName folder, dirName indicates that the filter name is a dirName folder, and an enfile indicates that the filter name is a fileName file; recursively traversing the read item folder, if a dirName or fileName type of dirTreeImore is encountered, ignoring the item folder, and if a dirName/type is encountered, stopping traversing the subdirectory of the dirName; tree data expressing the folder structure is generated in the recursion process.
8. The system for generating a software engineering catalog structure annotated bird's eye view of claim 7, further comprising a bird's eye view update unit: and the system is configured to traverse all contents in the project folder by using a directory and file modification time comparison algorithm and update the initial aerial view.
CN202110418957.8A 2021-04-19 2021-04-19 Software engineering directory structure annotation aerial view generation method and system Active CN113094036B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110418957.8A CN113094036B (en) 2021-04-19 2021-04-19 Software engineering directory structure annotation aerial view generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110418957.8A CN113094036B (en) 2021-04-19 2021-04-19 Software engineering directory structure annotation aerial view generation method and system

Publications (2)

Publication Number Publication Date
CN113094036A CN113094036A (en) 2021-07-09
CN113094036B true CN113094036B (en) 2022-09-27

Family

ID=76678608

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110418957.8A Active CN113094036B (en) 2021-04-19 2021-04-19 Software engineering directory structure annotation aerial view generation method and system

Country Status (1)

Country Link
CN (1) CN113094036B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113656347B (en) * 2021-08-17 2023-12-05 成都统信软件技术有限公司 File directory export method, file directory import method and computing device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015130675A2 (en) * 2014-02-26 2015-09-03 Western Michigan University Research Foundation Apparatus and method for testing computer program implementation against a design model
CN110795069A (en) * 2018-08-02 2020-02-14 Tcl集团股份有限公司 Code analysis method, intelligent terminal and computer readable storage medium
CN112035478A (en) * 2020-08-31 2020-12-04 中国平安财产保险股份有限公司 Catalog display method and device, computer equipment and computer readable storage medium
CN112527738A (en) * 2020-12-25 2021-03-19 平安普惠企业管理有限公司 Project description file optimization method, system and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1232906C (en) * 2001-07-06 2005-12-21 华为技术有限公司 Code statistical tool of computer software program and its implementing method
US9524273B2 (en) * 2013-03-11 2016-12-20 Oracle International Corporation Method and system for generating a web page layout using nested drop zone widgets having different software functionalities
CN110471694A (en) * 2019-07-11 2019-11-19 平安普惠企业管理有限公司 Annotation information processing method, device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015130675A2 (en) * 2014-02-26 2015-09-03 Western Michigan University Research Foundation Apparatus and method for testing computer program implementation against a design model
CN110795069A (en) * 2018-08-02 2020-02-14 Tcl集团股份有限公司 Code analysis method, intelligent terminal and computer readable storage medium
CN112035478A (en) * 2020-08-31 2020-12-04 中国平安财产保险股份有限公司 Catalog display method and device, computer equipment and computer readable storage medium
CN112527738A (en) * 2020-12-25 2021-03-19 平安普惠企业管理有限公司 Project description file optimization method, system and storage medium

Also Published As

Publication number Publication date
CN113094036A (en) 2021-07-09

Similar Documents

Publication Publication Date Title
US10104082B2 (en) Aggregated information access and control using a personal unifying taxonomy
US10664471B2 (en) System and method of query processing with schema change in JSON document store
Erraissi et al. Data sources and ingestion big data layers: meta-modeling of key concepts and features
US20140279903A1 (en) Version control system using commit manifest database tables
KR101764941B1 (en) Efficient immutable syntax representation with incremental change
KR20130130706A (en) Managing data set objects in a dataflow graph that represents a computer program
US8775392B1 (en) Revision control and configuration management
Francois et al. Kevoree Modeling Framework (KMF): Efficient modeling techniques for runtime use
CN111309335A (en) Plug-in application compiling method and device and computer readable storage medium
Dragly et al. Experimental directory structure (Exdir): an alternative to HDF5 without introducing a new file format
BR112021006722A2 (en) correlated incremental loading of multiple datasets to an interactive data preparation application
CN113094036B (en) Software engineering directory structure annotation aerial view generation method and system
Ángel et al. Automated modelling assistance by integrating heterogeneous information sources
US8719314B2 (en) Faceted search on assets packaged according to the reusable asset specification (RAS)
US9454382B2 (en) Verification of UML state machines
Carré et al. From subsets of model elements to submodels: A characterization of submodels and their properties
Berry et al. Amalgamating source trees with different taxonomic levels
US11977473B2 (en) Providing a pseudo language for manipulating complex variables of an orchestration flow
US12045919B2 (en) Systems and processes for multi-directional connection of directed acyclic graphs between dashboarding tools and external data tools
Spaggiari et al. Architecting HBase applications: a guidebook for successful development and design
Bhuyan et al. Scalable provenance storage and querying using pig latin for big data workflows
CN113343036A (en) Data blood relationship analysis method and system based on key topological structure analysis
CN112486499A (en) Method, device, equipment and storage medium for searching target node in TS code
Albuquerque et al. Mastering Elixir: Build and scale concurrent, distributed, and fault-tolerant applications
Turkington et al. Learning Hadoop 2

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
CP03 Change of name, title or address

Address after: 361000 unit 102, No. 59, erhaihai Road, software park, Siming District, Xiamen City, Fujian Province

Patentee after: ROPT TECHNOLOGY GROUP Co.,Ltd.

Country or region after: China

Patentee after: ROPT (Xiamen) Big Data Group Co.,Ltd.

Address before: 361000 unit 102, No. 59, erhaihai Road, software park, Siming District, Xiamen City, Fujian Province

Patentee before: ROPT TECHNOLOGY GROUP Co.,Ltd.

Country or region before: China

Patentee before: Lop (Xiamen) system integration Co.,Ltd.

CP03 Change of name, title or address