Embedded software development method and device, equipment and medium

By automatically generating the requirements, design and test documents of embedded software, establishing models and customizing software templates using LUA language, the problem of tracking inconsistencies in the existing embedded software development methods is solved, the R&D efficiency and software quality are improved, and the model reuse is realized.

CN119861924APending Publication Date: 2025-04-22TAIYUAN AERO INSTR
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411788458.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

In the existing embedded software development methods, the tracking between the software requirements specifications, software design instructions and test documents is inconsistent, resulting in low software quality and poor security, and the later software changes work tasks are cumbersome, so the same spectral software development model cannot be reused.

Method used

By automatically generating software requirements, design, system test cases and unit test case documents, establishing requirements models, design models and test models, using LUA language to customize software templates, realize the function of generating relevant documents in one click, ensuring consistency in functional point tracking, and realizing the reuse of embedded software development models in the same field.

Benefits of technology

It improves the efficiency of embedded software research and development, solves the problem of tracking inconsistency between software requirements, design, testing and code, realizes the reuse of embedded software development models in the same field, and improves software quality and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119861924A_ABST
    Figure CN119861924A_ABST
Patent Text Reader

Abstract

The invention provides an embedded software development method, device, equipment and medium, and relates to the technical field of embedded software developing.The method comprises the steps that a demand model of a to-be-developed embedded software system is established according to demand analysis of an embedded software system program, a design model is derived according to the demand model, and the to-be-developed embedded software system is developed according to a test standard; setting unit test attributes for the minimum processing unit in the design model, generating a unit test case model, and creating a system test case model based on the demand model; and respectively customizing software templates of a demand model, a design model, a unit test case model and a system test case model of the embedded software system, respectively importing the software templates corresponding to the models into the demand model, the design model, the unit test case model and the system test case model, and respectively generating software documents corresponding to the models. According to the method, the research and development efficiency is improved, the function point tracking consistency is ensured, and the embedded software development model multiplexing technology in the same field is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of embedded software development, and in particular to an embedded software development method, device, equipment and medium. Background Art

[0002] In the development of embedded software for embedded air data systems based on the 32-bit microprocessor (MCU) JS32F407, software developers are accustomed to the inherent development process, modifying the source code based on the functions of similar software, and reversely deducing the software requirements specifications and software design documents based on the code. This reverse software development method often leads to inconsistencies between software code and software requirements, design function points, and omissions of function points, which causes inconvenience to the heavy software testing work; when the software is subsequently changed, the above two documents and source code are changed separately, which is a large workload and is prone to incomplete changes.

[0003] Conventional embedded software development methods have the following shortcomings: (1) There is inconsistency in tracking between software requirement specifications, software design specifications, and test documents, resulting in low software quality and poor software security, and cumbersome tasks for subsequent software changes; (2) The development process of software of the same type cannot be reused, and repeated code modifications and repeated document compilation waste manpower and material resources. Summary of the invention

[0004] In view of this, the embodiments of the present application provide an embedded software development method, device, equipment and medium to automatically generate software requirements, designs, system test cases and unit test case documents to improve R&D efficiency; and ensure consistency in function point tracking to achieve embedded software development model reuse technology in the same field.

[0005] The present application embodiment provides the following technical solution: an embedded software development method, comprising:

[0006] According to the requirements analysis of the embedded software system program, a requirements model of the embedded software system to be developed is established, a design model is derived according to the requirements model, and according to the test standard, unit test attributes are set for the minimum processing unit in the design model to generate a unit test case model; based on the requirements model, a system test case model is created;

[0007] The software templates of the requirement model, the design model, the unit test case model and the system test case model of the embedded software system are customized respectively, the software templates corresponding to each model are imported into the requirement model, the design model, the unit test case model and the system test case model respectively, and the software documents corresponding to each model are generated respectively.

[0008] According to an embodiment of the present application, a demand model of an embedded software system to be developed is established based on the demand analysis of an embedded software system program, including:

