HIL Requirement Design Method, Device, Computer Equipment and Storage Medium
Through the HIL requirement design method, the HIL requirement map is generated and converted into natural language, which solves the problem of bias in manual description and interpretation of requirements and improves the accuracy of HIL test.
Patent Information
- Application Number
- CN202111347565.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-15
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2041-11-15
AI Technical Summary
The prior art is based on manual description of requirements and interpretation of requirements, which leads to low accuracy of HIL tests.
Provide a HIL requirement design method, which can provide a HIL requirement design method by displaying the requirement design interface, responding to the graph selection and shifting operation, obtaining information input operations, generating HIL requirement diagrams, and converting them into natural language to obtain HIL requirement information.
By automatically converting the HIL requirement map into natural language, avoiding deviations caused by manual description and interpretation, improving the accuracy of HIL requirement design, thereby improving the accuracy of HIL tests.
Smart Images

Figure CN114238072B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and particularly to a method and device for designing HIL requirements, a computer device, and a storage medium. Background Art
[0002] The Hardware-in-the-Loop (HIL) simulation test system uses a real-time processor to run a simulation model to simulate the operating state of a controlled object, connects to the device under test through an I / O interface, and conducts comprehensive and systematic tests on the device under test. Considering safety, feasibility, and reasonable costs, HIL hardware-in-the-loop simulation testing has become a very important part of the ECU (Electronic Control Unit) development process, reducing the number of real vehicle road tests, shortening the development time, reducing costs, improving the software quality of the ECU, and reducing the risks of automobile factories.
[0003] During the HIL test of automotive parts, test cases need to be designed according to requirements. After the test cases are designed, they are automatically executed, as Figure 1 shown. The currently commonly used HIL test process is as follows:
[0004] a. The user under test submits a test application and an excel table defining the function specifications of the device under test.
[0005] b. The personnel of the evaluation enterprise manually interpret each function according to the excel table defining the function specifications of the device under test; manually draw a test case logic diagram on Test Designer.
[0006] c. Check and generate an executable test case file.
[0007] d. Import it into the test farm for execution.
[0008] In this process, the process b related to requirement description and design, which is relatively long, cumbersome, and requires a high degree of professionalism, has very high requirements for the logical thinking ability of the evaluation enterprise personnel, the depth of understanding of the functions of the device under test, and the investment of personnel's time and energy; and personnel with different working natures participate in the entire process chain. Due to differences in behavior habits or understanding methods, it is very easy for different personnel to have deviations in the understanding of the functional requirements themselves, resulting in deviations in the test cases designed based on the understood requirements, and ultimately reducing the accuracy of HIL testing. Summary of the Invention
[0009] The technical problem to be solved by the present invention is that the existing technology has deviations in manually describing and interpreting requirements, resulting in low accuracy of HIL testing.
[0010] To solve the above technical problems, the present invention provides a HIL requirement design method, apparatus, computer device, and storage medium.
[0011] A HIL requirement design method includes:
[0012] Display a requirement design interface;
[0013] In response to a graphic selection and movement operation, display the HIL requirement description graphic selected by the graphic selection and movement operation in a preset area of the requirement design interface;
[0014] Obtain the description information input by an information input operation, and generate a HIL requirement diagram according to the description information and the HIL requirement description graphic;
[0015] Convert the HIL requirement diagram into natural language, obtain HIL requirement information, and display it.
[0016] In one embodiment, the displaying the requirement design interface includes:
[0017] When receiving a selection operation of a reading mode option, display the requirement design interface in the reading mode;
[0018] When receiving a selection operation of an editing mode option, display the requirement design interface in the editing mode.
[0019] In one embodiment, the responding to the graphic selection and movement operation and displaying the HIL requirement description graphic selected by the graphic selection and movement operation in a preset area of the requirement design interface includes:
[0020] In response to the graphic selection and movement operation, load the HIL requirement description graphic selected by the graphic selection and movement operation in the cache, and display the preset area of the requirement design interface.
[0021] In one embodiment, the obtaining the description information input by the information input operation and generating a HIL requirement diagram according to the description information and the HIL requirement description graphic includes:
[0022] Obtain the description information input corresponding to the HIL requirement description graphic by the information input operation;
[0023] Identify the type of the HIL requirement description graphic;
[0024] According to the type of the HIL requirement description graphic and the corresponding description information, search for the corresponding association information in a preset association knowledge base and display the option of the association information;
[0025] If receiving a selection operation of the option, display the association information;
[0026] Generate a HIL requirements diagram based on the described information, the HIL requirements description diagram, and the associated information.
[0027] In one embodiment, after obtaining the described information input by the information input operation and generating a HIL requirements diagram based on the described information and the HIL requirements description diagram, it further includes:
[0028] When receiving a requirements concatenation instruction, concatenate two or more HIL requirements diagrams indicated by the requirements concatenation instruction into one HIL requirements diagram;
[0029] When receiving a requirements decomposition instruction, decompose the HIL requirements diagram indicated by the requirements decomposition instruction.
[0030] In one embodiment, after displaying the requirements design interface, it further includes:
[0031] Receive a flowchart editing operation instruction;
[0032] In response to the flowchart editing operation instruction, generate and display a flowchart.
[0033] A HIL requirements design device includes:
[0034] A display module for displaying a requirements design interface;
[0035] A graphics processing module for, in response to a graphics selection and movement operation, displaying the HIL requirements description diagram selected by the graphics selection and movement operation in a preset area of the requirements design interface;
[0036] A requirements diagram generation module for obtaining the described information input by an information input operation and generating a HIL requirements diagram based on the described information and the HIL requirements description diagram;
[0037] A conversion module for converting the HIL requirements diagram into natural language to obtain HIL requirements information and display it.
[0038] A computer device includes a memory and a processor. When the processor executes the computer program, the following steps are implemented:
[0039] Display a requirements design interface;
[0040] In response to a graphics selection and movement operation, display the HIL requirements description diagram selected by the graphics selection and movement operation in a preset area of the requirements design interface;
[0041] Obtain the described information input by an information input operation and generate a HIL requirements diagram based on the described information and the HIL requirements description diagram;
[0042] Convert the HIL requirement diagram into natural language, obtain the HIL requirement information and display it.
[0043] A computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0044] Display a requirement design interface;
[0045] In response to a graphic selection and movement operation, display the HIL requirement description graphic selected by the graphic selection and movement operation in a preset area of the requirement design interface;
[0046] Obtain the description information input by an information input operation, and generate a HIL requirement diagram according to the description information and the HIL requirement description graphic;
[0047] Convert the HIL requirement diagram into natural language, obtain the HIL requirement information and display it.
[0048] Compared with the prior art, one or more embodiments in the above solution may have the following advantages or beneficial effects:
[0049] By determining the HIL requirement graphic according to the graphic selection and movement operation, generating a HIL requirement diagram according to the HIL requirement graphic and the description information input by the information input operation, and converting the HIL requirement diagram into natural language to obtain the HIL requirement information; in this way, the HIL requirement diagram used to describe the HIL test requirements is automatically converted into natural language that can be understood by people, which is intelligent and efficient, and can avoid the deviation caused by manual description and interpretation of requirements, improve the accuracy of HIL requirement design, and thus improve the accuracy of HIL testing. Brief Description of the Drawings
[0050] The scope of the present disclosure can be better understood by reading the detailed description of the exemplary embodiments below in conjunction with the accompanying drawings. The accompanying drawings included therein are:
[0051] Figure 1 Shows a conventional HIL test flow block diagram;
[0052] Figure 2 Is a schematic flow diagram of a HIL requirement design method in an embodiment;
[0053] Figure 3 Is a processing logic block diagram of a copy and cache mechanism in an embodiment;
[0054] Figure 4 Is an attribute structure diagram of a state node of intelligent association input in an embodiment;
[0055] Figure 5 Is an attribute structure diagram of a condition node of intelligent association input in an embodiment;
[0056] Figure 6 It is a block diagram of a graphical requirements designer in an embodiment;
[0057] Figure 7 It is a schematic diagram of the element management of semaphore and value in an embodiment;
[0058] Figure 8 It is an example diagram of the grammar rule definition of the natural language of HIL requirements description in an embodiment;
[0059] Figure 9 It is a functional logic block diagram of a graphical requirements designer in an embodiment;
[0060] Figure 10 It is a structural block diagram of a HIL requirements design device in an embodiment. Detailed implementation manners
[0061] To make the objectives, technical solutions and advantages of the present invention clearer, the following will, with reference to the accompanying drawings and embodiments, elaborate in detail on the implementation method of the present invention, so as to fully understand how the present invention applies technical means to solve technical problems and the implementation process of achieving technical effects and implement accordingly.
[0062] In one embodiment, a HIL requirements design method is provided, which can be applied to a computer device. As Figure 2 shown, taking the application to a computer device as an example, the HIL requirements design method includes the following steps:
[0063] S110: Display a requirements design interface.
[0064] The requirements design interface is an interface for users to operate for requirements design and display. Specifically, the computer device can control a display device to display the requirements design interface through control operations.
[0065] S130: In response to a graphic selection and movement operation, display a HIL requirements description graphic selected by the graphic selection and movement operation in a preset area of the requirements design interface.
[0066] The graphic selection and movement operation is an operation for selecting and moving a HIL requirements description graphic. Among them, the HIL requirements description graphic is a basic element representing HIL test requirements. The preset area of the requirements design interface is an area for arranging the selected HIL requirements description graphic. Specifically, the requirements design interface may include a graphic selection area and a design area. The graphic selection area displays selectable HIL requirements description graphics, and the user can select a HIL requirements description graphic in the graphic selection area through the graphic selection and movement operation and drag it to the design area.
[0067] S150: Obtain the description information input by the information input operation, and generate a HIL requirements diagram according to the description information and the HIL requirements description diagram.
[0068] The information input operation is used to input description information, which can correspond to the HIL requirements description diagram. For example, the HIL requirements description diagram can be a diagram representing state nodes, and the user inputs the information describing the state within the diagram representing the state nodes through the information input operation. Specifically, there can be multiple selected HIL requirements description diagrams; drag the HIL requirements description diagram selected by the diagram selection and movement operation to the position specified by the diagram selection and movement operation, fill the corresponding HIL requirements description diagram according to the description information input by the information input operation, and complete the HIL requirements diagram in response to the user's operation.
[0069] S170: Convert the HIL requirements diagram into natural language, obtain the HIL requirements information and display it.
[0070] Through a predetermined conversion rule, convert the HIL requirements diagram into natural language, obtain the HIL requirements information and display it on the requirements design interface. For example, the requirements design interface can also include a description area, and after obtaining the HIL requirements information, display the HIL information in the description area of the requirements design interface. Among them, natural language refers to the language used by people to communicate, such as Chinese, which is simple and easy to understand.
[0071] Specifically, through NLP (Natural Language Processing) technology, natural language that is easy to understand can be automatically generated based on the HIL requirements diagram, which is not only easy to read but also can correctly and completely represent the HIL requirements.
[0072] The above HIL requirements design method determines the HIL requirements diagram according to the diagram selection and movement operation, generates a HIL requirements diagram according to the HIL requirements diagram and the description information input by the information input operation, and converts the HIL requirements diagram into natural language to obtain the HIL requirements information; in this way, the HIL requirements diagram used to describe the HIL test requirements is automatically converted into natural language that can be understood by people, which is intelligent and efficient, and can avoid the deviation caused by manual description and interpretation of requirements, improve the accuracy of HIL requirements design, and thus improve the accuracy of HIL testing.
[0073] The above HIL requirements design method can be applied to the HIL testing of automotive parts, providing a graphical and intelligent operation method for designing HIL requirements, and can help the personnel of evaluation enterprises or testing institutions design and produce test cases for the DUT very quickly.
[0074] In one embodiment, step S110 includes: when receiving a selection operation of the reading mode option, displaying a requirements design interface according to the display requirements of the reading mode; when receiving a selection operation of the editing mode option, displaying a requirements design interface according to the display requirements of the editing mode.
[0075] For example, the reading mode option and the editing mode option can be displayed through a display device, and the user can select them through operations. Among them, the selection operation of the reading mode option is an operation for selecting the reading mode option, and the selection operation of the editing mode option is an operation for selecting the editing mode option. In the reading mode, the requirements design interface is displayed according to the preset display rules of the reading mode; in the editing mode, the requirements design interface is displayed according to the preset display rules of the editing mode. In this way, the switching between the reading mode and the editing mode can be supported, which is convenient for the user to select.
[0076] For example, in the reading mode, the current editing object is expressed in concise natural language, the initial focus is on the state attribute natural paragraph, and the focus of the logical block is switched through the "KU / KD" keys on the keyboard. The logical paragraphs of the focus are displayed in a highlighted rounded border manner. By double-clicking on the focus logical segment, the editing mode can be switched and the logical segment elements can be automatically expanded according to the editing mode. In the editing mode, the focus logical paragraph is selected with a highlighted rounded border and is displayed in a way that is easy to interact and edit using front-end elements such as input boxes, selection boxes, and buttons. After the editing is completed, the editing mode can be exited by pressing the ESC key on the keyboard, and the edited natural language is automatically generated. When the user only wants to understand the information of the target object, the reading mode provides the maximum possible display space and presents language that is easy for people to understand. When the user wants to edit the details of the target object, the editing mode can be entered to provide the maximum possible editing space.
[0077] In one embodiment, step S130 includes: in response to a graphical selection and movement operation, loading the HIL requirements description graph selected by the graphical selection and movement operation in the cache, and displaying a preset area of the requirements design interface.
[0078] Load the HIL requirements description graph from the cache and operate it in the form of a copy to implement the copy and offline design mechanism. When the power is off, the design task is temporarily aborted, or the network terminal does not lose the existing design, and it can be restored at any time when the working conditions are restored.
[0079] The design requirements, the status of the requirements, and the migration conditions of the requirements are the target objects of graphical operations. Among them, the status of the requirements and the migration conditions of the requirements have a subordinate relationship with the requirement object. The computer device will establish a cache for the corresponding objects of the design requirements, the status of the requirements, and the migration conditions. Such as Figure 3As shown, when the user performs read and write operations by clicking on objects such as requirements, requirement status, and requirement migration conditions, the object data is first loaded from the cache. When the object data of the requirement does not exist in the cache, a request is made to the server to load the object data and store it in the object cache. When the object data of the requirement status and requirement migration conditions does not exist in the cache, an object copy is generated from the requirement and stored in the object cache. The meaning of generating an object copy here is that since the target is a sub-object of the source, a description content of the target is copied from the source. All modification actions of the user on the object are performed on the copy, and only when the user clicks to synchronize and merge, forced merging and storage are performed.
[0080] In one embodiment, step S150 includes steps (a1) to (a5).
[0081] Step (a1): Obtain the description information corresponding to the information input operation for the HIL requirement description graphic input.
[0082] Step (a2): Identify the type of the HIL requirement description graphic.
[0083] Step (a3): According to the type of the HIL requirement description graphic and the corresponding description information, search for the corresponding association information in the preset association knowledge base and display the options of the association information.
[0084] Step (a4): If a selection operation of the option is received, display the association information.
[0085] Step (a5): Generate a HIL requirement diagram according to the description information, the HIL requirement description graphic, and the association information.
[0086] By searching for association information according to the type of the HIL requirement description graphic and the corresponding description information for the user to select, a HIL requirement design combining graphical and intelligent association input is provided. The requirements are described using a graphical operation method, and a wizard-style intelligent association input can be performed on the requirements to design HIL requirements; developers and testers can perform intelligent association input, improving work efficiency, reducing expression ambiguity, focusing on logic and setting details, and reducing the requirement for professional knowledge.
[0087] Intelligent association can perform input by associating the input context environment, existing input, and requirement element base, reducing the workload of users, using the data in the knowledge base for the entry of professional terms, and reducing the requirement design and description ambiguity caused by personnel habits or knowledge. Specifically, association is performed by establishing an association matrix of the current input information, the type of the current HIL requirement description graphic, and the association knowledge base.
[0088] For example, the graphic selection area of the requirements design interface includes an editing area, and the UI components in the editing area are bound with the attributes of requirement element types. When the user inputs information, the system automatically identifies the attributes of the requirement element types bound to the current UI component, and submits the input information and the requirement element types to the backend association module in real time. The association module performs character prefix matching in the corresponding association knowledge base according to the association matrix and returns the matching association information. When the user approves and confirms the association option, the automatic association of the input content is completed; otherwise, it is a custom input. The attributes related to the current input item content will be used as the dependent input information for the next associated requirement element to restrict the association content of the next focus input element.
[0089] As Figure 4 shown, the attributes of the state node include basic requirement elements such as state name, state time expression, requirement reference expression, state logic block name, assignment expression, semaphore, operator, value, flowchart, etc. Perform associative input according to the predefined association strategy, the user's current input, and the associated historical input. As Figure 5 shown, the attributes of the condition node include elements such as condition name and condition expression.
[0090] In one embodiment, after step S150, it further includes: when receiving a requirement concatenation instruction, concatenating two or more HIL requirement diagrams indicated by the requirement concatenation instruction into one HIL requirement diagram; when receiving a requirement decomposition instruction, decomposing the HIL requirement diagram indicated by the requirement decomposition instruction.
[0091] By performing requirement concatenation according to the requirement concatenation instruction and requirement decomposition according to the requirement decomposition instruction, the functions of requirement concatenation and decomposition are supported. Requirement concatenation can change complex requirements into modular concatenated requirements.
[0092] Requirement concatenation mainly solves the problem scenarios where the description and design of large functional requirements are complex and need to be simplified and split, and the scenarios where multiple completed requirement designs need to be concatenated into one functional requirement. Decompose the requirements into sub-requirements and reference the sub-requirements. When clicking on a reference-type requirement, the concatenated requirement is automatically launched in the TAB tab page. In this way, multiple completed requirements can be concatenated, or a heavy requirement can be split into multiple requirements for concatenation.
[0093] In one embodiment, after step S110, it further includes: receiving a flowchart editing operation instruction; in response to the flowchart editing operation instruction, generating and displaying a flowchart.
[0094] By generating a flowchart based on the flowchart editing operation instructions, complex scenario problems encountered in the demand design process that require flowcharts to express can be solved. For example, flowcharts can be used to solve scenarios where some complex algorithms cannot be expressed in natural language or where it is difficult to express demand descriptions in natural language.
[0095] For example, you can enter the Python code related to the required functional logic and generate a flowchart in real time. The flowchart is generated based on the entered code. If the code is modified and not operated for a certain period of time, the flowchart will be automatically regenerated.
[0096] To better illustrate the present invention, the following is a specific description in conjunction with a graphical requirement designer that can implement the above HIL requirement design method:
[0097] The graphical requirement designer is divided into component area, editing area, design area, and description area. Different areas have different functional positioning and event response actions. HIL graphical requirements can be designed through graphical operations, and then Chinese formatted requirement description language can be automatically generated through NLP.
[0098] The component area mainly displays some graphics that can be used in the logic diagram, including start state nodes, end state nodes, custom state nodes, directed curves, directed polylines, and directed straight lines. Nodes and lines can be dragged into the logic diagram design area, and after dragging, they can be edited and designed in the editing area and setting area.
[0099] The editing area can be set up differently for different logic diagram components, such as state setting, state transfer, etc. In the setting area, you can perform automatic input filtering and association association. Other editing design areas are displayed synchronously.
[0100] The description area generates formatted demand natural language through NLG natural language generation and links with the editing area, and can design the demand through intelligent associative input. The content of the design area and setting area is displayed synchronously.
[0101] Drag and design the demand logic diagram components in the design area.
[0102] like Figure 6 As shown, the graphical requirement designer mainly includes core modules such as element management, natural language specification of requirement description and NLP automatic generation engine, intelligent associative input, copy and offline mechanism, graphical requirement designer, requirement concatenation, and real-time generation of flowcharts.
[0103] Among them, regarding element management: abstractly classify the elements that HIL test requirements depend on, and manage these elements separately to support intelligent association and graphical batch operations. Element management includes semaphore management, state management, constant management, conditional expression management, assignment expression management, condition management, state logic block management, flowchart management, formula management, table management, function management, and requirement path management. Take semaphore management as an example, refer to Figure 7 Through the abstract management of demand elements, the foundation of graphical and intelligent HIL demand design and automatic generation of natural language is constructed. These functions can be abstracted into the design and association of logical relationships between one or more groups of demand elements.
[0104] Regarding the natural language specification of requirement description and the NLP automatic generation engine: The formatted Chinese requirement language is defined and generated through the NLP module, and the formatted Chinese requirement language that is easy for people to understand is automatically generated according to the graphic design of the requirements. By defining the description language rules of the requirements, the machine language with logical structure is converted into natural language that is easy for people to understand. Requirements are mainly represented and described using basic elements such as requirement models, state nodes, migration conditions, semaphores, and constants. The state describes the current state nodes. The node information includes the state name, the state type to which the node belongs, and whether it is the default node of the state type. The state node generated when the requirement model is used to generate the requirement is usually the default node. The state logic block represents the signal that needs to be set when the requirement is in a certain node state, mainly flowchart statements and assignment expression statements. The conditional migration statement describes the transfer relationship between nodes. The transfer relationship mainly includes information such as source node, transfer condition, and target node. The conditions include condition type, condition name, and condition expression. These statements are organized according to certain grammatical rules, and the graphically designed HIL requirements can be converted into requirements described in natural language that are easy for people to understand through the NLP conversion engine. The grammatical rules of the natural language for HIL requirement description are defined as follows: Figure 8 shown.
[0105] Users can use the graphical operations of the graphical requirements designer to perform intelligent association and flow chart design to generate requirement description graphics for minimized requirements, nested requirements, and requirement concatenation. The NLP module can automatically convert the graphics into formatted Chinese requirement language that is easy for people to understand.
[0106] Define the natural language of requirements that people can understand as the HIL requirement grammar of NLP according to certain specifications and standards, and split various target objects into basic elements of requirements according to the grammar, such as Figure 9As shown, it is constructed into graphical HIL requirements through a graphical requirements designer and intelligent associative input, and the graphical HIL requirements are automatically converted into natural language for requirement description through an NLP engine and predefined HIL requirement language syntax. To support complex requirement design, the support of flowcharts and the support of requirement concatenation are introduced. To enable the graphical requirements designer to more effectively utilize space, a mechanism for switching between reading and editing modes is designed. At the same time, to support offline design and parallel design, an offline and copy requirement design mechanism is introduced.
[0107] Taking the implementation using a B / S architecture as an example, the difference in the implementation effect between the present invention and the traditional one lies in:
[0108]
[0109] It should be understood that although Figure 1 each step in the flowchart of Figure 1 is shown in sequence according to the indication of the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover,
[0110] In one embodiment, as Figure 10 shown, a HIL requirement design device is provided, including:
[0111] A display module 110 for displaying a requirement design interface; a graphics processing module 130 for, in response to a graphics movement operation, displaying a HIL requirement description graph selected by the graphics movement operation in a preset area of the requirement design interface; a requirement graph generation module 150 for obtaining description information input by an information input operation and generating a HIL requirement graph according to the description information and the HIL requirement description graph; a conversion module 170 for converting the HIL requirement graph into natural language to obtain HIL requirement information and display it.
[0112] The above HIL requirement design device determines the HIL requirement graph according to the graphic selection and movement operation, generates the HIL requirement diagram based on the HIL requirement graph and the description information input by the information input operation, converts the HIL requirement diagram into natural language, and obtains the HIL requirement information. In this way, the HIL requirement diagram used to describe the HIL test requirements is automatically converted into natural language that can be understood by people, which is intelligent and efficient, and can avoid the deviation caused by manual description and interpretation of requirements, improve the accuracy of HIL requirement design, and thus improve the accuracy of HIL testing.
[0113] For the specific limitations of the HIL requirement design device, reference can be made to the limitations of the HIL requirement design method in the above text, which will not be elaborated here. Each module in the above HIL requirement design device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules. It should be noted that the division of modules in the embodiments of this application is illustrative, only a logical function division, and there may be other division methods in actual implementation.
[0114] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps of the methods in the above embodiments are implemented.
[0115] The above computer device, since it can implement the steps of the methods in the foregoing embodiments, can, by the same token, improve the accuracy of HIL requirement design, and thus improve the accuracy of HIL testing.
[0116] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the methods in the above embodiments are implemented.
[0117] The above computer-readable storage medium, since it can implement the steps of the methods in the foregoing embodiments, can, by the same token, improve the accuracy of HIL requirement design, and thus improve the accuracy of HIL testing.
[0118] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.
[0119] Although the embodiments disclosed in the present invention are as above, the content described is only an embodiment adopted for the convenience of understanding the present invention and is not intended to limit the present invention. Any person skilled in the art within the technical field to which the present invention pertains may make any modifications and changes in the form of implementation and details without departing from the spirit and scope disclosed in the present invention. However, the scope of protection of the present invention shall still be subject to the scope defined by the appended claims.
Claims
1. A HIL requirement design method, characterized in that, Including: When receiving a selection operation of the reading mode option, display the requirement design interface according to the reading mode; When receiving a selection operation of the editing mode option, display the requirement design interface according to the editing mode; In the reading mode, use natural language to express the current editing object. The initial focus is on the natural paragraph of the status attribute. The focus of the logical block is switched through the "KU / KD" keys on the keyboard. The logical paragraphs of the focus are presented in the form of a highlighted rounded border; switch to the editing mode by double-clicking the focus logical segment and automatically expand the logical segment elements according to the editing mode. In the editing mode, the focus logical paragraph is selected with a highlighted rounded border and presented in a way that is easy for front-end elements to interact and edit. The front-end elements include input boxes, selection boxes, and buttons; After editing is completed, exit the editing mode by pressing the ESC key on the keyboard and automatically generate the edited natural language; In response to a graphic movement operation, load the HIL requirement description graphic selected by the graphic movement operation from the cache in the form of a copy and display it in a preset area of the requirement design interface; The design requirements, the status of the requirements, and the migration conditions of the requirements are the target objects of graphic operations. The status of the requirements and the migration conditions of the requirements have a subordinate relationship with the requirement objects. Establish a cache for the corresponding objects of the design requirements, the status of the requirements, and the migration conditions. When performing read and write operations on the objects, load the object data from the cache. When the object data of the requirements does not exist in the cache, request to load the object data and store it in the object cache. When the object data of the status of the requirements and the migration conditions of the requirements does not exist in the cache, generate an object copy from the requirements and store it in the object cache; all modification actions on the objects are performed on the copy, and only when clicking to synchronize and incorporate, force the merge and store; Obtain the description information input by the information input operation, and generate a HIL requirement diagram according to the description information and the HIL requirement description graphic; Convert the HIL requirement diagram into natural language, obtain the HIL requirement information and display it.
2. The method according to claim 1, wherein The description information input by the information input operation, generating a HIL requirement diagram according to the description information and the HIL requirement description graphic, includes: Obtain the description information input by the information input operation corresponding to the HIL requirement description graphic; Identify the type of the HIL requirement description graphic; According to the type of the HIL requirement description graphic and the corresponding description information, search for the corresponding association information in the preset association knowledge base and display the option of the association information; If receiving a selection operation of the option, display the association information; Generate a HIL requirement diagram according to the description information, the HIL requirement description graphic, and the association information.
3. The method according to claim 1, characterized in that, After the description information input by the information input operation, generating a HIL requirement diagram according to the description information and the HIL requirement description graphic, it further includes: When receiving a requirement concatenation instruction, concatenate two or more HIL requirement diagrams indicated by the requirement concatenation instruction into one HIL requirement diagram; When receiving a requirement decomposition instruction, decompose the HIL requirement diagram indicated by the requirement decomposition instruction.
4. The method according to claim 1, wherein After displaying the requirement design interface, it further includes: Receive a flowchart editing operation instruction; In response to the flowchart editing operation instruction, a flowchart is generated and displayed.
5. A HIL requirement design device, characterized in that, Including: A display module, configured to display the requirement design interface according to the reading mode when receiving the selection operation of the reading mode option; When receiving the selection operation of the editing mode option, display the requirement design interface according to the editing mode; In the reading mode, the current editing object is expressed in natural language, the initial focus is on the natural paragraph of the status attribute, and the focus of the logic block is switched through the "KU / KD" keys on the keyboard. The logical paragraphs of the focus are presented in the form of highlighted rounded borders; switching to the editing mode by double-clicking the focus logical segment and automatically expanding the logical segment elements according to the editing mode. In the editing mode, the focus logical paragraph is selected with a highlighted rounded border and presented in a way that is easy for the front-end elements to interact and edit. The front-end elements include input boxes, selection boxes, and buttons; After the editing is completed, exit the editing mode through the ESC key on the keyboard, and automatically generate the edited natural language; A graphics processing module, configured to, in response to the graphics selection and movement operation, load the HIL requirement description graphics selected by the graphics selection and movement operation from the cache in the form of a copy, and display a preset area of the requirement design interface; The design requirements, the status of the requirements, and the migration conditions of the requirements are the target objects of the graphical operation. The status of the requirements and the migration conditions of the requirements have a subordinate relationship with the requirement objects. Caches for the corresponding objects of the design requirements, the status of the requirements, and the migration conditions are established. When reading and writing operations are performed on the objects, the object data is loaded from the cache. When the object data of the requirements is not present in the cache, request to load the object data and store it in the object cache. When the object data of the status of the requirements and the migration conditions of the requirements is not present in the cache, generate an object copy from the requirements and store it in the object cache; all modification actions on the objects are performed on the copies, and only when clicking to synchronize and merge, force the merge and perform the storage; A requirement diagram generation module, configured to obtain the description information input by the information input operation, and generate a HIL requirement diagram according to the description information and the HIL requirement description graphics; A conversion module, configured to convert the HIL requirement diagram into natural language, obtain the HIL requirement information and display it.
6. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method described in any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the steps of the method described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Generation of automated testing scripts by converting manual test cases
CN110018955A
BPMN-based micro-service workflow deployment method
CN112463141A