Demand specification description template of complex embedded software system and generation method
Patent Information
- Application Number
- CN202411147110.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-11-26
AI Technical Summary
The existing technology is difficult to effectively describe and obtain high-quality requirements regulations for complex embedded software systems, resulting in incomplete and inconsistent misunderstanding and requirements during the development process, increasing development difficulty and cost.
Provide a requirement specification description template and generation method for complex embedded software systems, including declaring parts, combining problems and atomic problems, expressing requirements information through basic statements, reducing demand modifications and misunderstandings.
By clarifying requirements regulations, we can reduce misunderstandings and confusion in the development process, save time and costs, and improve the development efficiency of embedded software systems.
Smart Images

Figure CN119025076A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of embedded system requirement specification, and more particularly to a requirement specification description template and a generation method for a complex embedded software system. Background Art
[0002] Embedded systems have evolved from single-chip microcomputers, microcontrollers, and systems on chips to networking. Their applications involve smart homes, industrial control, traffic management, aerospace, automotive electronics, rail transportation, and other fields, and have good development prospects. At the same time, the scale of embedded systems and the complexity of their requirements are also increasing. For example, in 2007, a typical high-end car contained about 270 functions that interacted with the driver, and by 2010, the number of such functions contained in high-end cars increased to more than 500. Not only that, the complexity of embedded system requirements is also reflected in the sharp increase in connected devices. In 2010, the number of smart connected devices in the world reached 12.5 billion, and by 2020, this number has quadrupled. The complexity of device control requirements has brought great challenges to the development of embedded software systems.
[0003] For complex software system development, the requirements phase is the most error-prone and costly phase, especially for embedded software systems. More than 50% of errors in the embedded field occur during system delivery and are related to misunderstandings of requirements. Requirements issues that lead to software disasters can be divided into two categories: one is misunderstanding, updating, and implementation of requirements, and the other is incomplete, inconsistent, and unmet requirements. Accurately describing and obtaining high-quality software requirements specifications has become a key task in embedded system development.
[0004] There are many software requirement specification methods, such as AI-assisted limited Chinese natural language requirement template method and its automatic generation method to SysML model, and automatic generation method of LTL specification from natural language based on domain knowledge using natural language understanding technology. However, these methods focus on general software requirements, without considering embedded system equipment and requirement characteristics, and are not suitable for embedded system software requirement specifications. Therefore, how to propose a requirement specification description template and generation method for complex embedded software systems is an urgent problem that technicians in this field need to solve. Summary of the invention
[0005] In view of this, the present invention provides a requirement specification description template and generation method for a complex embedded software system, which reduces requirement modifications during the development process according to the requirement characteristics of the embedded software system, saving time and cost.
[0006] In order to achieve the above object, the present invention provides the following technical solutions:
[0007] A requirement specification description template for a complex embedded software system includes a declaration part, a combination problem and an atomic problem; the declaration part, the combination problem and the atomic problem are expressed by basic statements, and the basic statements include declaration statements, expressions and constraint statements, time-independent control statements and time-dependent control statements; the declaration part includes cycle declarations, device declarations, storage declarations and timer declarations; the cycle declaration statement declares the cycle in the embedded software system, the device declaration statement is used to describe the device information in the embedded software system, the storage declaration is used to describe the storage information in the embedded software system, and the timer declaration is used to describe the timer information in the embedded software system. The declaration part is declared through declaration statements; the expression and constraint statements include single variable declarations. Definition statements, array definition statements, calculation expression statements, assignment expression statements, comparison expression statements, Boolean expression statements and design constraint statements; single variable definition statements are used to define variable data of a single specified type, and are mainly used to create temporary variables in the specification; array definition statements are used to define array variables of a single specified type, and are mainly used to create temporary variables in the specification; calculation expression statements are used to describe common arithmetic operations; assignment expression statements are used to describe assignment operations; comparison expression statements are used to describe common comparison operations; Boolean expression statements are used to describe Boolean logic; design constraint statements are used to describe the precision, space and time constraints of the requirements during design implementation; time-independent control statements include sequential statements, partition statements, Branch statements, loop statements, selection statements, and concurrent statements; sequential statements describe the logical relationship between two statements executed in sequence, branch statements describe the logical relationship between multiple statements selected for execution based on branch conditions, loop statements describe the logical relationship of loop execution, selection statements describe the logical relationship between two or more groups of statements selecting one group to execute, and concurrent statements describe the logical relationship between two or more groups of statements executed concurrently; time-related control statements include delay statements, specified time occurrence statements, and continuous conditional satisfaction execution statements; delay statements express the operational logic of delaying and waiting for a specified time before continuing to execute, specified time occurrence statements express the operational logic of executing at a specific moment in the cycle, and continuous conditional satisfaction execution statements express the Boolean condition of multiple consecutive executions. When it is true in a cycle or within a specified time length, the operation logic of the specified statement is executed; the description statement of the combined problem expresses the problem name, problem abbreviation, sub-problem, relationship and constraints between sub-problems. The combined problem is composed of multiple problems; the description statement of the atomic problem expresses the problem name, abbreviation, parameters, I / O formula, interaction flow, satisfied requirements and design constraints. The problem name and abbreviation are used to uniquely identify the atomic problem. The parameters are used to describe the equipment, storage, and physical quantity information used. Atomic problems of different modes have different parameter definitions; I / O formulas include input, output and processing logic; interaction flow describes the interaction process between software and equipment and other entities in the atomic problem; satisfied requirements record the requirements names in the requirements description problem diagram corresponding to the atomic problem;Design constraints are used to describe the precision and time constraints that software developers should pay attention to when implementing software. Atomic problems are problems that cannot be decomposed in embedded systems.
[0008] Optional, atomic problems include seven categories, namely data acquisition, timer initialization, data control, data conversion, command data storage, data transmission, and automatic storage atomic problems; data acquisition atomic problems require the software to collect raw data from passive devices, convert the raw data into target data, and finally save it to the data storage. Its parameters include passive devices and data storage; timer initialization atomic problems require the software to send a start instruction to the timer to complete the purpose of starting the timer. Its parameter is only the timer; automatic storage atomic problems require the software to automatically save specified data to the data storage, and its parameter is only a single data storage; data control-based atomic problems require the software to retrieve device operation instructions from the data storage The command is converted into the signal format required by the device, and then sent to the device to drive the device to complete the corresponding operation. Its parameters include data storage and passive devices; the data conversion atomic problem requires the software to take out the input data from the input data storage, convert it into output data according to the conversion logic, and save it to the output data storage. Its parameters include input data storage and output data storage; the command data storage atomic problem requires the software to receive the command from the active device, parse the required data from the command and save it to the data storage field. Its parameters include active devices and data storage; the data transmission atomic problem requires the software to take out the data from the data storage, package the data and send it to the active device. Its parameters include data storage and active devices.
[0009] A method for generating requirements specification of a complex embedded software system, using the above-mentioned requirements specification description template of a complex embedded software system, comprises the following steps:
[0010] S1. Generate requirement statements, input sub-problem diagrams, data dictionaries, system components and equipment libraries provided by requirement engineers, and output cycle statements, equipment statements, storage statements and timer statements;
[0011] S2. Generate a combination problem of requirements, input the sub-problem diagram and scenario diagram provided by the requirements engineer, the requirements tracking relationship diagram, and the device state machine of the device library, and output the specification of the combination problem;
[0012] S3. Generate atomic problems of requirements, input the problem graph and scenario graph of each sub-problem in the complex embedded software system, and output atomic requirement specifications.
[0013] Optionally, S1 is:
[0014] S11, search the problem graph and obtain the names, abbreviations, and types of all timers, devices, and data storages therein;
[0015] S12, searching in the system composition according to the timer and device name, and obtaining detailed information of the timer and device;
[0016] S13, searching in the device library to obtain attribute information of the timer and the device;
[0017] S14, searching for expected interaction content in the problem graph, identifying expected interactions for saving data, and identifying data that needs to be saved for data storage in combination with the data dictionary;
[0018] S15. Obtain period information directly from system components.
[0019] Optionally, S2 is specifically:
[0020] S21, detecting data dependency and device dependency;
[0021] S22, perform schedulability analysis on the combination problem based on data dependency, device dependency and demand tracking relationship diagram;
[0022] S23. Domain experts fill in the problem name, abbreviation, sub-problems, and constraints of the combined problem specification, and then fill in the relationship fields between sub-problems according to the scheduling sequence.
[0023] Optional, S3 is:
[0024] S31. Identify the types of atomic problems;
[0025] S32. Generate a requirement specification for the atomic problem according to a specification description template of a corresponding type.
[0026] It can be seen from the above technical solution that, compared with the prior art, the present invention provides a requirement specification description template and generation method for a complex embedded software system, which has the following beneficial effects: the present invention provides a requirement specification description template and generation method for a complex embedded software system based on the requirement characteristics of the embedded software system. Requirements engineers can use this method to clarify requirements and provide detailed embedded software system requirement descriptions, thereby reducing misunderstandings and confusions in the development process, thereby reducing requirement modifications in the development process, saving time and costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0028] Figure 1A schematic diagram of a requirement specification description template of the present invention;
[0029] Figure 2 A flow chart of a method for generating requirements specifications of the present invention;
[0030] Figure 3 Generate a flow chart for the requirement combination problem of the present invention;
[0031] Figure 4 It is the device state machine of the Pulse Generator of the lighting control system in the embodiment of the present invention;
[0032] Figure 5 It is a state machine of a Light Sensor device of a lighting control system in an embodiment of the present invention;
[0033] Figure 6 It is a device state machine of the lighting control system LightUnit in an embodiment of the present invention;
[0034] Figure 7 This is a problem diagram of the Commanded Save requirement of the lighting control system in an embodiment of the present invention;
[0035] Figure 8 A scenario diagram of the Commanded Save requirement of the lighting control system in an embodiment of the present invention;
[0036] Fig. 9 This is a problem diagram of the initialization requirements of the lighting control system in an embodiment of the present invention;
[0037] Fig.10 A scenario diagram of the initialization requirements of the lighting control system in an embodiment of the present invention;
[0038] Fig.11 It is a problem diagram of LU Control Output requirements of the lighting control system in an embodiment of the present invention;
[0039] Fig.12 A scenario diagram of the LU Control Output requirement of the lighting control system in the embodiment of the present invention;
[0040] Fig.13 This is a problem diagram of the Automatic Save requirement of the lighting control system in an embodiment of the present invention;
[0041] Fig.14 A scenario diagram of the Automatic Save requirement of the lighting control system in the embodiment of the present invention;
[0042] Fig.15A demand tracking relationship diagram of a lighting control system in an embodiment of the present invention;
[0043] Fig.16 Schematic diagram of data dependency of a lighting control system in an embodiment of the present invention;
[0044] Fig.17 A schematic diagram of device dependency of a lighting control system in an embodiment of the present invention;
[0045] Fig.18 A schematic diagram of the dependency relationship of a lighting control system in an embodiment of the present invention;
[0046] Fig.19 The figure is a schematic diagram of the conversion relationship between the scenario diagram and the specification statement in the embodiment of the present invention. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] The embodiment of the present invention discloses a requirement specification description template for a complex embedded software system, such as Figure 1 As shown, it includes the declaration part, combinatorial problems and atomic problems; the declaration part, combinatorial problems and atomic problems are expressed by basic statements, and the basic statements include declaration statements, expressions and constraint statements, time-independent control statements and time-related control statements; the declaration part includes cycle declarations, device declarations, storage declarations and timer declarations, and the declaration part is declared through declaration statements; the description statement of the combinatorial problem expresses the problem name, problem abbreviation, sub-problems, relationships and constraints between sub-problems, and the combinatorial problem is composed of multiple problems; the description statement of the atomic problem expresses the problem name, abbreviation, parameters, I / O formulas, interaction flows, satisfied requirements and design constraints, and the atomic problem is a problem that cannot be decomposed further in the embedded system.
[0049] Declaration statements include cycle declaration statements, device declaration statements, storage declaration statements and timer declaration statements; the cycle declaration statement declares the cycle in the embedded software system, the device declaration statement is used to describe the device information in the embedded software system, the storage declaration is used to describe the storage information in the embedded software system, and the timer declaration is used to describe the timer information in the embedded software system.
[0050] In the embodiment of the present invention, a cycle declaration statement can declare multiple cycles, each cycle is composed of a cycle name, a cycle length and a unit, and the unit can be selected from seconds (s) and milliseconds (ms). For example, "pid1:100,ms;" means that a cycle named pid1 with a length of 100ms is declared;
[0051] The device declaration statement can declare multiple devices at the same time. Each device needs to describe the device type, device name, device abbreviation, communication port, response time, data accuracy and other fields. The device type includes passive devices and active devices. Passive devices are divided into sensors and actuators. The device type can be further refined according to the actual case needs. Passive devices refer to those devices that can be precisely controlled by software. The software can fully control the behavior of passive devices, such as sensors, actuators, timers, etc. Active devices refer to devices that cannot be precisely controlled by software. The software can only observe the behavior of active devices or send data to active devices, such as monitoring computers.
[0052] The storage declaration statement can declare multiple data stores at the same time. Each data store needs to describe the storage name, abbreviation, and the name of the data stored in the storage. For example, "Light Command (LC): OpenInstruction, CloseInstruction;" declares the light command (Light Command, LC for short) storage, which is used to store the light opening instruction (OpenInstruction) and the light closing instruction (CloseInstruction).
[0053] The timer declaration statement can declare multiple timers. Each timer needs to describe its name, abbreviation, and the timing attribute of the timer. For example, the statement "Timer10(T10):10,ms;" declares a timer named Timer10, which is abbreviated as T10 and has a timing attribute of 10ms, indicating that a timing signal is emitted every 10ms.
[0054] Expression and constraint statements include single variable definition statements, array definition statements, calculation expression statements, assignment expression statements, comparison expression statements, Boolean expression statements and design constraint statements; single variable definition statements are used to define variable data of a single specified type, and are mainly used to create temporary variables in the specification; array definition statements are used to define array variables of a single specified type, and are mainly used to create temporary variables in the specification; calculation expression statements are used to describe common arithmetic operations; assignment expression statements are used to describe assignment operations; comparison expression statements are used to describe common comparison operations; Boolean expression statements are used to describe Boolean logic; and design constraint statements are used to describe the constraint information on precision, space, and time of the requirement issues during design implementation.
[0055] In the embodiment of the present invention, the single variable definition statement is used to define a single variable data of a specified type, and is mainly used to create temporary variables in the specification. When using this statement to define a single variable, it is necessary to provide the variable type, variable name and variable description. The variable type can select basic data types and complex data types. For example, real number type belongs to basic data types, and periodic type belongs to complex data types. The variable name is an identifier. The variable description is a text of string type, which is used as supplementary information to describe the variable. For example, the statement "Real temper = "living room temperature data";" means that a real number variable named temper is defined, and it is explained that the variable represents the living room temperature data.
[0056] The array definition statement is used to define a single array variable of a specified type. It is mainly used to create temporary variables in the specification. When using this statement to define an array variable, you need to give the array type, array variable name, and the number of array elements. The array type can be a basic data type or a complex data type; the array variable name is an identifier; the number of array elements is represented by an integer. For example, the statement "String strArray
[10] ;" means that a string array named strArray is defined, and the array has a total of 10 string elements;
[0057] The calculation expression statement is used to describe common arithmetic operations. The calculation expression statement consists of the calculation left operand, calculation type and calculation right operand. The left operand and right operand are real numbers or variable identifiers. The calculation type supports addition (+), subtraction (-), multiplication (*), division ( / ), and modulus (%) operations. For example, the statement "a+1.5;" means adding the real number 1.5 to the variable a.
[0058] An assignment expression statement is used to describe an assignment operation. An assignment expression statement consists of an assignment left operand and an assignment right operand. The left operand is a variable identifier, and the right operand can be an identifier, a string, a real number, or a calculation expression. For example, "s = "Hello World";" means assigning the string "Hello World" to s.
[0059] Comparison expression statements are used to describe common comparison operations. Comparison expression statements consist of a comparison left operand, a comparison type, and a comparison right operand. The left operand can be an identifier, a string, or a real number, and the right operand can be an identifier, a string, a real number, or a calculation expression. The comparison type supports less than (<), less than or equal to (<=), equal to (==), greater than or equal to (>=), greater than (>), and not equal to (!=). For example, the statement "b>3.14;" means that b is greater than the real number 3.14;
[0060] Boolean expression statements are used to describe Boolean logic. Boolean expression statements use a single Boolean value (true and false), a single comparison expression, or multiple Boolean values and comparison expressions connected by logical connectives (not, and, and or) to express Boolean logic. For example, the statement "a+b>3.14or ab<0;" uses or to connect two comparison expressions. When either of the two comparison expressions is true, the Boolean expression statement is true;
[0061] Design constraint statements are used to describe the constraints on precision, space, and time when designing and implementing the requirement problem. Among them, precision constraints refer to data precision, such as single-precision and double-precision floating-point numbers; space constraints refer to the upper limit of the memory space used in software design and implementation, the upper limit of the size of the compiled program file, or the space complexity limit of the algorithm implementation; time constraints refer to the upper limit of the program running time or the time complexity limit of the algorithm implementation when designing and implementing the software. The content of each constraint is a string type and can be described using natural language text. For example, the statement "PrecisionConstraints: All real number type data are implemented using double-precision floating-point numbers;" expresses that all real number types involved in the software development and implementation of this requirement problem are represented by double-precision floating-point numbers.
[0062] Time-independent control statements include sequential statements, branch statements, loop statements, selection statements and concurrent statements; sequential statements describe the logical relationship between two statements executed in sequence, branch statements describe the logical relationship between multiple statements selected for execution based on branch conditions, loop statements describe the logical relationship of loop execution, selection statements describe the logical relationship between two or more groups of statements selecting one group to execute, and concurrent statements describe the logical relationship between two or more groups of statements executed concurrently.
[0063] In the embodiment of the present invention, the sequential statement describes the logical relationship between two statements in the order of execution, without any special grammatical rules. If there is no other control statement constraint between the two statements, the two statements satisfy the sequential relationship. For example, in the statement "a=1; b=2;", "a=1;" and "b=2;" satisfy the sequential relationship, and "a=1;" is executed before "b=2;"
[0064] The branch statement describes the logical relationship between multiple statements that are selected for execution based on the branch conditions. It mainly includes three components: ifbranch, elseifbranch, and elseebranch. Ifbranch describes a Boolean expression and a group of statements, which means that when the Boolean expression is true, the group of statements will be executed; elseifbranch is the same as ifbranch; elseebranch only describes a group of statements, which will be executed when all the Boolean expressions in ifbranch and elseifbranch are false;
[0065] The loop statement describes the logical relationship of the loop execution. There are two forms of loops: for and while. The for loop can traverse the array (array) through the "for each var in array" structure, and obtain each element of the array in the loop body through the variable (var); in addition, the loop header of another form of the for loop includes three sections, namely fordef, forcond and forassign. fordef is an assignment expression, which is executed before entering the loop; forcond is a Boolean expression, and the loop ends when the Boolean expression is false; forassign is also an assignment expression, which is executed once after each statement in the loop body is executed. The loop header of the while loop contains only one loop condition (whilecond). When the Boolean expression of the loop condition is false, the loop ends;
[0066] The selection statement describes the logical relationship between two or more groups of statements to select one group of statements to execute. Two groups of statements with selection relationship are connected by "|";
[0067] Concurrent statements describe the logical relationship between two or more groups of statements that are executed concurrently. Two groups of statements with a concurrent relationship are connected using "||".
[0068] Time-related control statements include delay statements, specified time occurrence statements, and continuous conditional satisfaction execution statements; delay statements express the operational logic of delaying and waiting for a specified time before continuing to execute, specified time occurrence statements express the operational logic of executing at a specific moment in a cycle, and continuous conditional satisfaction execution statements express the operational logic of executing a specified statement when a Boolean condition is true for multiple consecutive cycles or within a specified time length.
[0069] In the embodiment of the present invention, the delay statement expresses the operation logic of delaying and waiting for a specified time before continuing to execute, and is composed of the wait keyword and time, where the time can be expressed in three forms: the first is a real number*period element, and the period element needs to reference a period defined in other locations; for example, the real number is 1.5, and the period element references a period with an identifier of pid1, then the delay statement will wait for 1.5 pid1 periods; the second is to directly reference the time attribute of a device; the third is to directly specify the length of the delay waiting time through a real number and a unit, for example, the real number is 30, and the unit is ms, then the delay statement will wait for 30ms;
[0070] The specified time occurrence statement expresses the operation logic executed at a specific moment of the cycle. The statement header consists of the at keyword and the real number * cycle element. The cycle element needs to reference a cycle defined elsewhere. For example, if the real number is 0.5 and the cycle element references a cycle with an identifier of pid1, the statement will execute the contents of the statement body when the pid1 cycle reaches 50%.
[0071] The continuous conditional execution statement expresses the operation logic of executing the specified statement when a Boolean condition is true for several consecutive cycles or a specified time length. The contsatcond field is the Boolean condition that needs to be satisfied, the contsattime field is the time length for the Boolean condition to be satisfied, and the contsatdo field is the statement that needs to be executed after the condition is satisfied. That is, if contsatcond is true for the continuous contsattime time, the statement in the contsatdo field will be executed. For example, the statement "continue(15ms)satisfy(a==1){x=1;}" means that when the Boolean condition "a==1" is true for 15ms, the statement "x=1;" will be executed.
[0072] The problem name and abbreviation in the description statement of an atomic problem are used to uniquely identify the atomic problem. Parameters are used to describe the equipment, storage, and physical quantity information used. Atomic problems in different modes have different parameter definitions. The I / O formula includes input, output, and processing logic. The interaction flow describes the interaction process between software and entities such as devices in the atomic problem. The satisfied requirements record the name of the requirement in the atomic problem corresponding to the requirement description problem diagram. Design constraints are used to describe the accuracy and time constraints that software developers should pay attention to when implementing software.
[0073] Furthermore, atomic problems include seven categories, namely data acquisition, timer initialization, data-based control, data conversion, command data storage, data transmission, and automatic storage atomic problems; data acquisition atomic problems require the software to collect raw data from passive devices, convert the raw data into target data, and finally save it to the data storage. Its parameters include passive devices and data storage; timer initialization atomic problems require the software to send a start instruction to the timer to complete the purpose of starting the timer. Its parameter is only the timer; automatic storage atomic problems require the software to automatically save specified data to the data storage. Its parameter is only a single data storage; data control-based atomic problems require the software to retrieve device operations from the data storage. The instruction is converted into the signal format required by the device and sent to the device to drive the device to complete the corresponding operation. Its parameters include data storage and passive device. The data conversion atomic problem requires the software to take out the input data from the input data storage, convert it into output data according to the conversion logic, and save it to the output data storage. Its parameters include input data storage and output data storage. The command data storage atomic problem requires the software to receive the command from the active device, parse the required data from the command and save it to the data storage field. Its parameters include active device and data storage. The data transmission atomic problem requires the software to take out the data from the data storage and package the data and send it to the active device. Its parameters include data storage and active device.
[0074] and Figure 1 Corresponding to the description template, the embodiment of the present invention also discloses a method for generating a requirement specification of a complex embedded software system, using the requirement specification description template of a complex embedded software system, such as Figure 2 As shown, the following steps are included:
[0075] S1. Generate requirement statements, input sub-problem diagrams, data dictionaries, system components and equipment libraries provided by requirement engineers, and output cycle statements, equipment statements, storage statements and timer statements;
[0076] S2. Generate a combination problem of requirements, input the sub-problem diagram and scenario diagram provided by the requirements engineer, the requirements tracking relationship diagram, and the device state machine of the device library, and output the specification of the combination problem;
[0077] S3. Generate atomic problems of requirements, input the problem graph and scenario graph of each sub-problem in the complex embedded software system, and output atomic requirement specifications.
[0078] In the embodiment of the present invention, a lighting control system is taken as an example for explanation. The problem diagram describes the system requirement information, such as Figure 7 , 9 , 11, and 13, the data dictionary describes the system data information, as shown in Table 1:
[0079] Table 1
[0080] Serial number Data name meaning 1 OpenCommand The pulse generator sends a light-on command 2 CloseCommand Light off command from pulse generator 3 OpenInstruction Light command data storage saves the light-on command 4 CloseInstruction Light command data storage saves the light off command 5 OpenInstructionStorageInstruction The software sends the light-on command to the light command data storage to save the command 6 CloseInstructionStorageInstruction The software sends a light-off command to the light command data storage to save the command 7 PGInitSignal Initialization signal for the pulse generator device 8 LSInitSignal Initialization signal of brightness sensor device 9 LUInitSignal Initialization signal of the light unit device 10 OpenSignal Lighting unit equipment light on signal 11 CloseSignal Light off signal for lighting unit equipment 12 OpenInstructionLoadInstruction The software sends the light-on command to the light command data storage to load the command 13 CloseInstructionLoadInstruction The software sends a light off command to the light command data storage to load the command 14 RawBrightness Ambient brightness collected by the brightness sensor 15 RawBrightnessAcqInstruction The brightness acquisition instruction sent by the software to the brightness sensor device
[0081] The system composition describes the controller, equipment and cycle information of the combined system, as shown in Table 2:
[0082] Table 2
[0083]
[0084]
[0085] The device library contains device attribute information and device state machine, as shown in Table 3 and Figure 4 , Figure 5 , Figure 6 As shown:
[0086] Table 3
[0087] Serial number Device Name Communication interface Response time Data accuracy 1 LightSensor ADCollection 10ms SinglePrecision 2 LightUnit PulseOutput 10ms / 3 PulseGenerator PulseOutput 10ms /
[0088] As a supplement to the problem diagram, the scenario diagram describes the dynamic relationship of the interaction, such as Figure 8 , 10 , 12, and 14, the requirement traceability relationship describes the relationship between the combination problem and the combination problem / atomic problem, such as Fig.15 As shown in the figure, there are four types of demand tracking relationships, namely complete inclusion (⊕), partial inclusion (⊙), satisfaction ( <satisfy>), export( <derive>), the complete inclusion relationship expresses that the upper-level requirements are completely expressed by the lower-level requirements, while the partial inclusion relationship means that the upper-level requirements contain some of the lower-level requirements, but there is still a part of the content that needs to be realized by itself, the satisfying relationship means that the upper-level requirements are realized by the lower-level requirements, and the derived relationship means that the lower-level requirements are the result of the refinement of the upper-level requirements;
[0089] Furthermore, S1 is specifically:
[0090] S11, search the problem graph and obtain the names, abbreviations, and types of all timers, devices, and data storages therein;
[0091] S12, searching in the system composition according to the timer and device name, and obtaining detailed information of the timer and device;
[0092] S13, searching in the device library to obtain attribute information of the timer and the device;
[0093] S14, searching for expected interaction content in the problem graph, identifying expected interactions for saving data, and identifying data that needs to be saved for data storage in combination with the data dictionary;
[0094] S15. Obtain period information directly from system components.
[0095] Further, such as Figure 3 As shown, S2 is specifically:
[0096] S21, detecting data dependency and device dependency;
[0097] S22, perform schedulability analysis on the combination problem based on data dependency, equipment dependency and demand tracking relationship;
[0098] S23. Domain experts fill in the problem name, abbreviation, sub-problems, and constraints of the combined problem specification, and then fill in the relationship fields between sub-problems according to the scheduling sequence.
[0099] In the embodiment of the present invention, in S21, the dependency relationship is divided into two categories according to the different shared domains of the sub-problems: data dependency and device dependency;
[0100] Data dependency detection: Data dependency refers to two or more requirements sharing the same data storage, one requirement producing data and another requirement consuming data; data dependency occurs between requirements that have read and write operations on the same data; in the problem graph, if an interaction of requirement R1 expresses the behavior of taking data data from data storage ds, and an interaction of requirement R2 expresses the behavior of saving data data to data storage ds, then requirement R1 is data dependent on R2 due to data data, denoted as "R1→
[0101] R2, because of {ds.data}";
[0102] Device dependency detection: Device dependency refers to the order of two or more requirements sharing the same device, which is caused by the relationship between the device states. Device dependency detection uses two types of information: the preconditions for interaction and the interactions that can drive the device to change state. Combining these two types of information, there are three situations that need to be considered:
[0103] Case 1. One requirement makes another requirement happen as a prerequisite: If the prerequisite for a desired interaction of requirement R1 is that the device dev is in state s, and the device state machine in the device knowledge base shows that the only interaction that can make the device enter state s is the desired interaction of requirement R2, then requirement R1 depends on R2 because of the state s of device dev, which is recorded as "R1→
[0104] R2, because of{dev.s}”; Case 1 is that the device state transition generated after a certain interaction of one requirement can meet the precondition of another interaction of another requirement, thus leading to device dependence;
[0105] Case 2. There is a relationship between the preconditions of the requirements: If the precondition for a desired interaction of requirement R1 is that the device dev is in state s m , the prerequisite for a desired interaction of requirement R2 is that the device dev is in state s n , and according to the device state machine in the device knowledge base, it can be known that from the initial state to state s m All paths contain state s n , that is, to reach state s m Must first pass s n , then demand R1 because the state of device dev is s m 、s n And depends on R2, recorded as "R1→
[0106] R2, because of{dev.s m ,dev.s n }”; Scenario 2 is that the device state required by a prerequisite of a certain interaction and the device state required by another prerequisite of a certain interaction for the same device have a sequential relationship in their device state machines, thus leading to device dependency;
[0107] Scenario 3. There is a relationship between device state transitions caused by requirements: If an expected interaction of requirement R1 drives the device dev to enter state s m , a desired interaction of requirement R2 drives the device dev into state s n , and according to the device state machine in the device knowledge base, it can be known that from the initial state to state s m All paths contain state s n , that is, to reach state s m Must first pass s n , then demand R1 because the state of device dev is s m 、s n And depends on R2, recorded as "R1→R2, because of{dev.s m ,dev.s n Case 3 is that a new state driven by a certain interaction of a requirement and a new state driven by another requirement of a certain interaction of a requirement have a sequential relationship in the state machine of the device, thus causing device dependency;
[0108] Schedulability analysis: After dependency detection is completed, we can obtain several sets of data dependencies and device dependencies between problems. Next, we need to perform schedulability analysis on the problems based on these two dependencies.
[0109] Data dependency scheduling: It is divided into two situations according to whether the dependent data can be consumed repeatedly.
[0110] Case 1. If there is a data dependency "B→A, because of {data}", that is, problem A is the producer of data data, B is the consumer of data, and the domain expert provides additional information: data data can only be consumed once, then B should appear after A in the scheduling sequence, and multiple consecutive Bs should be avoided, that is, the scheduling execution sequence "ABBB" should be avoided. Scheduling sequences such as "AB", "ABAB" and "AAAB" are allowed in this case;
[0111] Case 2. If there is a data dependency "B→A, because of {data}", that is, problem A is the producer of data data, B is the consumer of data, and the domain expert provides additional information: data data can be consumed repeatedly, then B should appear after A in the scheduling sequence. Scheduling sequences such as "ABAB", "AAAB" and "ABBB" are allowed in this case.
[0112] Device dependency scheduling: Device dependency is identified through the device state machine. There is no problem of whether data dependency can be consumed repeatedly. Device dependency scheduling has only one scenario.
[0113] If there is a device dependency "B→A, because of {dev.s}", then B should appear after A in the scheduling sequence. And because problems with device dependencies have strict state migration restrictions, if problems A and B can cause the device state to change, then the problem cannot be executed repeatedly in the same cycle, that is, scheduling sequences such as "ABAB", "AAAB" and "ABBB" are not allowed in this case, only the "AB" scheduling sequence is allowed.
[0114] The result of scheduling analysis on data dependency and control dependency, that is, the legal scheduling sequence may not be unique, and in this embodiment, only one of the selected results is given. When writing the specification, the domain expert only needs to ensure that there is no violation of data dependency and device dependency.
[0115] Confirmation by domain experts: After obtaining the problem scheduling sequence, domain experts first fill in the problem name, abbreviation, sub-problems, constraints, etc. of the combined problem specification. Then, domain experts fill in the relationship fields between sub-problems according to the scheduling sequence. When filling in the relationship between sub-problems, according to the demand tracking relationship, there are two situations that need to be considered:
[0116] Case 1. If a combinatorial problem contains two or more atomic problems, and there is a precedence relationship between the atomic problems according to the problem scheduling sequence, then this precedence relationship should still be retained in the specification;
[0117] Case 2. If the combinatorial problem contains two or more atomic problems, and there is no pre-order relationship between the atomic problems according to the problem scheduling sequence, then they can be described in parallel in the specification, or they can be randomly serialized according to the actual situation. For example, if the system operation platform processor only supports single-core computing, then the problems without pre-order relationship can be randomly serialized.
[0118] At this point, we can get the combinatorial problems in the software requirement specification, while the atomic problems are currently only referenced in the combinatorial problems, and the specification content inside the atomic problems is not described.
[0119] Furthermore, S3 is specifically:
[0120] S31. Identify the types of atomic problems;
[0121] S32. Generate a requirement specification for the atomic problem according to a specification description template of a corresponding type.
[0122] In the embodiment of the present invention, the type matching of the atomic problem is performed based on the behavior intention of the atomic problem. Specifically, it is necessary to identify the behavior intention of the atomic problem based on the problem graph of the atomic problem and the domain type and interaction characteristics in the scenario graph, and determine which type the behavior intention matches; after the type matching of the atomic problem is completed, the domain expert fills the content in the problem graph into the corresponding position of the type specification template based on the identification result. For the scenario graph, according to the mapping relationship between the scenario graph elements and the specification description, the scenario graph is converted into a specification statement. The conversion relationship is as follows: Fig.19 shown.
[0123] In one embodiment of the present invention, a requirement specification is generated for a lighting control system through a specification description template and a generation method. The lighting control system is specifically: a software system for controlling the switch of lights, and the software system involves a light unit (LightUnit, referred to as LU), a brightness sensor (Light Sensor, referred to as LS), a pulse generator (Pulse Generator, referred to as PG) device, and a light command (Light Command, referred to as LC) data storage. There are four requirements in total, namely initialization, automatic storage, command storage, and light unit control output (LU Control Output). Among them, the initialization requirement is used to initialize the light unit and the brightness sensor; the automatic storage requirement requires the software to obtain the ambient brightness information from the brightness sensor, and save the light on or off instruction to the light command data storage according to the preset light control rules; the command storage requirement is used to receive the light on / off command issued by the pulse generator, and save the light on or off instruction to the light command data storage; the light unit control output requirement is responsible for converting the light on / off instruction in the light command data storage into a signal and sending it to the light unit to realize the switch control of the light unit.
[0124] The problem diagram is used to express the constraints on the problem domain and requirements, and clearly distinguishes between software and problem domain. Software is the software to be developed, represented by a double vertical line rectangle, and the problem domain is the entity that the software will interact with, represented by a rectangular box. There are three types of problem domains: causal domain, lexical domain, and autonomous domain. The causal domain refers to the predictable causal relationship between phenomena in the domain, such as equipment; the lexical domain refers to the physical storage of data, such as an existing database, often represented by a single vertical line rectangle; the autonomous domain mainly refers to people. There are interactions between software and problem domains, represented by solid lines. These interactions can be represented by five-tuples.<ID,Ini,Rec,Con,Typ> Indicates, where ID is the interaction number, Ini is the interaction initiator, Rec is the interaction receiver, Con is the shared phenomenon, and Typ is the phenomenon type, including instructions, signals, states, and values. These interactions are also called behavioral interactions. Not only that, the problem graph also clearly expresses the requirements (represented by dotted ellipses) and the references or constraints of the requirements on the phenomena in the problem domain. The requirement reference (Reference, represented by a dotted line without an arrow) and the requirement constraint (Constraint, represented by a dotted line with an arrow) respectively indicate whether the requirement "mentions" the phenomenon or "constrains" the phenomenon to occur, where the expected phenomenon in the problem domain can also be expressed in the form of interactions. In order to distinguish them from behavioral interactions, these interactions are called expected interactions. In this embodiment, the problem graph of the lighting control system command storage requirements is as follows Figure 7 As shown, the Light System Controller is the software to be developed, the pulse generator and the light command are the problem domains that interact with the software, and the system requirements have demand references or constraints on the problem domains, such as command storage requirements, which constrain the occurrence of expected interactions int7 and int8, that is, the light command domain must save the instructions to turn on and off the lights.
[0125] The scenario diagram is used to describe how the behavior interaction in the problem diagram realizes the expected interaction in the requirements. There are three main types of nodes: behavior interaction (solid line rounded rectangle), expected interaction (dashed line rounded rectangle) and control node. The behavior interaction comes directly from the problem diagram, and the expected interaction is the behavior representation in the requirement reference or constraint in the problem diagram. The control node is represented by the icons in the UML activity diagram, such as the start node (black solid circle), end node (circle), branch node (black short line), merge node (diamond) and judgment node (diamond) and other activity control nodes. The scenario diagram consists of five relationships between interaction nodes, namely behavior order relationship (BO), expected order relationship (EO), behavior enabling relationship (BE), requirement expectation relationship (RE) and synchronization relationship (SC). Among them, the behavior order relationship represents the precedence relationship between behavior interactions or between behavior interactions and control nodes, and is represented by a solid line with an arrow pointing from a behavior interaction / control node to a behavior interaction / control node; the expected order relationship represents the precedence relationship between expected interactions or between expected interactions and control nodes, and is represented by a dotted line with an arrow pointing from an expected interaction / control node to an expected interaction / control node; the behavior enablement relationship represents that the behavior interaction enables the expected interaction to occur, and is represented by a solid line with an arrow pointing from a behavior interaction node to an expected interaction node. The requirement expectation relationship represents that the expected interaction requires the behavior interaction to occur, and is represented by a solid line with an arrow pointing from an expected interaction node to a behavior interaction node; the synchronization relationship represents that the behavior interaction and the expected interaction occur at the same time, and is represented by a solid line without an arrow. In this embodiment, the scenario diagram of the command storage requirement is as follows: Figure 8 As shown, int5 and int 13 The relationship between int5 and int7 is a behavior order relationship, the relationship between int7 and int5 is an expectation order relationship, 13 The relationship between them is the demand-expectation relationship. Fig. 9 and Fig.10 They are the problem diagram and scenario diagram for initialization requirements, Fig.11 and Fig.12 They are the problem diagram and scenario diagram of the light unit control output requirements. Fig.13 and Fig.14 They are the problem diagram and scenario diagram of automatic storage requirements.
[0126] According to the requirement specification template and specification generation method disclosed in the present invention, the requirement specification of the lighting control system is generated by first generating a requirement statement:
[0127] Search the requirement description problem graph to obtain the names, abbreviations, and types of all timers, devices, and data stores. For example, the brightness sensor device is named Light_Sensor, abbreviated as LS, and its type is Sensor.
[0128] According to the timer and device name, search in the system composition to obtain more detailed information about the timer and device, such as the number of devices of a certain type. In this embodiment, the system composition of the lighting control case is shown in Table 2. For example, the system composition information includes a brightness sensor device named Light_Sensor, with only one device, which matches the brightness sensor device in the problem diagram;
[0129] Then search in the device library to obtain specific timer and device-related attribute information. For example, search for the brightness sensor device in the device library, its communication port attribute is ADCollection, response time attribute is 10ms, data accuracy attribute is SinglePrecision, and the specification content "Sensor Light_Sensor(LS):ADCollection,10(ms),SinglePrecision;" can be obtained;
[0130] Search for the expected interaction content in the problem graph, identify the expected interaction for saving data, and combine with the data dictionary to identify what data needs to be saved for data storage. For example: expected interaction "int1:<LC,——,Open Instruction> [instruction]” expresses that the data named “Open Instruction” is saved in the LC (short for Light Command) data storage area. It can be identified that the Light Command in the storage declaration needs to save the Open Instruction data, and the specification content “Light_Command(LC):OpenInstruction;” can be obtained.
[0131] Extract the period information from the system composition description provided by the domain expert. The system has a period named MainPeriod with a period length of 100ms. Finally, the declaration part specification of the lighting control system case is obtained. In the embodiment of the present invention, the declaration part is specifically:
[0132]
[0133] Then generate the demand combination problem:
[0134] Dependency detection: perform data dependency detection and device dependency detection in the invention content on the four sub-problems of the lighting control system respectively;
[0135] Data dependency detection: Detect the data dependencies of the four sub-problems in the lighting control system case to obtain the data dependencies in the case system. For example, Fig.16 The data dependency between the command storage and the light unit control output requirements is shown. The command storage requirement requires the software to receive the light on / off command issued by the pulse generator, and then convert the command into a light on / off instruction and save it in the light command data storage. The light unit control output requirement requires the software to retrieve the saved light on / off instruction from the light command field, convert it into a signal format that the light unit can recognize, and then send it to the light unit, so as to achieve the effect of turning the light on or off. Fig.16 The case has data dependency "LU Control Output→Commanded Save, because of{OpenInstruction,CloseInstruction}", which means that the light unit control output depends on command storage because of the light-on instruction and the light-off instruction;
[0136] Device dependency detection: Detect the device dependencies of the four sub-problems in the lighting control system case to obtain the device dependencies in the case system. For example, Fig.17 The device dependency between initialization and light unit control output requirements is shown, and the state model of the light unit device is expressed using a timed automaton. The initialization requirement drives the light unit from the light unit initialization (LUInit) state to the light off (LUOff) state. The control output requirement can drive the light unit device to the light off or light on (LUOn) state, and in the device knowledge base light unit automaton model, all paths from the initial node to the light on state include the light off state, which meets case 3, so there is a device dependency "LU Control Output→
[0137] Initialization,because of{LU.LUOff,LU.LUOn}".
[0138] Finally, it was detected that the lighting control system had 2 sets of data dependencies and 3 sets of device dependencies. Fig.18 Shows the dependencies of the lighting control system.
[0139] Schedulable Analysis:
[0140] Based on the detected 2 sets of data dependencies and 3 sets of device dependencies, the problem is analyzed for schedulability. For example, Fig.16 The lighting control system data dependency example shown has data dependency "LU Control Output→
[0141] Commanded Save, because of {OpenInstruction, CloseInstruction}", and domain experts know that OpenInstruction and CloseInstruction can only be consumed once. Therefore, the legal scheduling sequence is "Commanded Save; LU Control Output". Fig.17 The lighting control system device dependency example shown has a device dependency "LU Control Output→
[0142] Initialization, because of{LU.LUOff,LU.LUOn}", and both initialization and lighting unit control output problems can lead to the state transition of the lighting unit device, so the legal scheduling sequence is "Initialization; LU Control Output".
[0143] The result of scheduling analysis of data dependency and control dependency, that is, the legal scheduling sequence may not be unique, and only one of the options is given here. When writing specifications, domain experts only need to ensure that data dependency and device dependency are not violated.
[0144] Field experts confirm:
[0145] Domain experts use scheduling sequences, combined problem specification templates and Fig.15 According to the requirement tracking relationship shown in the figure, fill in the requirement combination problem specification template to obtain the requirement combination problem specification of the lighting control system, which is as follows:
[0146]
[0147]
[0148] The name of this combined problem is Lighting Control System (LCS for short); it contains four sub-problems: Initialization, Automatic Save, Commanded Save, and Light Unit Control Output (LU Control Output); the sub-problem relationship describes the execution relationship between these four sub-problems in the lighting control system: first execute Initialization, then loop through the three sub-problems of Automatic Save, Commanded Save, and Light Unit Control Output. In the loop body, the two atomic problems of Automatic Save and Commanded Save are executed in parallel, then the atomic problem of Light Unit Control Output is executed, and finally the next loop is entered after waiting for the main period (MainPeriod) time length; the system design constraint requires that the memory usage does not exceed 20KB when the program is executed.
[0149] Finally, the atomic problem of demand is generated:
[0150] Identify the atomic problem type: According to the behavioral intent of the four sub-problems of the lighting control system, identify the atomic problem type to which it belongs. For example, the command storage problem receives the switch light command issued by the active device pulse generator, parses the switch light instruction from the command, and saves the switch light instruction to the lighting command data storage, which meets the behavioral intent of the command data storage type. Similarly, it can be identified that the initialization problem belongs to the automatic storage type, the automatic saving problem belongs to the data acquisition requirement, and the lighting unit control output problem belongs to the data-based control type.
[0151] The atomic problem requirement specification is generated according to the specification description template of the corresponding type: based on the identification results, the domain experts fill the problem diagrams and scenario diagrams of the four sub-problems of the lighting control system into the corresponding positions of the atomic problem type specification template to obtain the atomic problem requirement specifications of the four sub-problems.
[0152] The atomic problem specification of command storage is as follows:
[0153]
[0154] The atomic problem specifications that are automatically saved are as follows:
[0155]
[0156] Parameters:
[0157] Sensor LS;
[0158] DataStorage LC;
[0159] Device Physical Quantity TPQ = {Raw_brightness};
[0160] I0 Formula:
[0161] Inputs: {Raw_brightness};
[0162] Outputs: {Target_Brightness};
[0163] Logical Process:{
[0164] Target_Brightness = (Raw_brightness - 32) * 0.32;
[0165] }
[0166] Interaction Flows:{
[0167] <AS, LS, Raw_brightness_acq_instruction, instruction, LS.comPort>;
[0168] wait(LS.responseTime);
[0169] if (Target_Brightness > 500){
[0170] <AS, LC, Close_instruction_storage_instruction, instruction>;
[0171] }
[0172] else if (Target_Brightness < 200){
[0173] <AS, LC, Open_instruction_storage_instruction, instruction>;
[0174] }
[0175] }
[0176] Satisfied Requirement: "Automatic Save";
[0177] The specific atomic problem specification for initialization is:
[0178] AtomicProblem:Initialization(Init)
[0179] Parameters:
[0180] ActiveDevice PG;
[0181] Sensor LS;
[0182] Actuator LU;
[0183]
[0184] The atomic problem specification of the light unit control output is as follows:
[0185]
[0186]
[0187] At this point, the complete software requirements specification for the lighting control system is obtained.
[0188] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0189] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.< / derive> < / satisfy>
Claims
1. A requirement specification description template for a complex embedded software system, characterized in that: It includes declaration part, combination problem and atomic problem; the declaration part, combination problem and atomic problem are expressed by basic statements, and the basic statements include declaration statements, expression and constraint statements, time-independent control statements and time-related control statements; the declaration part includes cycle declaration, device declaration, storage declaration and timer declaration; the cycle declaration statement declares the cycle in the embedded software system, the device declaration statement is used to describe the device information in the embedded software system, the storage declaration is used to describe the storage information in the embedded software system, and the timer declaration is used to describe the timer information in the embedded software system. The declaration part is declared by declaration statements; Expression and constraint statements include single variable definition statements, array definition statements, calculation expression statements, assignment expression statements, comparison expression statements, Boolean expression statements and design constraint statements; Single variable definition statement is used to define a single variable data of a specified type, and is used to create temporary variables in the specification. Array definition statement is used to define a single array variable of a specified type, and is used to create temporary variables in the specification. Calculation expression statement is used to describe arithmetic operations. Assignment expression statement is used to describe assignment operations. Comparison expression statement is used to describe comparison operations. Boolean expression statement is used to describe Boolean logic. Design constraint statement is used to describe the constraint information of the requirement problem in terms of precision, space, and time during design implementation. Time-independent control statements include sequential statements, branch statements, loop statements, selection statements, and concurrent statements; sequential statements describe the logical relationship between two statements executed in sequence, branch statements describe the logical relationship between multiple statements selected for execution based on branch conditions, loop statements describe the logical relationship of loop execution, selection statements describe the logical relationship between two or more groups of statements selecting one group to execute, and concurrent statements describe the logical relationship between two or more groups of statements executed concurrently; time-related control statements include delay statements, specified time occurrence statements, and continuous conditional satisfaction execution statements; delay statements express the operational logic of delaying and waiting for a specified time before continuing to execute, specified time occurrence statements express the operational logic of executing at a specific moment in a cycle, and continuous conditional satisfaction execution statements express the execution of a Boolean condition when it is true for multiple consecutive cycles or within a specified time length. The description statement of the combined problem expresses the problem name, abbreviation, sub-problems, relationships and constraints between sub-problems. A combined problem is composed of multiple problems. The description statement of the atomic problem expresses the problem name, abbreviation, parameters, I / O formula, interaction flow, satisfied requirements and design constraints. The problem name and abbreviation are used to uniquely identify the atomic problem. The parameters are used to describe the equipment, storage, and physical quantity information used. Atomic problems in different modes have different parameter definitions. The I / O formula includes input, output, and processing logic. The interaction flow describes the interaction process between software and entities such as devices in the atomic problem. The satisfied requirements record the name of the requirement in the atomic problem corresponding to the requirement description problem diagram. Design constraints are used to describe the accuracy and time constraints that software developers should pay attention to when implementing software. Atomic problems are problems that cannot be decomposed in embedded systems.
2. The requirement specification description template for a complex embedded software system according to claim 1, characterized in that: Atomic problems include seven categories, namely data acquisition problems, timer initialization problems, data-based control problems, data conversion problems, command data storage problems, data transmission problems, and automatic storage atomic problems; The data acquisition atomic problem requires the software to collect raw data from the passive device, convert the raw data into target data, and finally save it to the data storage. Its parameters include the passive device and the data storage; The timer initialization atomic problem requires the software to send a start instruction to the timer to complete the purpose of starting the timer. Its parameter is only the timer. The automatic storage atomic problem requires the software to automatically save the specified data to the data storage. Its parameter is only a single data storage. The data control atomic problem requires the software to take out the device operation instruction from the data storage, convert it into the signal format required by the device, and send it to the device to drive the device to complete the corresponding operation. Its parameters include data storage and passive devices. The data conversion atomic problem requires the software to take out the input data from the input data storage, convert it into output data according to the conversion logic, and save it to the output data storage. Its parameters include input data storage and output data storage. The command data storage atomic problem requires the software to receive commands from active devices, parse the required data from the commands and save them to the data storage field, whose parameters include active devices and data storage; The atomic problem of data transmission requires that the software takes data from the data storage and packages the data and sends it to the active device, whose parameters include the data storage and the active device.
3. A method for generating requirements specifications for a complex embedded software system, characterized in that: Applying the requirement specification description template of a complex embedded software system as described in any one of claims 1 to 2 comprises the following steps: S1. Generate requirement statements, input sub-problem diagrams, data dictionaries, system components and equipment libraries provided by requirement engineers, and output cycle statements, equipment statements, storage statements and timer statements; S2. Generate a combination problem of requirements, input the sub-problem diagram and scenario diagram provided by the requirements engineer, the requirements tracking relationship diagram, and the device state machine of the device library, and output the specification of the combination problem; S3. Generate atomic problems of requirements, input the problem graph and scenario graph of each sub-problem in the complex embedded software system, and output atomic requirement specifications.
4. The method for generating requirements specifications for a complex embedded software system according to claim 3, characterized in that: S1 is specifically: S11, search the problem graph and obtain the names, abbreviations, and types of all timers, devices, and data storages therein; S12, searching in the system composition according to the timer and device name, and obtaining detailed information of the timer and device; S13, searching in the device library to obtain attribute information of the timer and the device; S14, searching for expected interaction content in the problem graph, identifying expected interactions for saving data, and identifying data that needs to be saved for data storage in combination with the data dictionary; S15. Obtain periodic information directly from system components.
5. The method for generating requirements specifications for a complex embedded software system according to claim 3, characterized in that: S2 is specifically: S21, detecting data dependency and device dependency; S22, perform schedulability analysis on the combination problem based on data dependency, device dependency and demand tracking relationship diagram; S23. Domain experts fill in the problem name, abbreviation, sub-problem, and constraints of the combined problem specification, and then fill in the relationship fields between sub-problems according to the scheduling sequence.
6. The method for generating requirements specifications for a complex embedded software system according to claim 3, characterized in that: S3 is specifically: S31. Identify the types of atomic problems; S32. Generate a requirement specification for the atomic problem according to a specification description template of a corresponding type.
Citation Information
Patent Citations
Automatic conversion method from non-formal requirement specification template to formal design model
CN108196827A
Demand simulation method and system for complex embedded system based on timed automaton
CN117313369A