[0009] According to the key functional information of the requirements in the embedded software development project file, a requirement data dictionary is compiled, and the corresponding requirement model is constructed by combining the system external interface relationship and the requirement data dictionary in the embedded software development task book.

[0010] According to an embodiment of the present application, based on the requirement model, a system test case model is created, including:

[0011] According to the requirement model and the requirement data dictionary, the processed data specification and attribute strategy are set to create the system test case model.

[0012] According to an embodiment of the present application, deriving a design model according to the demand model includes:

[0013] Configure the ports, data flows and control flows between software modules and interface modules according to functional requirements, and use the required data dictionary elements to describe the data item functions of software components, data flows and control flows;

[0014] Check and decompose each software module until the smallest soft unit, add corresponding input and output variables and global variables to the soft unit, draw software flow charts and generate pseudo code;

[0015] A semi-automatic method is used to generate the design model software code by combining code generation from the design model architecture and manual addition of related code.

[0016] According to an embodiment of the present application, the software templates of the requirement model, the design model, the unit test case model and the system test case model of the embedded software system are customized respectively using LUA language.

[0017] According to an embodiment of the present application, the software templates of the requirement model, the design model, the unit test case model and the system test case model of the embedded software system are customized respectively, including:

[0018] Analyze the template structure of the document corresponding to each model software, construct a template structure for each chapter in the document, configure the template structure of each chapter with the corresponding data acquisition method or data information, and finally complete the composition of the software template framework and data input configuration and export it as the software template of each model.

[0019] According to an embodiment of the present application, the template structure of the document corresponding to each model software is analyzed, and a template structure is constructed for each chapter in the document, including:

[0020] The functional requirement texts, tables and pictures in the document that need to be dynamically updated are identified and classified, and corresponding templates are made; natural language is used to describe the non-dynamically updated parts, including functionality and reliability indicators.

[0021] The present application also provides an embedded software development device, comprising:

[0022] The model creation module is used to establish a demand model of the embedded software system to be developed according to the demand analysis of the embedded software system program, derive a design model according to the demand model, set unit test attributes for the minimum processing unit in the design model according to the test standard, and generate a unit test case model; based on the demand model, create a system test case model;

[0023] The template customization and software generation module is used to customize the software templates of the requirement model, the design model, the unit test case model and the system test case model of the embedded software system respectively, import the software templates corresponding to each model into the requirement model, the design model, the unit test case model and the system test case model respectively, and generate software documents corresponding to each model respectively.

[0024] The present application also 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 above-mentioned embedded software development method when executing the computer program.

[0025] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing the above-mentioned embedded software development method.

[0026] Compared with the traditional embedded software development process, the beneficial effects that can be achieved by at least one of the above-mentioned technical solutions adopted in the embodiments of this specification include at least: the model-based embedded software development method proposed in the embodiments of the present invention for demand, design and test modeling can not only automatically generate software requirements, design, system test cases and unit test case documents, thereby improving development efficiency; but also solve the problem of tracking inconsistencies between software requirements, design, testing and code, thereby realizing the reuse technology of embedded software development models in the same field. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 It is a schematic diagram of the embedded software development method according to an embodiment of the present invention;

[0029] Figure 2 is a schematic diagram of the structure of an embedded software development device according to an embodiment of the present invention;

[0030] Figure 3 It is a schematic structural diagram of the electronic device of the present invention. DETAILED DESCRIPTION

[0031] The embodiments of the present application are described in detail below with reference to the accompanying drawings.

[0032] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.

[0033] like Figure 1 As shown, an embodiment of the present invention provides a method for developing customized embedded software based on models and templates, comprising:

[0034] S101. According to the requirements analysis of the embedded software system program, a requirements model of the embedded software system to be developed is established, a design model is derived from the requirements model, and according to the test standard, unit test properties are set for the minimum processing unit in the design model to generate a unit test case model; based on the requirements model, a system test case model is created;

