Model-based demand document generation method and device, equipment and storage medium
By establishing a model indexing framework and using VTL language to generate requirements documents, the problems of standardization and automation in the preparation of radar system requirements documents are solved, and the documents are efficient, accurate and synchronously updated, improving the quality and efficiency of radar system requirements documents are achieved.
Patent Information
- Application Number
- CN202411290043.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-10
AI Technical Summary
The existing radar system requires that the document compilation process lacks standardization and automation, resulting in poor document inheritance, low efficiency and high possibility of errors, and it is difficult for documents to be updated synchronously when the model changes.
Using a model-based requirement document generation method, a model indexing framework is established by obtaining chapter entries and model elements of the radar system model, and a standardized requirement document is generated using VTL language to extract and combine model elements, supporting the use of multi-level index packages and document templates. , realize automated generation and synchronous updates.
It improves the standardization and standardization of required documents, shortens the document compilation cycle, reduces the error rate, and improves work efficiency and document quality.
Smart Images

Figure CN119106674A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of model-based system engineering design, and more specifically, to a method, device, equipment and storage medium for generating a requirement document based on a model. Background Art
[0002] At present, demand development and analysis are important links in the development process of radar systems, and their quality determines the direction of radar development. Insufficient demand analysis may lead to deviations in demand understanding, which will eventually affect the increase of project costs, the decline of product quality, and the delay of delivery date. The new model-based radar system development model uses professional modeling methods and tools to analyze product demand, define attributes for each demand, and track and change the demand by establishing associations, ensuring the completeness, accuracy, verifiability and unambiguity of the demand. However, since the model does not have perfect review conditions and standards, it currently mainly relies on correct and reasonable demand documents as a bridge for communication with customers. As a product of the system demand analysis link, the preparation process of the demand document is fixed for radar systems of different types and different development stages, except that the model content and parameters involved are different. However, the content form and degree of detail manually written by different designers based on the model are different, which not only leads to poor document inheritance and reduces work efficiency, but also increases the possibility of document errors and dependence on specific personnel once the model is changed. Summary of the invention
[0003] The object of the present invention is to provide a method, apparatus, device and storage medium for generating a requirement document based on a model, so as to solve at least one of the problems existing in the prior art.
[0004] In order to achieve the above object, the present invention adopts the following technical solutions:
[0005] A first aspect of the present invention provides a method for generating a requirements document based on a model, comprising:
[0006] In response to a request for generating a requirement document to be generated for a radar system model, obtaining a section entry of the requirement document to be generated;
[0007] Establishing a model index framework according to the chapter entries and the radar system model;
[0008] The model elements of the radar system model in the model index framework are extracted, the contents of each chapter of the requirement document are generated, and the target document corresponding to the requirement document to be generated is obtained.
[0009] Optionally, the establishing of a model index framework according to the chapter entries and the model element information includes:
[0010] According to the chapter entries of the requirement document, the model elements corresponding to the chapter entries in the radar system model are extracted, the model elements are placed in the index package in a linked manner according to the chapter requirements of the requirement document, and the model index framework is established in the form of a multi-level index package.
[0011] Optionally, the model elements of the radar system model in the model index framework are extracted to generate the contents of each chapter of the requirement document; and the target document corresponding to the requirement document to be generated is obtained, including
[0012] The model elements of the radar system model in the model index framework are extracted by using VTL language, the chapter contents of each chapter are generated, and the chapter contents of each chapter that have been generated are displayed;
[0013] According to the chapter items of the requirement document to be generated, the contents of each chapter are combined to obtain the target document.
[0014] Optionally, the extracting of model elements of the radar system model in the model index framework by using VTL language to generate the chapter contents of each chapter includes:
[0015] The model elements of the radar system model in the index package are extracted using VTL language according to the type of the model elements; wherein,
[0016] The types of model elements include model diagrams, requirements, behaviors, interfaces, text diagrams, and vocabularies.
[0017] Optionally, extracting the model elements in the index package using VTL language according to the type of the model elements includes:
[0018] When the type of the extracted model element is a model diagram, the model diagram is extracted according to the name of the model diagram;
[0019] When the type of the extracted model element is requirement, search for the sub-requirements of the next level to which the model element type belongs, extract the ID number and content of the sub-requirements respectively, and extract the ID number and content of the associated requirements according to the traceability relationship;
[0020] When the extracted model element type is behavior, search for the leaf node to which the activity belongs or the sub-state to which the state belongs, and extract the ID number and content of the associated requirement based on the refined relationship;
[0021] When the extracted model element type is an interface, search for the component attributes of the module to which the interface belongs, traverse its interfaces according to the module name, and extract the interaction object, direction, and flow attribute information of the interface respectively;
[0022] When the type of the extracted model element is a text diagram, the text content of the text diagram is extracted according to the name of the text diagram;
[0023] When the extracted model element type is a vocabulary, the name and content of each vocabulary row in the vocabulary are extracted according to the name of the vocabulary.
[0024] Optionally, before extracting the model elements of the radar system model in the model index framework and generating the chapter contents of each chapter of the requirement document, the following steps are also included:
[0025] Determining a document template corresponding to the demand document to be generated; generating the demand document to be generated according to the document template;
[0026] According to the document template, the extraction rules and display format of the requirement document to be generated are determined.
[0027] A second aspect of the present invention provides a model-based requirement document generation device, the device comprising:
[0028] A data acquisition module, configured to, in response to a request for generating a requirement document to be generated for a radar system model, acquire a section entry of the requirement document to be generated;
[0029] An index framework building module, used to build a model index framework according to the chapter entries and the radar system model;
[0030] The target document obtaining module is used to extract the model elements of the radar system model in the model index framework, generate the chapter contents of each chapter of the requirement document, and obtain the target document corresponding to the requirement document to be generated.
[0031] Optionally, the index framework building module builds a model index framework according to the chapter entry and the model element information, further comprising:
[0032] According to the chapter entries of the requirement document, the model elements corresponding to the chapter entries in the radar system model are extracted, the model elements are placed in the index package in a linked manner according to the chapter requirements of the requirement document, and the model index framework is established in the form of a multi-level index package.
[0033] The third aspect of the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method provided in the first aspect of the present invention when executing the program.
[0034] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method provided by the first aspect of the present invention.
[0035] The beneficial effects of the present invention are as follows:
[0036] The present invention provides a model-based requirement document generation method, which can conveniently and automatically generate standardized and normalized requirement documents according to chapter items from the model in the design process. Once the model is changed, the document can be changed synchronously, which greatly improves work efficiency, shortens the document preparation cycle, and improves document quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The specific implementation modes of the present invention will be further described in detail below in conjunction with the accompanying drawings.
[0038] Figure 1 A flow chart of a method for generating a requirement document based on a model in an embodiment of the present invention is shown.
[0039] Figure 2 Schematic diagram showing the detailed process of the method for generating a requirement document based on a model in an embodiment of the present invention
[0040] Figure 3 A schematic diagram showing a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to explain the present invention more clearly, the present invention is further described below in conjunction with embodiments and drawings. Similar components in the drawings are represented by the same reference numerals. It should be understood by those skilled in the art that the content specifically described below is illustrative rather than restrictive, and the protection scope of the present invention should not be limited thereto.
[0042] In one embodiment, Figure 1 As shown, a method for generating a requirement document based on a model is provided, comprising:
[0043] S1, in response to a request for generating a requirement document to be generated for a radar system model, obtaining a section entry of the requirement document to be generated;
[0044] In this step, the requirement document to be generated may be an online document, such as an online document generated according to a document template; the document generation request may be an instruction requesting generation of the requirement document to be generated or an instruction requesting display of the requirement document to be generated, such as an instruction triggered by a link to the requirement document to be generated; the chapters may be chapters in the requirement document to be generated; the model elements of the radar system model include model diagrams, text diagrams, vocabularies and requirements, etc.; the requirements include non-functional requirements, function-performance requirements and interface requirements of the radar system.
[0045] Specifically, the terminal obtains a document generation request for the requirement document to be generated, determines the corresponding requirement document to be generated in response to the document generation request for the requirement document to be generated, determines the chapter items of the requirement document to be generated from the requirement document to be generated, and obtains information of all model elements from the radar system model; wherein the model elements of the radar system model include model diagrams, requirements, behaviors, interfaces, text diagrams, and vocabularies, etc.
[0046] S2 establishes a model index framework according to the chapter entries and the radar system model;
[0047] Specifically, according to the chapter items of the requirement document, the model elements of the radar system model are placed in the index package in a linked manner according to the chapter requirements of the requirement document, and a model index framework is established in the form of a multi-level index package (Smart Package).
[0048] S3 extracts the model elements in the model index framework, generates the chapter contents of each chapter of the requirement document, and obtains the target document corresponding to the requirement document to be generated.
[0049] In this step, the content of each chapter may be text, tables, attachments, pictures and / or materials; the target document may be a requirement document to be generated, such as a requirement document to be generated that is saved or displayed on a terminal.
[0050] Specifically, the model elements in the index package are extracted using VTL (Velocity Template Language) according to the types of model elements to generate the contents of each chapter of the requirement document; wherein the types of model elements include: model diagram, requirement, behavior, interface, text diagram and vocabulary.
[0051] In the above document generation method, in response to a request for generating a requirement document to be generated for a radar system model, the chapter entries of the requirement document to be generated and the information of all model elements of the radar system model are obtained; a model index framework is established based on the information of the chapter entries and all model elements of the radar system model; the model elements of the radar system model in the model index framework are extracted to generate the chapter contents of each chapter of the requirement document; and the target document corresponding to the requirement document to be generated is obtained. This method is suitable for the generation of requirement documents of radar products of different types and different development stages, and the automatic generation time of the document is about 5s, which can greatly improve work efficiency. Once the model changes, the document can change synchronously, reducing the possibility of document errors, shortening the document preparation cycle, and improving document quality.
[0052] In one embodiment, the above-mentioned step S2 establishes a model index framework according to the chapter entries and the model elements, specifically including step S201, extracting the model elements corresponding to the chapter entries in the radar system model according to the chapter entries of the requirement document, and S202, placing the model elements in the index package in a linked manner according to the chapter requirements of the requirement document, and establishing the model index framework in the form of a multi-level index package.
[0053] The technical solution of this embodiment establishes the model index framework in the form of a multi-level index package according to the chapter entries of the requirement document, and puts the model elements into the index package in a linked manner according to the chapter requirements of the requirement document, so that once the radar system model changes, the generated requirement document can change synchronously, reducing the possibility of document errors, shortening the document preparation cycle, and improving document quality.
[0054] In one embodiment, the above step S3 extracts the model elements of the radar system model in the model index framework to generate the contents of each chapter of the requirement document; obtaining the target document corresponding to the requirement document to be generated specifically includes step S301, extracting the model elements of the radar system model in the model index framework using VTL language, generating the contents of each chapter, and displaying the generated contents of each chapter; step S302, combining the contents of each chapter according to the chapter entries of the requirement document to be generated to obtain the target document.
[0055] Specifically, the terminal generates the chapter contents of each chapter of the demand document to be generated according to the extraction order, and displays the chapter contents of the generated chapters in real time. When the chapter contents of each chapter have been generated, the chapter contents of each chapter are combined according to the chapter entries of the demand document to be generated to obtain the target document (for example, automatically assemble according to the order of the chapter tree and output the target document in word format).
[0056] The technical solution of this embodiment generates and displays the chapter contents of each chapter in sequence, thereby displaying the generated chapter contents first, which is beneficial to improving the efficiency and timeliness of document display so that users can see the content of the document more quickly. Moreover, the target document is obtained according to the combination of chapter entries, which is beneficial to improving the efficiency and accuracy of document generation.
[0057] In one embodiment, the above-mentioned step S301 of extracting model elements in the model index framework using VTL language specifically includes step S3011 of extracting model elements in the index package using VTL language according to the type of model elements; wherein the types of model elements include: model diagrams, requirements, behaviors, interfaces, text diagrams and vocabularies.
[0058] In one embodiment, the above step S301 of extracting the model elements in the index package using the VTL language according to the type of the model elements specifically includes:
[0059] When the type of the extracted model element is a model diagram, the model diagram is extracted according to the name of the model diagram;
[0060] When the type of the extracted model element is requirement, search for the sub-requirements of the next level to which the model element belongs, extract the ID number and content of the sub-requirements, and extract the ID number and content of the associated requirements based on the traceability relationship;
[0061] When the extracted model element type is behavior, search for the leaf node to which the activity belongs or the sub-state to which the state belongs, and extract the ID number and content of the associated requirement based on the refined relationship;
[0062] When the extracted model element type is an interface, search for the component attributes of the module to which the interface belongs, traverse its interfaces according to the module name, and extract the interaction object, direction, and flow attribute information of the interface respectively;
[0063] When the type of the extracted model element is a text diagram, the text content of the text diagram is extracted according to the name of the text diagram;
[0064] When the extracted model element type is a vocabulary, the name and content of each vocabulary row in the vocabulary are extracted according to the name of the vocabulary.
[0065] Specifically, when the extracted model element type is behavior, for example, loading the firmware is a leaf node, the corresponding requirement content is that the radar system should be able to automatically load the firmware, and the time from low-voltage power-on to program startup should not exceed 60s.
[0066] When the extracted model element type is a text diagram, the text content describing the radar system use case diagram is as follows: In the diagram, the ellipse symbol represents the use case, and the radar servo subsystem use cases are divided into six types, namely initialization, local control, azimuth rotation, health management, system testing, and system maintenance.
[0067] When the extracted model element type is requirement, the requirement is divided into task requirement and system requirement. System requirement is a refinement of task requirement. The requirement document mainly describes the system requirement. After extracting the system requirement, the ID number and content of the task requirement can be automatically extracted because the two have a traceability relationship.
[0068] For example, the mission requirement is that the radar servo subsystem drives the azimuth movement according to the given trajectory and angle, and the azimuth pointing accuracy is ≤1ˊ(3σ). There are three related system requirements, namely "the radar servo subsystem should have a position loop closure function, and the azimuth accuracy is ≤1ˊ(3σ)", "the radar servo subsystem should have a speed loop closure function, the overshoot should not exceed 30%, the rise time should not exceed 200ms, and the number of oscillations should not exceed 2 times", and "the radar servo subsystem should have a current loop closure function, and the closed-loop bandwidth should not be less than 100Hz".
[0069] In one embodiment, the above step S1 is in response to a request for generating a requirement document to be generated for a radar system model, obtaining the chapter entries of the requirement document to be generated and all model element information of the radar system model: step S101, the request for generating the requirement document to be generated, determining the locking information and content update time of each chapter; step S102, when the locking state is unlocked, or the locking time is after the content update time, obtaining all model element information of the radar system model.
[0070] In one embodiment, the above method can also determine the value rules and display format of the demand document to be generated through the following steps, specifically including determining the document template corresponding to the demand document to be generated; the demand document to be generated is generated according to the document template; based on the document template, determining the extraction rules and display format of the demand document to be generated.
[0071] In this embodiment, the demand document to be generated is generated according to the document template; the value-taking rule may be the content value-taking logic corresponding to the document template; and the display format may be a predetermined display format corresponding to the document template.
[0072] Specifically, the terminal obtains the dynamic parameters of the requirement document to be generated (such as project number and version), determines the document template corresponding to the requirement document to be generated based on the dynamic parameters, and obtains the value rules, display format and document export style of the document template as the value rules, display format and document export style of the requirement document to be generated.
[0073] The technical solution of this embodiment generates the contents of each chapter of the requirement document more quickly and accurately according to the value selection rules and display format of the document template, which is conducive to improving the efficiency and accuracy of document generation.
[0074] As attached Figure 2 The document generation method provided by the present application is described below with an embodiment. This embodiment uses the method as an example, and the main steps include:
[0075] Step 1: According to the chapter items of the requirements document, put the model elements into the index package in a linked manner according to the chapter requirements, and establish a model index framework in the form of a multi-level index package (Smart Package);
[0076] Step 2: Use VTL language to extract model elements in the model index package according to type to the requirement document;
[0077] Step 3: When the extracted model element type is "model diagram", extract the model diagram to the requirement document according to the name of the diagram;
[0078] Step 4: When the extracted model element type is "requirement", search for the next level requirement to which the model element belongs, extract the ID number and content of the requirement, and present it in the document in a table form. This part is mainly used to describe the non-functional requirements of the radar system; the non-functional requirements of the radar system include reliability, testability, safety requirements, etc.;
[0079] Step 5: When the extracted model element type is "requirement", the ID number and content of the associated requirement are extracted according to the traceability relationship and displayed in the document in a table form. This part is mainly used to describe the traceability relationship between requirements.
[0080] Step 6: When the extracted model element is "behavior", search for the leaf node to which "activity" belongs or the sub-state to which "state" belongs, extract the ID number and content of the associated requirements according to the refined relationship, and present them in the document in a table form. This part is mainly used to describe the function-performance requirements of the radar system;
[0081] Step 7: When the extracted model element is "interface", search for the component attributes of the module to which the interface belongs, traverse its interface according to the module name, extract the interactive object, direction and flow attribute information of the interface respectively, and present it in the document in a table form. This part is mainly used to extract the interface requirements of the radar system;
[0082] Step 8: When the extracted model element is a "text diagram", extract the text content to the document according to the name of the text diagram. This part is mainly used to describe the diagram description text of the radar system;
[0083] Step 9: When the extracted model element is a "vocabulary", the name and content of each line of vocabulary is extracted to a document according to the name of the vocabulary. This part is mainly used to describe the reference file or glossary of the radar system;
[0084] Step 10: Keep the chapter items of the requirements document consistent with the model index framework, replace the content of each chapter with VTL language, and integrate it into a professional modeling tool to automatically generate the requirements document.
[0085] In a specific embodiment, the model diagram is an important part of the requirement document, which mainly includes internal module diagrams, use case diagrams, activity diagrams, etc. The findElementInCollection call function in the VTL language is used to find the index package (Smart Package) and the model diagram according to the data type and name, respectively. The set statement is used to assign the searched model diagram to the variable, and the "." operator is used to extract the attribute image of the variable to the requirement document, that is, to extract the model diagram into the document.
[0086] In a specific embodiment, the non-functional requirements of the radar system (including reliability, safety, testability requirements, etc.) are mainly described by the model element "requirement". The foreach loop statement and if conditional judgment statement in the VTL language are used to traverse the model elements. When the model element type is "requirement", a list is created to traverse the next level of requirements using the forrow loop statement, and the "." operator is used to extract the requirements' attributes id and text to the requirements document, that is, to extract the ID number and content to the document.
[0087] In a specific embodiment, since there is a traceability relationship between model element requirements and requirements, for example, task requirements and system requirements. The table is created by using the forrow loop statement in the VTL language to traverse the task requirements, using the set statement to assign the task requirements to variables, using the "." operator to call the traceability attribute derivefrom of the variable to find the corresponding system requirements, and using the "." operator to extract the attribute id and text of the task requirements and system requirements to the requirements document, so as to facilitate viewing the traceability relationship between the two.
[0088] In a specific embodiment, the function-performance requirements of the radar system are mainly described by the model element "behavior". "Behavior" mainly includes activities, states, etc., and there is a refinement relationship between behavior and requirements. The foreach loop statement and if conditional judgment statement in the VTL language are used to traverse the model elements. When the model element type is "activity" or "state", the forrow loop statement is used to create a table to traverse the leaf nodes under "activity" or the sub-states under "state". The set statement is used to assign them to variables, and the "." operator is used to call the refinement attribute refines of the variable to find the corresponding requirements. The "." operator is used to extract the attribute id and text of the requirements to the requirements document, so as to facilitate viewing the refinement relationship between the two.
[0089] In a specific embodiment, the interface requirements of the radar system are mainly described by the model element "interface". The foreach loop statement in the VTL language is used to traverse the modules to which the interface belongs, and the if conditional judgment statement is used to find the interface to which the module belongs according to the module name and element type. The forrow statement is used to create a table to traverse each interface, and the set statement is used to assign values to variables. The "." operator is used to call the attributes of the variable partWithPort, direction, and ownedElement to the requirement document, that is, to call the interactive object, direction, and flow attribute information of the interface to the document.
[0090] In a specific embodiment, the chart description text in the requirement document is mainly described by the model element "text map". The findElementInCollection call function in the VTL language is used to find the index package (Smart Package) and the text map according to the data type and name respectively, and the set statement is used to assign the searched text map to the variable, and the "." operator is used to extract the attribute text of the variable to the requirement document, that is, to extract the chart description text to the document.
[0091] In a specific embodiment, the reference files or glossary in the requirements document are mainly described by the model element "vocabulary". The findElementInCollection call function in the VTL language is used to find the index package (Smart Package) and the vocabulary according to the data type and name, respectively. The getDiagramElements function and the set statement are used to obtain the elements in the vocabulary and assign them to variables. The foreach loop statement is used to traverse each row of elements, and the getProperty function is used to extract the name and text of the element to the document.
[0092] In this embodiment, a model-based method for automatically generating requirement documents can be applied to the automatic generation of requirement documents for radar products of different types and at different development stages, and the time for automatic document generation is about 5 seconds, which can greatly improve work efficiency. Once the model changes, the document can change synchronously, reducing the possibility of document errors, shortening the document preparation cycle, and improving document quality.
[0093] In a specific embodiment, a model-based requirement document generation device includes:
[0094] A data acquisition module, configured to, in response to a request for generating a requirement document to be generated for a radar system model, acquire information on chapter items of the requirement document to be generated and all model elements of the radar system model;
[0095] An index framework building module, used to build a model index framework according to the chapter entries and information of all model elements of the radar system model;
[0096] The target document obtaining module is used to extract the model elements in the model index framework, generate the chapter contents of each chapter of the requirement document, and obtain the target document corresponding to the requirement document to be generated.
[0097] The index framework building module builds a model index framework according to the chapter entries and the model element information, further comprising
[0098] According to the chapter entries of the requirement document, the model elements corresponding to the chapter entries in the radar system model are extracted, the model elements are placed in the index package in a linked manner according to the chapter requirements of the requirement document, and the model index framework is established in the form of a multi-level index package.
[0099] like Figure 3 As shown, a computer system suitable for implementing a model-based requirement document generation method provided in the above embodiment includes a central processing module (CPU), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) or a program loaded from a storage part into a random access memory (RAM). In the RAM, various programs and data required for the operation of the computer system are also stored. The CPU, ROM, and RAM are connected to each other through a bus. An input / output (I / O) interface is also connected to the bus.
[0100] The following components are connected to the I / O interface: an input part including a keyboard, a mouse, etc.; an output part including a liquid crystal display (LCD), etc. and a speaker, etc.; a storage part including a hard disk, etc.; and a communication part including a network interface card such as a LAN card, a modem, etc. The communication part performs communication processing via a network such as the Internet. A drive is also connected to the I / O interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that the computer program read therefrom is installed into the storage part as needed.
[0101] In particular, according to this embodiment, the process described in the flowchart above can be implemented as a computer software program. For example, this embodiment includes a computer program product, which includes a computer program tangibly contained on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium.
[0102] The flow chart and schematic diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product of the present embodiment. In this regard, each square box in the flow chart or schematic diagram can represent a part of a module, program segment or code, and a part of the above-mentioned module, program segment or code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the schematic diagram and / or flow chart, and the combination of the square boxes in the schematic diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0103] The modules involved in the description of this embodiment can be implemented by software or hardware. The modules described can also be set in a processor, for example, can be described as: a processor, a data acquisition module, used to respond to the generation request of the requirement document to be generated for the radar system model, obtain the chapter entries of the requirement document to be generated and the information of all model elements of the radar system model; an index framework establishment module, used to establish a model index framework according to the chapter entries and the information of all model elements of the radar system model; a target document acquisition module, used to extract the model elements in the model index framework, generate the chapter content of each chapter of the requirement document; and obtain the target document corresponding to the requirement document to be generated. The index framework establishment module establishes a model index framework according to the chapter entries and the model element information, and further includes extracting the model elements corresponding to the chapter entries in the radar system model according to the chapter entries of the requirement document, placing the model elements in the index package in a linked manner according to the chapter requirements of the requirement document, and establishing the model index framework in the form of a multi-level index package. Among them, the names of these modules do not constitute a limitation on the module itself under certain circumstances.
[0104] As another aspect, this embodiment further provides a non-volatile computer storage medium, which may be the non-volatile computer storage medium included in the above-mentioned device in the above-mentioned embodiment, or may be a non-volatile computer storage medium that exists independently and is not installed in the terminal.
[0105] In the description of the present invention, it should be noted that the terms "upper", "lower", etc. indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific position, be constructed and operated in a specific position, and therefore cannot be understood as a limitation on the present invention. Unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances.
[0106] It should also be noted that, in the description of the present invention, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0107] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not limitations on the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is impossible to list all the embodiments here. All obvious changes or modifications derived from the technical solution of the present invention are still within the protection scope of the present invention.
Claims
1. A method for generating a requirement document based on a model, characterized in that: include: In response to a request for generating a requirement document to be generated for a radar system model, obtaining a section entry of the requirement document to be generated; Establishing a model index framework according to the chapter entries and the radar system model; The model elements of the radar system model in the model index framework are extracted, the contents of each chapter of the requirement document are generated, and the target document corresponding to the requirement document to be generated is obtained.
2. The method according to claim 1, characterized in that The establishing of a model index framework according to the chapter entries and the model element information comprises: According to the chapter entries of the requirement document, the model elements corresponding to the chapter entries in the radar system model are extracted, the model elements are placed in the index package in a linked manner according to the chapter requirements of the requirement document, and the model index framework is established in the form of a multi-level index package.
3. The method according to claim 1, characterized in that The model elements of the radar system model in the extraction model index framework are used to generate the contents of each chapter of the requirement document; and the target document corresponding to the requirement document to be generated is obtained, including The model elements of the radar system model in the model index framework are extracted by using VTL language, the chapter contents of each chapter are generated, and the chapter contents of each chapter that have been generated are displayed; According to the chapter items of the requirement document to be generated, the contents of each chapter are combined to obtain the target document.
4. The method according to claim 3, characterized in that The method of extracting the model elements of the radar system model in the model index framework by using the VTL language and generating the chapter contents of each chapter includes extracting the model elements of the radar system model in the index package by using the VTL language according to the type of the model elements; wherein, The types of model elements include model diagrams, requirements, behaviors, interfaces, text diagrams, and vocabularies.
5. The method according to claim 4, characterized in that The extracting the model elements in the index package by using VTL language according to the type of the model elements includes: When the type of the extracted model element is a model diagram, the model diagram is extracted according to the name of the model diagram; When the type of the extracted model element is requirement, search for the sub-requirements of the next level to which the model element type belongs, extract the ID number and content of the sub-requirements respectively, and extract the ID number and content of the associated requirements according to the traceability relationship; When the extracted model element type is behavior, search for the leaf node to which the activity belongs or the sub-state to which the state belongs, and extract the ID number and content of the associated requirement based on the refined relationship; When the extracted model element type is an interface, search for the component attributes of the module to which the interface belongs, traverse its interfaces according to the module name, and extract the interaction object, direction, and flow attribute information of the interface respectively; When the type of the extracted model element is a text diagram, the text content of the text diagram is extracted according to the name of the text diagram; When the extracted model element type is a vocabulary, the name and content of each vocabulary row in the vocabulary are extracted according to the name of the vocabulary.
6. The method according to claim 1, characterized in that Before extracting the model elements of the radar system model in the model index framework and generating the chapter contents of each chapter of the requirement document, it also includes Determine a document template corresponding to the requirement document to be generated; The requirement document to be generated is generated according to the document template; According to the document template, the extraction rules and display format of the requirement document to be generated are determined.
7. A model-based demand document generation device, characterized in that: The device comprises: A data acquisition module, configured to, in response to a request for generating a requirement document to be generated for a radar system model, acquire a section entry of the requirement document to be generated; An index framework building module, used to build a model index framework according to the chapter entries and the radar system model; The target document obtaining module is used to extract the model elements of the radar system model in the model index framework, generate the chapter contents of each chapter of the requirement document, and obtain the target document corresponding to the requirement document to be generated.
8. The device according to claim 7, characterized in that The index framework building module builds a model index framework according to the chapter entry and the model element information, further comprising According to the chapter entries of the requirement document, the model elements corresponding to the chapter entries in the radar system model are extracted, the model elements are placed in the index package in a linked manner according to the chapter requirements of the requirement document, and the model index framework is established in the form of a multi-level index package.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Cited By
Automatic generation method supporting MBSE system model and design document
CN119989699A
A method for automatically generating MBSE system models and design documents
CN119989699B
