CN110489087A - A kind of method, apparatus, medium and electronic equipment generating fractal structure - Google Patents
A kind of method, apparatus, medium and electronic equipment generating fractal structure Download PDFInfo
- Publication number
- CN110489087A CN110489087A CN201910699597.6A CN201910699597A CN110489087A CN 110489087 A CN110489087 A CN 110489087A CN 201910699597 A CN201910699597 A CN 201910699597A CN 110489087 A CN110489087 A CN 110489087A
- Authority
- CN
- China
- Prior art keywords
- fractal
- node
- functional
- unit
- tree
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 239000012634 fragment Substances 0.000 claims description 18
- 238000013145 classification model Methods 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 9
- 238000011161 development Methods 0.000 abstract description 5
- 230000018109 developmental process Effects 0.000 abstract 1
- 230000006870 function Effects 0.000 description 82
- 230000008569 process Effects 0.000 description 11
- 238000010586 diagram Methods 0.000 description 8
- 230000008520 organization Effects 0.000 description 8
- 230000009471 action Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 4
- 230000004044 response Effects 0.000 description 4
- 239000003638 chemical reducing agent Substances 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 238000010801 machine learning Methods 0.000 description 3
- 238000012549 training Methods 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 239000003471 mutagenic agent Substances 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/20—Software design
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
- G06F8/42—Syntactic analysis
- G06F8/427—Parsing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/73—Program documentation
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Library & Information Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Stored Programmes (AREA)
Abstract
Present disclose provides a kind of method, apparatus, medium and electronic equipments for generating fractal structure.Functional characteristic is subjected to nested tissue by tree structure, so as to manage increasingly complex project structure.Learning cost is reduced, makes code be easy to search, positioning, the organizational form of code reflects product structure, and corresponding with product demand, code is more readily maintained.After each functional characteristic is isolated, when in a functional characteristic code revision, reconstruct when, will not influence other functional characteristics.Meanwhile when multiple functional characteristic concurrent developments, the conflict generated when code merges is avoided.
Description
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method, an apparatus, a medium, and an electronic device for generating a fractal structure.
Background
Currently, the development model of front-end development evolves to component-oriented development and manages state with unidirectional data flow. This allows an otherwise relatively single code to be partitioned into different roles. For example: there are categories such as Component, Container, Action, Reducer and Saga in the reach technology stack; the technology stack is similarly partitioned at Vue with some differences in name, such as Reducer, which is called Mutator.
Technology stacks, which are a combination of software products and programming languages for creating Web or mobile applications. An application typically contains two software components: the client and the server are also called front end and back end.
How to organize the codes of the different roles is a fundamental problem in front-end development.
Currently, there are two common ways for front-end projects to organize file structures:
1. organizing File structure by File Type (File Type First)
And putting the files into different folders according to different roles or categories of the file contents. For example: components, associates, actions, reducers, saras, and selectors, among others.
2. Organizing file structures according to functional characteristics (Feature First)
And dividing different folder structures according to the functional characteristics of the product. For example: users, posts, comments, and the like.
Wherein organizing the file structure by functional characteristics is more advantageous in managing the complexity of large-scale projects than organizing the file structure by file type.
However, in the way of organizing the file structure according to the functional characteristics, the existing scheme still cannot completely depart from the way of organizing the file structure according to the file type, and the hybrid application greatly weakens the advantage of organizing the file structure according to the functional characteristics.
Disclosure of Invention
An object of the present disclosure is to provide a method, an apparatus, a medium, and an electronic device for generating a fractal structure, which can solve at least one of the above-mentioned technical problems. The specific scheme is as follows:
according to a specific embodiment of the present disclosure, in a first aspect, the present disclosure provides a method for generating a fractal structure, including:
acquiring a first document with function description;
analyzing the first document to generate a first function tree; wherein a leaf node of the first function tree is associated with a first text segment in the first document having a smallest function description, and all the first text segments constitute the function description of the first document;
inputting each first text segment into a first function description classification model respectively to obtain segment types associated with the leaf nodes;
respectively acquiring the fractal unit type of the corresponding leaf node according to each fragment type;
generating a first functional fractal structure according to the first functional tree and the fractal unit types of the leaf nodes; each node of the first functional fractal structure at least comprises a fractal unit.
Optionally, the parsing the first document to generate a first function tree includes:
performing function description analysis on the first document according to a function description analysis model to obtain a plurality of first analysis results; wherein the first parsing result includes: second text segment and second segment incidence relation information between the second text segments;
and generating a first functional tree according to the second text segment and the second segment incidence relation information.
Optionally, the obtaining the fractal unit type of the corresponding leaf node according to each fragment type includes:
and respectively acquiring the fractal unit type of the corresponding leaf node from a preset type matching data set according to each fragment type.
Optionally, the generating a first functional fractal structure according to the first functional tree and the fractal unit type of the leaf node includes:
generating the fractal unit type of each node of the first functional tree according to the fractal unit type of the leaf node;
generating the first function fractal structure which is the same as the first node structure according to the first node structure of the first function tree;
and acquiring the corresponding fractal unit of the node of the first function fractal structure according to the fractal unit type of each node of the first function tree.
Optionally, the generating the fractal unit type of each node of the first functional tree according to the fractal unit type of the leaf node includes:
and in the first function tree, respectively generating the fractal unit types of the father nodes layer by layer according to the incidence relation of the fractal unit types of the child nodes of each father node from bottom to top.
Optionally, the obtaining the fractal unit of the node of the first functional fractal structure according to the fractal unit type of each node of the first functional tree includes:
acquiring the fractal unit type of each node of the first function tree;
respectively acquiring corresponding fractal units from a preset fractal unit data set according to the fractal unit types;
and acquiring the fractal unit of the node of the first functional fractal structure according to the corresponding fractal unit and the corresponding relation between each node of the first functional tree and each node of the first functional fractal structure.
Optionally, the fractal unit at least includes: functional component information and functional component state information.
According to a second aspect, the present disclosure provides an apparatus for generating a fractal structure, including:
an acquisition document unit for acquiring a first document having a function description;
the analysis unit is used for analyzing the first document to generate a first function tree; wherein a leaf node of the first function tree is associated with a first text segment in the first document having a smallest function description, and all the first text segments constitute the function description of the first document;
the classification unit is used for inputting each first text segment into a first function description classification model respectively to obtain segment types associated with the leaf nodes;
the type obtaining unit is used for respectively obtaining the corresponding fractal unit type of the leaf node according to each fragment type;
a generating unit, configured to generate a first functional fractal structure according to the first functional tree and the fractal unit type of the leaf node; each node of the first functional fractal structure at least comprises a fractal unit.
According to a third aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method of generating a fractal structure according to any of the first aspects.
According to a fourth aspect thereof, the present disclosure provides an electronic device, comprising: one or more processors; storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method of generating a fractal structure according to any one of the first aspects.
Compared with the prior art, the scheme of the embodiment of the disclosure at least has the following beneficial effects:
the disclosure provides a method, a device, a medium and an electronic device for generating a fractal structure, wherein the method comprises the following steps: acquiring a first document with function description; analyzing the first document to generate a first function tree; wherein a leaf node of the first function tree is associated with a first text segment in the first document having a smallest function description, and all the first text segments constitute the function description of the first document; inputting each first text segment into a first function description classification model respectively to obtain segment types associated with the leaf nodes; respectively acquiring the fractal unit type of the corresponding leaf node according to each fragment type; generating a first functional fractal structure according to the first functional tree and the fractal unit types of the leaf nodes; each node of the first functional fractal structure at least comprises a fractal unit.
The present disclosure provides for nested organization of functional properties in a tree structure, allowing for management of more complex project structures. The learning cost is reduced, the codes are easy to search and locate, the organization mode of the codes reflects the product structure, the codes correspond to the product requirements, and the codes are easier to maintain. After isolating each functional characteristic, when modifying and reconstructing codes in one functional characteristic, other functional characteristics are not influenced. Meanwhile, when a plurality of functional characteristics are developed in parallel, the conflict generated when the codes are combined is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
fig. 1 shows a flow diagram of a method of generating a fractal structure according to an embodiment of the present disclosure;
fig. 2 illustrates a block diagram of elements of an apparatus for generating a fractal structure according to an embodiment of the present disclosure;
fig. 3 shows an electronic device connection structure schematic according to an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the present disclosure clearer, the present disclosure will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present disclosure, rather than all embodiments. All other embodiments, which can be derived by one of ordinary skill in the art from the embodiments disclosed herein without making any creative effort, shall fall within the scope of protection of the present disclosure.
The terminology used in the embodiments of the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. As used in the disclosed embodiments and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise, and "a plurality" typically includes at least two.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe technical names in embodiments of the present disclosure, the technical names should not be limited to the terms. These terms are only used to distinguish between technical names. For example, a first check signature may also be referred to as a second check signature, and similarly, a second check signature may also be referred to as a first check signature, without departing from the scope of embodiments of the present disclosure.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that an article or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such article or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in the article or device in which the element is included.
Alternative embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
A first embodiment provided by the present disclosure is an embodiment of a method for generating a fractal structure.
The embodiment of the present disclosure is described in detail below with reference to fig. 1, where fig. 1 is a flowchart of a method for generating a fractal structure according to the embodiment of the present disclosure.
In step S101, a first document having a function description is acquired.
A document refers to a textual entity associated with a software system and its software engineering process. The types of documents include software requirements documents, design documents, test documents, user manuals, and the like. The requirement documents, the design documents and the test documents are generally written by developers in the software development process, and non-process documents such as user manuals are written by special non-technical writers.
The document can improve the software development efficiency, ensure the software quality, and has the functions of guidance, help and confusion in the use process of the software, and the document is indispensable data particularly in the maintenance work.
For example, in order to better describe the content of the customer demand in the software demand document, a sub-catalog is required to describe the functions of the software. And there may also be hierarchically described functionality under each directory.
In the traditional software development process, a requirement analysis personnel is required to write a software requirement document according to the requirement of a client. And then generating a software design document according to the software requirement document by a software designer. This process requires a lot of effort to write the relevant documents. The method of the disclosed embodiment aims to generate a preliminary software design document through the functional description of the software requirement document, thereby reducing the time for designing the document.
Step S102, analyzing the first document to generate a first function tree; wherein a leaf node of the first function tree is associated with a first text segment in the first document having a smallest function description, and all the first text segments constitute the function description of the first document.
And analyzing the first document, namely disassembling the first document and deeply analyzing, namely performing semantic analysis on the first document.
And analyzing the first document to generate a first function tree, namely analyzing and disassembling the content of the function description in the first document from large to small layer by layer. In the process of layer-by-layer disassembly, a first function tree is generated according to the disassembly sequence and the dependency relationship of the disassembled document from big to small, the leaf node of the first function tree is associated with the first text segment with the minimum function description in the first document, and all the first text segments form the function description of the first document.
The first text segment is a text segment in which the function description cannot be disassembled any more in the disassembling process.
For example, if a software requirement document has four large headings, then the root node of the first function tree has four children, and there are 6 second headings below the first large heading, then the first node of the second level of the first function tree has 6 children, and so on, until the first text segment with the smallest function description is parsed and the leaf nodes of the first function tree are generated.
Optionally, the parsing the first document to generate a first function tree includes the following steps:
step S102-1, performing function description analysis on the first document according to a function description analysis model to obtain a plurality of first analysis results; wherein the first parsing result includes: and the second text segment and the second segment incidence relation information between the second text segments.
The function description analysis model may be a machine learning model generated by training a large number of function analysis samples. The embodiment of the present disclosure is not described in detail in relation to the process of performing function description parsing on the first document according to a function description parsing model, and may be implemented by referring to various implementation manners in the prior art.
And the second segment incidence relation information comprises the information of the character segment at the upper layer and the information of the character segments at the same layer before and after the second character segment.
When the second text segment is the text segment of the minimum function description, the second text segment is also the first text segment. I.e. the literal fragment associated with the leaf node of the first functional tree.
And S102-2, generating a first functional tree according to the second text segment and the second segment incidence relation information.
Typically, the first functional tree has a plurality of levels, each parent node having a plurality of children nodes, the final node of each branch being a leaf node, the leaf node having no children nodes.
Step S103, inputting each first character segment into a first function description classification model respectively to obtain segment types associated with the leaf nodes.
The first functional description classification model may be a machine learning model generated by training a plurality of classified functional description samples. The embodiment of the present disclosure does not describe in detail the process of inputting each first text segment into the first function description classification model to obtain the segment type associated with the leaf node, and may be implemented by referring to various implementations in the prior art.
And step S104, respectively obtaining the fractal unit type of the corresponding leaf node according to each fragment type.
Namely, the corresponding fractal unit types are respectively obtained according to the fragment types. The fractal element type is a value of a corresponding leaf node in the first functional tree.
Optionally, the obtaining the fractal unit type of the corresponding leaf node according to each fragment type includes:
and respectively acquiring the fractal unit type of the corresponding leaf node from a preset type matching data set according to each fragment type.
A preset type matching dataset comprising: fragment type and fractal element type. The fragment type and the fractal unit type are in one-to-one correspondence. Thereby avoiding ambiguity in generating fractal structures.
The fractal unit type is obtained through a fractal unit type model.
The fractal unit type model can be a machine learning model generated by training a large number of classified fractal unit samples.
Step S105, generating a first functional fractal structure according to the first functional tree and the fractal unit types of the leaf nodes; each node of the first functional fractal structure at least comprises a fractal unit.
The fractal unit at least comprises: functional component information and functional component state information.
For example, the first function fractal structure generated from the software requirement document, the function component information, includes: a functional component name; functional component state information, including: actions of functional components and states of actions of functional components.
The generating of the first functional fractal structure according to the first functional tree and the fractal unit type of the leaf node comprises the following steps:
step S105-1, the fractal unit type of each node of the first functional tree is generated according to the fractal unit type of the leaf node.
Optionally, the generating the fractal unit type of each node of the first functional tree according to the fractal unit type of the leaf node includes:
and in the first function tree, respectively generating the fractal unit types of the father nodes layer by layer according to the incidence relation of the fractal unit types of the child nodes of each father node from bottom to top.
For example, one father node has 3 leaf nodes, and the fractal unit types of the 3 leaf nodes are combined and input into a fractal unit type data set, so that the fractal unit type of the father node is obtained. By analogy, the fractal unit type of each node of the first function tree can be obtained.
Step S105-2, generating the first function fractal structure identical to the first node structure according to the first node structure of the first function tree.
That is, the node structure of the first functional fractal structure is the same as that of the first functional tree, but the value of each node is different.
Step S105-3, the fractal unit of the node of the corresponding first function fractal structure is obtained according to the fractal unit type of each node of the first function tree.
Optionally, the obtaining the fractal unit of the node of the first functional fractal structure according to the fractal unit type of each node of the first functional tree includes the following steps:
and S105-3-1, acquiring the fractal unit type of each node of the first function tree.
And S105-3-2, respectively acquiring the corresponding fractal unit from a preset fractal unit data set according to each fractal unit type.
A preset fractal unit dataset comprising: a fractal unit type and a fractal unit. The fractal unit type and the fractal unit have one-to-one correspondence.
Step S105-3-3, the fractal unit of the node of the first functional fractal structure is obtained according to the corresponding fractal unit and the corresponding relation between each node of the first functional tree and each node of the first functional fractal structure.
Since the node structure of the first functional tree is the same as the node structure of the first functional fractal structure, the fractal unit obtained through the node of the first functional tree is used as the value of the node corresponding to the first functional fractal structure.
The first function fractal structure obtained according to the method of the embodiment of the present disclosure may be stored in a file manner. In the document, the node of the first functional fractal structure is a branch in the document, and the branch formed by the parent node comprises a characteristic unit besides the content of the fractal structure, wherein the characteristic unit is the content generated by the child node of the parent node. Each characteristic unit is independent and independent. The property cells may be nested layer by layer. The document structure corresponding to the leaf node does not include a property element.
The disclosed embodiment performs nested organization of functional properties in a tree structure, thereby allowing management of more complex project structures. The learning cost is reduced, the codes are easy to search and locate, the organization mode of the codes reflects the product structure, the codes correspond to the product requirements, and the codes are easier to maintain. After isolating each functional characteristic, when modifying and reconstructing codes in one functional characteristic, other functional characteristics are not influenced. Meanwhile, when a plurality of functional characteristics are developed in parallel, the conflict generated when the codes are combined is avoided.
Corresponding to the first embodiment provided by the present disclosure, the present disclosure also provides a second embodiment, that is, an apparatus for generating a fractal structure. Since the second embodiment is basically similar to the first embodiment, the description is simple, and the relevant portions should be referred to the corresponding description of the first embodiment. The device embodiments described below are merely illustrative.
Fig. 2 illustrates an embodiment of an apparatus for generating a fractal structure provided in the present disclosure. Fig. 2 is a block diagram of a unit of an apparatus for generating a fractal structure according to an embodiment of the present disclosure.
Referring to fig. 2, the present disclosure provides an apparatus for generating a fractal structure, including: a document acquiring unit 201, a parsing unit 202, a classifying unit 203, an acquiring type unit 204 and a generating unit 205.
An acquiring document unit 201 for acquiring a first document having a function description;
an analyzing unit 202, configured to analyze the first document to generate a first function tree; wherein a leaf node of the first function tree is associated with a first text segment in the first document having a smallest function description, and all the first text segments constitute the function description of the first document;
the classification unit 203 is configured to input each first text segment into a first function description classification model to obtain a segment type associated with the leaf node;
an obtaining type unit 204, configured to obtain, according to each fragment type, a corresponding fractal unit type of the leaf node;
a generating unit 205, configured to generate a first functional fractal structure according to the first functional tree and the fractal unit type of the leaf node; each node of the first functional fractal structure at least comprises a fractal unit.
Optionally, the parsing unit 202 includes:
the model analysis subunit is used for performing function description analysis on the first document according to a function description analysis model to obtain a plurality of first analysis results; wherein the first parsing result includes: second text segment and second segment incidence relation information between the second text segments;
and the first functional tree subunit is used for generating a first functional tree according to the incidence relation information of the second text segment and the second segment.
Optionally, the obtaining type unit 204 includes:
and the acquisition type subunit is used for acquiring the fractal unit type of the corresponding leaf node from a preset type matching data set according to each fragment type.
Optionally, the generating unit 205 includes:
a fractal unit type generation subunit, configured to generate the fractal unit type of each node of the first functional tree according to the fractal unit type of the leaf node;
a generating structure subunit, configured to generate, according to a first node structure of the first function tree, the first function fractal structure that is the same as the first node structure;
and the first fractal unit obtaining subunit is used for obtaining the corresponding fractal unit of the node of the first functional fractal structure according to the fractal unit type of each node of the first functional tree.
Optionally, the generating a fractal unit type subunit includes:
and traversing the father node and the child nodes, and respectively generating the fractal unit types of the father nodes according to the incidence relation of the fractal unit types of the child nodes of each father node layer by layer from bottom to top in the first function tree.
Optionally, the obtaining a fractal unit subunit includes:
acquiring a fractal unit type subunit of each node, wherein the fractal unit type subunit is used for acquiring the fractal unit type of each node of the first function tree;
the second fractal unit obtaining subunit is used for respectively obtaining the corresponding fractal units from a preset fractal unit data set according to the fractal unit types;
and a third fractal unit acquiring subunit, configured to acquire the fractal unit of the node of the first functional fractal structure according to the corresponding fractal unit and the corresponding relationship between each node of the first functional tree and each node of the first functional fractal structure.
Optionally, the fractal unit at least includes: functional component information and functional component state information.
The disclosed embodiment performs nested organization of functional properties in a tree structure, thereby allowing management of more complex project structures. The learning cost is reduced, the codes are easy to search and locate, the organization mode of the codes reflects the product structure, the codes correspond to the product requirements, and the codes are easier to maintain. After isolating each functional characteristic, when modifying and reconstructing codes in one functional characteristic, other functional characteristics are not influenced. Meanwhile, when a plurality of functional characteristics are developed in parallel, the conflict generated when the codes are combined is avoided.
The embodiment of the present disclosure provides a third embodiment, that is, an electronic device, where the electronic device is used in a method for generating a fractal structure, and the electronic device includes: at least one processor; and a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the one processor to cause the at least one processor to perform the method of generating fractal structures as described in the first embodiment.
The fourth embodiment provides a computer storage medium for generating a fractal structure, where the computer storage medium stores computer-executable instructions, and the computer-executable instructions may execute the method for generating a fractal structure in any of the above method embodiments.
Referring to fig. 3, a schematic structural diagram of an electronic device suitable for implementing an embodiment of the disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 3 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 3, the electronic device may include a processing device (e.g., a central processing unit, a graphic processor, etc.) 301 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)302 or a program loaded from a storage device 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data necessary for the operation of the electronic apparatus are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Generally, the following devices may be connected to the I/O interface 305: input devices 306 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 307 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage devices 308 including, for example, magnetic tape, hard disk, etc.; and a communication device 309. The communication means 309 may allow the electronic device to communicate wirelessly or by wire with other devices to exchange data. While fig. 3 illustrates an electronic device having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
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 medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication means 309, or installed from the storage means 308, or installed from the ROM 302. The computer program, when executed by the processing device 301, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure 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 disclosure, 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 contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either 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 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 medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: the functional properties are nested and organized in a tree structure, so that more complex project structures can be managed. The learning cost is reduced, the codes are easy to search and locate, the organization mode of the codes reflects the product structure, the codes correspond to the product requirements, and the codes are easier to maintain. After isolating each functional characteristic, when modifying and reconstructing codes in one functional characteristic, other functional characteristics are not influenced. Meanwhile, when a plurality of functional characteristics are developed in parallel, the conflict generated when the codes are combined is avoided.
Alternatively, the computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: the functional properties are nested and organized in a tree structure, so that more complex project structures can be managed. The learning cost is reduced, the codes are easy to search and locate, the organization mode of the codes reflects the product structure, the codes correspond to the product requirements, and the codes are easier to maintain. After isolating each functional characteristic, when modifying and reconstructing codes in one functional characteristic, other functional characteristics are not influenced. Meanwhile, when a plurality of functional characteristics are developed in parallel, the conflict generated when the codes are combined is avoided.
Computer program code for carrying out operations for aspects of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and 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 disclosure. 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 units described in the embodiments of the present disclosure may be implemented by software or hardware. Where the name of a unit does not in some cases constitute a limitation of the unit itself, for example, the first retrieving unit may also be described as a "unit for retrieving at least two internet protocol addresses".
Claims (10)
1. A method of generating a fractal structure, comprising:
acquiring a first document with function description;
analyzing the first document to generate a first function tree; wherein a leaf node of the first function tree is associated with a first text segment in the first document having a smallest function description, and all the first text segments constitute the function description of the first document;
inputting each first text segment into a first function description classification model respectively to obtain segment types associated with the leaf nodes;
respectively acquiring the fractal unit type of the corresponding leaf node according to each fragment type;
generating a first functional fractal structure according to the first functional tree and the fractal unit types of the leaf nodes; each node of the first functional fractal structure at least comprises a fractal unit.
2. The method of claim 1, wherein parsing the first document to generate a first functional tree comprises:
performing function description analysis on the first document according to a function description analysis model to obtain a plurality of first analysis results; wherein the first parsing result includes: second text segment and second segment incidence relation information between the second text segments;
and generating a first functional tree according to the second text segment and the second segment incidence relation information.
3. The method according to claim 1, wherein the obtaining the fractal unit type of the corresponding leaf node according to each fragment type comprises:
and respectively acquiring the fractal unit type of the corresponding leaf node from a preset type matching data set according to each fragment type.
4. The method of claim 1, wherein the generating a first functional fractal structure from the first functional tree and the fractal element types for the leaf nodes comprises:
generating the fractal unit type of each node of the first functional tree according to the fractal unit type of the leaf node;
generating the first function fractal structure which is the same as the first node structure according to the first node structure of the first function tree;
and acquiring the corresponding fractal unit of the node of the first function fractal structure according to the fractal unit type of each node of the first function tree.
5. The method of claim 4, wherein the generating the fractal element type for each node of the first functional tree from the fractal element types for the leaf nodes comprises:
and in the first function tree, respectively generating the fractal unit types of the father nodes layer by layer according to the incidence relation of the fractal unit types of the child nodes of each father node from bottom to top.
6. The method according to claim 4, wherein the obtaining the fractal unit of the node of the corresponding first functional fractal structure according to the fractal unit type of each node of the first functional tree includes:
acquiring the fractal unit type of each node of the first function tree;
respectively acquiring corresponding fractal units from a preset fractal unit data set according to the fractal unit types;
and acquiring the fractal unit of the node of the first functional fractal structure according to the corresponding fractal unit and the corresponding relation between each node of the first functional tree and each node of the first functional fractal structure.
7. The method according to any one of claims 1 to 6, wherein the fractal unit at least includes: functional component information and functional component state information.
8. An apparatus for generating a fractal structure, comprising:
an acquisition document unit for acquiring a first document having a function description;
the analysis unit is used for analyzing the first document to generate a first function tree; wherein a leaf node of the first function tree is associated with a first text segment in the first document having a smallest function description, and all the first text segments constitute the function description of the first document;
the classification unit is used for inputting each first text segment into a first function description classification model respectively to obtain segment types associated with the leaf nodes;
the type obtaining unit is used for respectively obtaining the corresponding fractal unit type of the leaf node according to each fragment type;
a generating unit, configured to generate a first functional fractal structure according to the first functional tree and the fractal unit type of the leaf node; each node of the first functional fractal structure at least comprises a fractal unit.
9. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
10. An electronic device, comprising:
one or more processors;
storage means for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to carry out the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910699597.6A CN110489087B (en) | 2019-07-31 | 2019-07-31 | Method, device, medium and electronic equipment for generating fractal structure |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910699597.6A CN110489087B (en) | 2019-07-31 | 2019-07-31 | Method, device, medium and electronic equipment for generating fractal structure |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110489087A true CN110489087A (en) | 2019-11-22 |
CN110489087B CN110489087B (en) | 2023-05-30 |
Family
ID=68548855
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910699597.6A Active CN110489087B (en) | 2019-07-31 | 2019-07-31 | Method, device, medium and electronic equipment for generating fractal structure |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110489087B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111831582A (en) * | 2020-07-16 | 2020-10-27 | 中国科学院计算技术研究所 | Memory management device and method for intelligent processor and electronic equipment |
CN111831332A (en) * | 2020-07-16 | 2020-10-27 | 中国科学院计算技术研究所 | Control system and method for intelligent processor and electronic equipment |
CN111831331A (en) * | 2020-07-16 | 2020-10-27 | 中国科学院计算技术研究所 | Fractal reconfigurable instruction set for fractal intelligent processors |
CN111831333A (en) * | 2020-07-16 | 2020-10-27 | 中国科学院计算技术研究所 | Instruction decomposition method and device for intelligent processor and electronic equipment |
CN111831339A (en) * | 2020-07-16 | 2020-10-27 | 中国科学院计算技术研究所 | Instruction execution method and device for intelligent processor and electronic equipment |
WO2021135373A1 (en) * | 2019-12-31 | 2021-07-08 | 华为技术有限公司 | Associated conflict block presentation method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050166178A1 (en) * | 2004-01-23 | 2005-07-28 | Masticola Stephen P. | Process for global software development |
CN102789484A (en) * | 2012-06-28 | 2012-11-21 | 奇智软件(北京)有限公司 | Method and device for webpage information processing |
CN106250164A (en) * | 2016-08-16 | 2016-12-21 | 广州仕邦人力资源有限公司 | A kind of code generating method based on requirement documents and device |
CN107908602A (en) * | 2017-12-15 | 2018-04-13 | 北京文因互联科技有限公司 | A kind of file test method and its device |
CN108614898A (en) * | 2018-05-10 | 2018-10-02 | 爱因互动科技发展(北京)有限公司 | Document method and device for analyzing |
-
2019
- 2019-07-31 CN CN201910699597.6A patent/CN110489087B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20050166178A1 (en) * | 2004-01-23 | 2005-07-28 | Masticola Stephen P. | Process for global software development |
CN102789484A (en) * | 2012-06-28 | 2012-11-21 | 奇智软件(北京)有限公司 | Method and device for webpage information processing |
CN106250164A (en) * | 2016-08-16 | 2016-12-21 | 广州仕邦人力资源有限公司 | A kind of code generating method based on requirement documents and device |
CN107908602A (en) * | 2017-12-15 | 2018-04-13 | 北京文因互联科技有限公司 | A kind of file test method and its device |
CN108614898A (en) * | 2018-05-10 | 2018-10-02 | 爱因互动科技发展(北京)有限公司 | Document method and device for analyzing |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021135373A1 (en) * | 2019-12-31 | 2021-07-08 | 华为技术有限公司 | Associated conflict block presentation method and device |
US12118336B2 (en) | 2019-12-31 | 2024-10-15 | Huawei Cloud Computing Technologies Co., Ltd. | Method for presenting associated conflict block and device |
CN111831582A (en) * | 2020-07-16 | 2020-10-27 | 中国科学院计算技术研究所 | Memory management device and method for intelligent processor and electronic equipment |
CN111831332A (en) * | 2020-07-16 | 2020-10-27 | 中国科学院计算技术研究所 | Control system and method for intelligent processor and electronic equipment |
CN111831331A (en) * | 2020-07-16 | 2020-10-27 | 中国科学院计算技术研究所 | Fractal reconfigurable instruction set for fractal intelligent processors |
CN111831333A (en) * | 2020-07-16 | 2020-10-27 | 中国科学院计算技术研究所 | Instruction decomposition method and device for intelligent processor and electronic equipment |
CN111831339A (en) * | 2020-07-16 | 2020-10-27 | 中国科学院计算技术研究所 | Instruction execution method and device for intelligent processor and electronic equipment |
CN111831582B (en) * | 2020-07-16 | 2024-03-29 | 中国科学院计算技术研究所 | Memory management device and method for intelligent processor and electronic equipment |
CN111831333B (en) * | 2020-07-16 | 2024-03-29 | 中国科学院计算技术研究所 | Instruction decomposition method and device for intelligent processor and electronic equipment |
CN111831339B (en) * | 2020-07-16 | 2024-04-02 | 中国科学院计算技术研究所 | Instruction execution method and device for intelligent processor and electronic equipment |
CN111831331B (en) * | 2020-07-16 | 2024-04-05 | 中国科学院计算技术研究所 | Fractal reconfigurable instruction set for fractal intelligent processor |
Also Published As
Publication number | Publication date |
---|---|
CN110489087B (en) | 2023-05-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110489087B (en) | Method, device, medium and electronic equipment for generating fractal structure | |
US11734584B2 (en) | Multi-modal construction of deep learning networks | |
CN110489345B (en) | Crash aggregation method, device, medium and equipment | |
US9256583B2 (en) | Conversion of a presentation to Darwin Information Typing Architecture (DITA) | |
US11157444B2 (en) | Generating index entries in source files | |
CN114424257A (en) | Automatic rendering and extraction of form data using machine learning | |
CN113657113B (en) | Text processing method and device and electronic equipment | |
US20230297784A1 (en) | Automated decision modelling from text | |
CN110543297A (en) | method and apparatus for generating source code | |
CN113094286B (en) | Page test method and device, storage medium and electronic equipment | |
CN111078228A (en) | Method and device for converting webpage into small program, server and storage medium | |
CN117556011A (en) | Internal interaction question-answering auxiliary method and system based on generation type large model | |
US10216802B2 (en) | Presenting answers from concept-based representation of a topic oriented pipeline | |
CN113377342B (en) | Project construction method and device, electronic equipment and storage medium | |
CN113760834B (en) | File classification method, device, equipment and medium | |
US10380257B2 (en) | Generating answers from concept-based representation of a topic oriented pipeline | |
US20150026081A1 (en) | Method and system for managing standards | |
US10275462B2 (en) | Automatic translation of string collections | |
Madaminov et al. | Firebase Database Usage and Application Technology in Modern Mobile Applications | |
WO2015056816A1 (en) | Method and system for conversion of smart phone applications to basic phone applications | |
US11971887B2 (en) | Identifying and replacing logically neutral phrases in natural language queries for query processing | |
CN111723177A (en) | Modeling method and device of information extraction model and electronic equipment | |
CN114492413B (en) | Text proofreading method and device and electronic equipment | |
CN112232035B (en) | Article generation method and device, electronic equipment and storage medium | |
US20210081803A1 (en) | On-Demand Knowledge Resource Management |
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 |