[0035] S102. Customize the software templates of the requirement model, the design model, the unit test case model and the system test case model of the embedded software system respectively, import the software templates corresponding to each model into the requirement model, the design model, the unit test case model and the system test case model respectively, and generate software documents corresponding to each model respectively.

[0036] The model-based embedded software development method of the embodiment of the present invention uses the model to drive software development. On the basis of building a software requirement model, a design model and a test model are derived, and the established requirement, design and test models are exported as a standard model, which can be reused for embedded software development in the same field. In addition, the LUA language is used to create software templates, and each chapter is marked with functional requirements, pictures and tables. When customizing software requirement, design, system test case and unit test case templates, relevant templates are called as needed, and based on the various models that have been built, the function of generating software requirement, design, system test case and unit test case documents with one click is realized.

[0037] In a specific implementation method of an embodiment of the present invention, a requirement model of an embedded software system to be developed is established based on the requirement analysis of an embedded software system program, including: compiling a requirement data dictionary based on the key functional information of the requirements in the embedded software development project file, combining the system external interface relationship in the embedded software development task book and the requirement data dictionary to construct the corresponding requirement model.

[0038] During the specific implementation, the key functional information of the requirements in the project file is compiled into a requirements data dictionary; the corresponding requirements model is constructed by combining the system external interface relationship and the requirements data dictionary in the software development task book, and the data specifications of the processing and terminals in the requirements model, and the input and output data flow / control flow between each other are defined. The data specifications of the processing and terminals use a combination of data dictionary elements and regular expressions to specifically describe the input and output data items, and the consistency of the input and output data items is checked; the system modules are decomposed layer by layer until the smallest module is reached, and the requirements model is constructed.

[0039] In a specific implementation of the embodiment of the present invention, a system test case model is created based on the requirement model, including: setting the processed data specification and attribute strategy according to the requirement model and the requirement data dictionary, and creating the system test case model.

[0040] In a specific implementation of an embodiment of the present invention, a design model is derived according to the requirement model, including: configuring ports, data flows, and control flows between software modules and interface modules according to functional requirements, and using requirement data dictionary elements to describe the data item functions of soft components, data flows, and control flows; checking and decomposing each software module until the smallest soft unit, adding corresponding input and output variables and global variables to the soft unit, drawing software flow charts, and generating pseudocode; and using a semi-automatic method to generate design model software code by combining design model architecture code generation and manual addition of related code.

[0041] In a specific implementation of the embodiment of the present invention, according to the test standard, a unit test attribute is set for the minimum processing unit in the design model using a regular expression to generate a unit test case model.

[0042] In a specific implementation of the embodiment of the present invention, the software templates of the requirement model, the design model, the unit test case model and the system test case model of the embedded software system are customized respectively using LUA language.

[0043] During the specific implementation, the software templates of the requirement model, the design model, the unit test case model and the system test case model of the embedded software system are customized using the LUA language, the functional requirements of the constructed requirement model, design model, unit test case model and system test case model are obtained through the code, and non-functional requirements such as general quality characteristics are defined using natural language; finally, the software documents corresponding to each model are generated with one click.

[0044] In a specific implementation of an embodiment of the present invention, the software templates of the requirement model, the design model, the unit test case model and the system test case model of the embedded software system are customized respectively, including: analyzing the template structure of the document corresponding to each model software, constructing a template structure for each chapter in the document, configuring the template structure of each chapter with the corresponding data acquisition method or data information, and finally completing the composition and data input configuration of the software template framework and exporting it as the software template of each model.

[0045] In the specific implementation, the specific method of using LUA language to customize the software template of each model is as follows:

[0046] (1) Analyze the template structure of the software document, construct a template structure for each chapter, identify and classify the functional requirement texts, tables, and pictures that need to be dynamically updated in the document, and make templates corresponding to each part; use natural language to describe the functional performance, reliability and other indicators for the non-dynamically updated parts;

[0047] (2) Filter different functional requirement texts, tables, and picture mark configurations to associate corresponding data acquisition methods or data information, complete the software template framework composition and data input configuration, and export them as software templates;

[0048] Among them, the functional requirement text describes the specific functional requirements in chapters based on the constructed model hierarchy by binding the model hierarchy number and name. For example, the first-level system processing diagram in the requirement model corresponds to Chapter 1 Initializing the System; the second-level software processing diagram corresponds to Section 1.1 Initializing Peripherals.

[0049] Image tag configuration starts with {export template begin@} and ends with {@export template end}. After obtaining the model image in the tag content, set the image number, name, size, color and other information if the image is not empty. In addition, the number and name of the image need to be dynamically obtained and updated in the tag below the image.

[0050] Table tag configuration dynamically adjusts the number of table rows based on the number of data flows / control flows processed in the model, obtains relevant attribute information processed in the model as needed, fills the table in sequence, and sets text font, size and other formats.

[0051] Finally, based on the existing model, import the customized software template and generate the software documentation of the relevant model with one click.

[0052] like Figure 2 As shown, the present application also provides an embedded software development device 200, comprising:

[0053] The model creation module 201 is used to establish a demand model of the embedded software system to be developed according to the demand analysis of the embedded software system program, derive a design model according to the demand model, set unit test attributes for the minimum processing unit in the design model according to the test standard, and generate a unit test case model; based on the demand model, create a system test case model;

[0054] The template customization and software generation module 202 is used to customize the software templates of the requirement model, the design model, the unit test case model and the system test case model of the embedded software system respectively, import the software templates corresponding to each model into the requirement model, the design model, the unit test case model and the system test case model respectively, and generate software documents corresponding to each model respectively.

[0055] In specific implementation, the model creation module 201 is used to compile a demand data dictionary based on the key functional information of the requirements in the embedded software development project file, and to construct the corresponding demand model in combination with the system external interface relationship in the embedded software development task book and the demand data dictionary.

[0056] The model creation module 201 is further used to set the processed data specification and attribute strategy according to the requirement model and the requirement data dictionary, and create the system test case model.

[0057] The model creation module 201 is also used to configure the ports, data flows and control flows between the software modules and the interface modules according to the functional requirements, and use the required data dictionary elements to describe the data item functions of the software components, data flows and control flows; check and decompose each software module until the smallest soft unit, add corresponding input and output variables and global variables to the soft unit, draw software flow charts and generate pseudocode; adopt a semi-automatic method to generate the design model software code by combining the design model architecture to generate code and manually add related code.

[0058] The template customization and software generation module 202 is used to customize the software templates of the requirement model, the design model, the unit test case model and the system test case model of the embedded software system respectively using the LUA language.

[0059] The template customization and software generation module 202 is also used to analyze the template structure of the document corresponding to each model software, construct the template structure for each chapter in the document, configure the template structure of each chapter with the corresponding data acquisition method or data information, and finally complete the composition of the software template framework and the data input configuration and export it as the software template of each model. Among them, the template structure of the document corresponding to each model software is analyzed, and the template structure is constructed for each chapter in the document, including: marking and classifying the functional requirement text, tables and pictures that need to be dynamically updated in the document, and making corresponding templates for each category; using natural language to describe the non-dynamically updated part including functionality and reliability indicators.

[0060] The embodiment of the present invention uses forward engineering ideas to perform abstract and modular structural function decomposition of embedded software functions, extracts functional requirement keywords in the software development task book to generate a data dictionary, maps the required functions into processing and data flow / control flow described by the data dictionary, and constructs a requirement model that meets the functional requirements. Based on the requirement model, the system test case model, software design model and unit test case model are derived, and the corresponding templates are customized using the LUA language to generate the requirements, design, system test cases and unit test documents corresponding to the model software. Using the model as a prototype to drive software development can better ensure the consistency of function point tracking.

[0061] The present invention provides a hardware electronic device, such as Figure 3 As shown, it includes a memory and a 32-bit microprocessor (MCU) JS32F407, and the memory stores embedded software development programs and constructed model templates.

[0062] Specifically, the hardware electronic device may be a computer terminal, a server or a similar computing device.

[0063] In this embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program for executing the above-mentioned embedded software development method.

[0064] Specifically, computer-readable storage media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer-readable storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0065] Obviously, those skilled in the art should understand that the modules or steps of the above-mentioned embodiments of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the embodiments of the present invention are not limited to any specific combination of hardware and software.

[0066] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. An embedded software development method, characterized in that: include: According to the requirements analysis of the embedded software system program, a requirements model of the embedded software system to be developed is established, a design model is derived according to the requirements model, and according to the test standard, unit test attributes are set for the minimum processing unit in the design model to generate a unit test case model; based on the requirements model, a system test case model is created; The software templates of the requirement model, the design model, the unit test case model and the system test case model of the embedded software system are customized respectively, the software templates corresponding to each model are imported into the requirement model, the design model, the unit test case model and the system test case model respectively, and the software documents corresponding to each model are generated respectively.

2. The embedded software development method according to claim 1, characterized in that: According to the requirements analysis of the embedded software system program, establish the requirements model of the embedded software system to be developed, including: According to the key functional information of the requirements in the embedded software development project file, a requirement data dictionary is compiled, and the corresponding requirement model is constructed by combining the system external interface relationship and the requirement data dictionary in the embedded software development task book.

3. The embedded software development method according to claim 2, characterized in that: Based on the requirement model, create a system test case model, including: According to the requirement model and the requirement data dictionary, the processed data specification and attribute strategy are set to create the system test case model.

4. The embedded software development method according to claim 2, characterized in that: A design model is derived according to the demand model, including: Configure the ports, data flows and control flows between software modules and interface modules according to functional requirements, and use the required data dictionary elements to describe the data item functions of software components, data flows and control flows; Check and decompose each software module until the smallest soft unit, add corresponding input and output variables and global variables to the soft unit, draw software flow charts and generate pseudo code; A semi-automatic method is used to generate the design model software code by combining the design model architecture to generate code and manually add related code.

5. The embedded software development method according to claim 1, characterized in that: The software templates of the requirement model, the design model, the unit test case model and the system test case model of the embedded software system are customized respectively using LUA language.

6. The embedded software development method according to claim 1, characterized in that: The software templates of the requirement model, the design model, the unit test case model and the system test case model of the embedded software system are customized respectively, including: Analyze the template structure of the document corresponding to each model software, construct a template structure for each chapter in the document, configure the template structure of each chapter with the corresponding data acquisition method or data information, and finally complete the composition of the software template framework and data input configuration and export it as the software template of each model.

7. The embedded software development method according to claim 6, characterized in that: Analyze the template structure of the documents corresponding to each model software, and construct the template structure for each chapter in the document, including: The functional requirement texts, tables and pictures in the document that need to be dynamically updated are identified and classified, and corresponding templates are made; natural language is used to describe the non-dynamically updated parts, including functionality and reliability indicators.

8. An embedded software development device, characterized in that: include: The model creation module is used to establish a demand model of the embedded software system to be developed according to the demand analysis of the embedded software system program, derive a design model according to the demand model, set unit test attributes for the minimum processing unit in the design model according to the test standard, and generate a unit test case model; based on the demand model, create a system test case model; The template customization and software generation module is used to customize the software templates of the requirement model, the design model, the unit test case model and the system test case model of the embedded software system respectively, import the software templates corresponding to each model into the requirement model, the design model, the unit test case model and the system test case model respectively, and generate software documents corresponding to each model respectively.

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 computer program, the embedded software development method according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program for executing the embedded software development method according to any one of claims 1 to 7.