Method and system for implementing program step visualization in vehicle simulation test process

The method and system for program step visualization in automobile simulation testing address the challenge of intuitively displaying the driving state by using flag parameters to visualize the execution states of test boxes, thereby improving monitoring and fault inspection efficiency.

JP2025077967AActive Publication Date: 2025-05-19SHANGHAI TOSUN TECH LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2024105838
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-11-06
Filing Date
2024-06-30
Publication Date
2025-05-19
Estimated Expiration
2044-06-30

AI Technical Summary

Technical Problem

Automobile simulation test programs based on C code face challenges in intuitively displaying the driving state, leading to difficulties in tracking executed operations, identifying failed determinations, and navigating complex test logic with many branches and loops.

Method used

A method and system for realizing program step visualization in automobile simulation testing, which involves setting flag parameters for active and inactive states for each execution box in the graphic program. The display flag is updated based on the execution state changes and inactivity over a preset time, allowing for intuitive visualization of the test process.

Benefits of technology

This approach enables intuitive visualization of program steps during automobile simulation testing, improving the ability to monitor and inspect test processes, reducing the risk of damage from destructive operations, and enhancing the efficiency of identifying test failures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025077967000001_ABST
    Figure 2025077967000001_ABST
Patent Text Reader

Abstract

To provide a program step visualization implementation method that belongs to a field of vehicle simulation test programs and specifically relates to a method for implementing program step visualization in a simulation test process.SOLUTION: A method includes: setting flag parameters in an activated state and a non-activated state corresponding to corresponding execution states for each execution box in a graphics program; when the execution state of the execution box has changed, changing a display flag of the execution box to an activated-state flag corresponding to a new execution state; and when a current execution state of the execution box remains unchanged for a preset time period, changing the display flag of the execution box from the activated-state flag to a non-activated-state flag.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application claims the Chinese Patent Application No. 202311468719.3 filed on November 6, 2023 based on priority, and all its contents are incorporated herein by reference.

[0002] The present invention belongs to the field of automobile simulation test programs, and specifically relates to a method and system for realizing program step visualization in the simulation test process.

Background Art

[0003] In the field of automobiles, automobile simulation test programs always need to load and execute automobile C code, which is essentially different from graphic programs in other robot fields. Graphic programs in the robot field are mainly constructed and executed in a compiled framework, without considering code generation. On the other hand, a graphic program consisting of automobile C code is considered for the purpose of generating embedded terminal code, so graphic programs in other fields cannot be directly migrated to graphic programs in the automobile field.

[0004] Therefore, automobile simulation test programs based on C code have field uniqueness and bring technical problems specific to the simulation test program. That is, when the simulation test program runs, the driving state cannot be intuitively displayed, and the problems caused by the inability to intuitively display the driving state are as follows. (1) It is impossible to know which operations the current test process has executed and whether the executed operations are destructive. If an attempt is made to interrupt the test during a destructive execution operation, the test object and the test system may be damaged. (2) In the current test process, it is impossible to know whether the test determination has failed and which type of determination has failed. In the conventional method, since log records were searched, the efficiency was low. (3) In test logic with a large number of branches and loops, it is impossible to know which branch the test logic has followed, and it is impossible to evaluate what state the test logic has entered.

Summary of the Invention

[0005] The present invention relates to a method for realizing program step visualization in the process of automobile simulation testing based on C code. This realization method includes the following. For each execution box in the graphics program by C code, set flag parameters of an active state and an inactive state corresponding to the corresponding execution state respectively. When the execution state of the execution box changes, change the display flag of the execution box to the active state flag corresponding to the new execution state. Also, when the execution box does not change within a preset certain time in the current execution state, change the display flag of the execution box from the active state flag to the inactive state flag.

[0006] On the other hand, the present invention relates to a system for realizing program step visualization in the process of automobile simulation testing based on C code. This system includes a computer device, and the computer device is configured to include a setting module and a flag module. The setting module sets flag parameters of an active state and an inactive state corresponding to the corresponding execution state for each execution box in the graphics program based on C code respectively. When the execution state of the execution box changes, the flag module changes the display flag of the execution box to the active state flag corresponding to the new execution state. When the execution box does not change for a preset fixed time in the current execution state, the display flag of the execution box is changed from the active state flag to the inactive state flag.

[0007] Other features and advantages of the present invention are described in the following specification, and some are obvious from the specification, or understood by implementing the present invention. The objectives and other advantages of the present invention are realized and obtained by the structure specifically pointed out in the specification and drawings. In order to make the above objects, features, and advantages of the present invention clearer, the following provides preferred embodiments and, in conjunction with the accompanying drawings, will be described in detail.

Brief Description of the Drawings

[0008] In order to more clearly explain the specific embodiments of the present invention or the technical solutions of the prior art, the following briefly describes the drawings that need to be used in the description of the specific embodiments or the prior art. The drawings described in the following description are some embodiments of the present invention, and it is obvious that those skilled in the art can obtain other drawings from these drawings without creative efforts.

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Embodiments for Carrying Out the Invention

[0009] To make the objectives, technical aspects, and advantages of the embodiments of the present invention clearer, the technical aspects of the present invention will be clearly and completely described below in connection with the accompanying drawings. It is obvious that the described embodiments are only some embodiments of the present invention and not all embodiments. Based on the embodiments of the invention, all other embodiments obtained on the premise that those skilled in the art do not perform creative labor belong to the protection scope of the invention.

[0010] The C-code based automobile simulation test program has the uniqueness of the field and brings technical problems specific to the simulation test program, that is, when the simulation test program runs, the driving state cannot be intuitively displayed, and the problems caused by the inability to intuitively display the driving state are as follows. (1) It is impossible to know which operation the current test process is executing and whether the executed operation is destructive. If an attempt is made to interrupt the test during a destructive execution operation, the test object and the test system may be damaged. (2) It is impossible to know whether the test determination has failed in the current test process and which type of determination has failed. In the conventional method, since log records were searched, the efficiency was poor. (3) In a test logic having a large number of branches and loops, it is impossible to know which branch the test logic has followed and it is impossible to evaluate what state the test logic has entered.

[0011] Therefore, at least one embodiment provides a method for realizing program step visualization in the simulation test process. This method includes the following. Set flag parameters of active state and non-active state corresponding to the corresponding execution state for each execution box in the graphic program. When the execution state of the execution box changes, change the display flag of the execution box to the active state flag corresponding to the new execution state. If the execution box does not change within a preset certain time in the current execution state, change the display flag of the execution box from the active state flag to the non-active state flag. The method for realizing program step visualization in the present simulation test process designs a visualization method based on the graphic program and can intuitively present the steps executed by the current program during driving.

[0012] Hereinafter, various non-limiting embodiments of the examples of the present disclosure will be described in detail in connection with the accompanying drawings. As shown in FIG. 1, some embodiments provide a method for realizing program step visualization in the simulation test process based on C code. This method includes the following. In S101, flag parameters of active state and non-active state corresponding to the respective corresponding execution states are set for each execution box in the graphic program based on C code. In S102, when the execution state of the execution box changes, the display flag of the execution box is changed to the active state flag corresponding to the new execution state. Also, when the execution box does not change within a preset certain time in the current execution state, the display flag of the execution box is changed from the active state flag to the non-active state flag.

[0013] Specifically, the active state means that the current execution box undergoes a transition from a state not being executed by the test system to a state being executed by the test system, and the current time is within a preset time after the state transition time. The non-active state means that the current execution box is not being executed by the test system, or the current execution box has been executed by the test system, but the time from the state transition time to the current time exceeds the preset time.

[0014] Setting the active state and the inactive state is for highlighting the latest operating state of the program, i.e., which execution unit the program is currently executing, whether an error has occurred in the executed execution unit, and how much time has elapsed from the time of the most recent success or error occurrence to the current time. By setting the active state and the inactive state, the visualization effect of the operating state is improved. When the user monitors the test process through a screen or a display board, the user can track the running direction of the test flow, and at the same time, can locate the specific execution unit at the first time after a program jump or an error report, thereby improving the efficiency of monitoring and fault inspection in the test process.

[0015] Also, after the execution state of the execution box is changed to the active state flag corresponding to the new execution state, if the active state remains maintained, the user cannot clearly know whether the current active state is the one that occurred before, the one that occurred immediately before, the one that occurred once, the one that occurred multiple times, the one that occurred continuously, etc. That is, if it remains in the active state, it cannot play a role in prompting the user's attention to the event. Therefore, when the execution box holds the current execution state for a certain preset time, the display flag of the execution box is changed from the active state flag to the inactive state flag. When the execution state changes in this way, all execution units are switched from the inactive state to the active state, and the active state can display a highlight color, effectively attracting the user's attention. After the execution state is held for a long time, the highlight color disappears, avoiding continuously occupying the user's attention, thereby improving the monitoring efficiency of the test flow.

[0016] In some embodiments, the above flag parameters include a color parameter and a pattern parameter.

[0017] In some embodiments, when the flag parameter is a color parameter, the method for realizing program step visualization in the above simulation test process includes the following. Set the color parameters of the active state and the non - active state corresponding to the respective execution states for each execution box in the graphic program based on C code. When the execution state of the execution box changes, set the display color of the execution box to the active state color corresponding to the new execution state. When the execution box remains in the current execution state, gradually change the display color of the execution box from the active state color to the non - active state color.

[0018] In some embodiments, the pattern parameter type includes, but is not limited to, for example, the execution box shape pattern and the execution box background filling pattern. The execution box shape pattern includes, for example, a square, a circle, a star, etc. The execution box background filling pattern does not include a single - color background filling pattern. Specifically, for example, it includes linear filling, circular filling, triangular filling, etc.

[0019] In some embodiments, when the flag parameter is a pattern parameter, for example, the execution box shape pattern, the method for realizing program step visualization in the above simulation test process includes the following. For each execution box in a graphic program based on C code, pattern parameters for the active state and the inactive state corresponding to the corresponding execution state are set respectively. In a state where execution has not started, assume that the active state of the execution box is rectangular. In an executing state, assume that the active state of the execution box is square and the inactive state is circular. When the execution state of the execution box changes from a state where execution has not started to an executing state, the shape pattern of this execution box is changed from a rectangle to a square, which is the active shape pattern corresponding to the new execution state. When the execution box remains in the current execution state, the shape pattern of the execution box is gradually changed from the active shape pattern state, that is, from a square to an inactive state shape pattern such as a circle.

[0020] In some embodiments, when the flag parameter is a pattern parameter, for example, the background filling pattern of the execution box, the method for realizing program step visualization in the above simulation test process includes the following. For each execution box in a graphic program based on C code, pattern parameters for the active state and the inactive state corresponding to the corresponding execution state are set respectively. In a state where execution has not started, assume that the active state of the execution box is linear filling. In an executing state, assume that the active state of the execution box is circular filling and the inactive state is triangular filling. When the execution state of the execution box changes from a state where execution has not started to an executing state, the background filling pattern of this execution box is changed from linear filling to circular filling, which is the active background filling pattern corresponding to the new execution state. When the execution box remains in the current execution state, the background filling pattern of the execution box is gradually changed from the active shape pattern state, that is, from circular filling to an inactive state background filling pattern such as triangular filling.

[0021] In some embodiments, the color parameters and pattern parameters may be combined and expressed as needed. For example, in the case of triangular filling, the color may be adjusted according to the change in color, or similarly, when the execution box shape pattern changes, the color may also be adjusted accordingly.

[0022] In some embodiments, the above execution states include a state where execution has not started, a state where execution is in progress, a state where execution is completed and the execution result is marked as passed, a state where execution is completed and the execution result is marked as failed, a state where execution is interrupted, and a state where execution is marked as failed during execution. The color parameters of the active state and the non - active state corresponding to the corresponding execution state of each execution box are illustrated in the following table.

Table 1

[0023] The following shows in detail several examples where, when the execution state of the execution box changes, the display color of this execution box changes to the color of the active state corresponding to the new execution state. As shown in Figure 2, the execution boxes Entry and OK are in a state where execution is completed and the execution result is marked as passed, and the current display color of both is green. The execution box NOK is in a state where execution is completed and the execution result is marked as failed, and the current display color is red. The execution box "Connected?" is in the state of execution in progress, and the current display color is yellow. The execution boxes Connected and Disconnected are in the state where execution has not started, and the current display color of both is blue. As shown in Figure 3, the execution boxes Entry and OK are in a state where execution is completed and the execution result is marked as passed, and the current display color of both is green. The execution box NOK is in a state where execution is in progress and marked as failed, and the current display color is red. The execution boxes "Connected?", Connected, and Disconnected are in the state where execution has not started, and the current display color of all of them is blue. As shown in FIG. 4, when the execution box Entry and the execution box OK are in a state where the execution is completed and the execution result is marked as passed, their current display colors are both green. The execution box NOK is in a state where the execution is interrupted, and its current display color is purple. The execution boxes "Connected?", Connected, and Disconnected are in a state where the execution has not started, and their current display colors are all blue.

[0024] The following will show in detail several examples of the case where the display color of the execution box gradually changes from the active state color to the non-active state color while the execution box remains in the current execution state. As shown in FIG. 5, when the execution box Entry and the execution box OK maintain the state where the execution is completed and the execution result is marked as passed, their current display colors gradually change from green to lake green. When the execution box NOK maintains the state where the execution is completed and the execution result is marked as failed, its current display color gradually changes from red to light pink. When the execution box "Connected?" maintains the execution in-progress state, its current display color gradually changes from yellow to light yellow. When the execution boxes Connected and Disconnected maintain the state where the execution has not started, their current display colors remain blue. As shown in FIG. 6, when the execution box Entry and the execution box OK maintain the state where the execution is completed and the execution result is marked as passed, their current display colors gradually change from green to lake green. When the execution box NOK maintains the state where it is marked as failed during execution, its current display color gradually changes from red to light pink. When the execution boxes "Connected?", Connected, and Disconnected maintain the state where the execution has not started, their current display colors remain blue. As shown in FIG. 7, when the execution box Entry and the execution box OK maintain the state where the execution is completed and the execution result is marked as qualified, the current display color gradually changes from green to lake green. When the execution box NOK maintains the state where the execution is interrupted, the current display color gradually changes from purple to light purple. When the execution boxes "Connected?", "Connected", and "Disconnected" maintain the state where the execution has not started, the current display color remains blue.

[0025] In some embodiments, when the execution box remains in the current execution state, the step of gradually changing the display color of the execution box from the active state color to the inactive state color includes the following. Obtain the execution time Ta of the current execution state. Let the time range for gradually changing from the active state color to the inactive state color be T0. Extract the three components R1, G1, and B1 from the RGB of the active state color. Extract the three components R2, G2, and B2 from the RGB of the inactive state color. Calculate the three components R0, G0, and B0 of the RGB of the display color of the execution box. Integrate the three components R0, G0, and B0 to obtain the display color of the execution box corresponding to the current execution state.

[0026] Hereinafter, when the execution box remains in the current execution state, an example in which the display color of the execution box gradually changes from the active state color to the inactive state color will be described in detail. Assume that the test system executes an execution unit having a function of waiting for signal 1 to change from 0 to 1, and the waiting timeout time is 10 seconds. If the execution unit operates at the 3rd second and signal 1 is always 0, then this execution box will remain in the waiting state, that is, in the execution state, for the next 10 seconds. Then the display color of this execution box gradually changes from the active state color to the inactive state color, and the change process is as follows. The execution time when the execution box starts the execution state is Ta = 3 seconds. At the 3rd second, the execution box is in the active state. The current display color of the execution box is yellow FFC000, and the corresponding non - active state color is light yellow FFE89D. Set the time width T0 = 5 seconds for the gradual change from the active state color to the non - active state color.

[0027] Take out the three components of R1, G1, and B1 from the hexadecimal value FFC000 of the active state color value. That is, the three RGB components are R1 = 0xFF (255), G1 = 0xC0 (192), B1 = 0x00 (0).

[0028] Take out the three components of R2, G2, and B2 from the hexadecimal value FFE89D of the non - active state color value. That is, the three RGB components are R2 = 0xFF (255), G2 = 0xE8 (232), B2 = 0x9D (157).

[0029] The three RGB components of the display color of the execution box are calculated based on the active state color, non - active state color, and the current elapsed time T. For example, if the current execution time Tb of the execution box is obtained until the 5.5th second and it continues to execute for 2.5 seconds with respect to Ta, that is, the elapsed time T = 2.5 seconds. At this time, calculate the three components R0, G0, and B0 of the display color of the execution box. That is, R0 = 0xFF (255), G0 = 0xD4 (212), B0 = 0x4E (78).

[0030] Integrate the three components of R0, G0, and B0 to get the hexadecimal value FFD44E, and gradually change the display color of the execution box corresponding to the current execution state, that is, the color FFC000 corresponding to the active state, to the color FFE89D corresponding to the non - active state over time. During the passage of time, for example, when it continues to execute for 2.5 seconds, that is, T = 2.5 seconds, change the display color of the execution box from FFC000 to FFD44E.

[0031] In some embodiments, calculating the three components R0, G0, and B0 of the display color RGB of the execution box (step) includes the following. Calculate the elapsed time T. If T>T0, then R0 = R2, G0 = G2, B0 = B2. Otherwise, R0 = T / T0 * (R2 - R1) + R1, G0 = T / T0 * (G2 - G1) + G1, B0 = T / T0 * (B2 - B1) + B1.

[0032] Taking the calculation of the three components R0, G0, and B0 of the display color RGB of the execution box as an example for explanation. Assume that the test system executes an execution unit with the function of waiting for signal 1 to change from 0 to 1, and the waiting timeout time is 10 seconds. If this execution unit activates at the 3rd second and signal 1 is always 0, then this execution box will remain in the waiting state within the next 10 seconds, that is, it will remain in the execution state within the next 10 seconds. Then the display color of this execution box gradually changes from the active state color to the non - active state color, and the change process is as follows. The execution time when the execution box starts the execution state is Ta = 3 seconds. At the 3rd second, the execution box is in the active state, the current display color of the execution box is yellow FFC000, and the corresponding non - active state color is light yellow FFE89D. Set the time width for gradually changing from the active state color to the non - active state color as T0 = 5 seconds.

[0033] Extract the three components R1, G1, and B1 from the hexadecimal value FFC000 of the active state color. That is, the three components of RGB are R1 = 0xFF (255), G1 = 0xC0 (192), B1 = 0x00 (0).

[0034] Extract the three components R2, G2, and B2 from the hexadecimal value FFE89D of the non - active state color. That is, the three components of RGB are R2 = 0xFF (255), G2 = 0xE8 (232), B2 = 0x9D (157).

[0035] The three components of the display color RGB of the execution box are calculated based on the active state color, the inactive state color, and the current elapsed time. The method is as follows. The current elapsed time T = the current time - the execution time when the execution box starts the execution state. That is, T = Tb - Ta. When T > T0, R0 = R2, G0 = G2, B0 = B2, and the color of the execution box is locked to hexadecimal FFE89D so that it does not change. Otherwise, the color of the execution box is calculated by the following formula. R0 = T / T0 * (R2 - R1) + R1 G0 = T / T0 * (G2 - G1) + G1 B0 = T / T0 * (B2 - B1) + B1 That is, R0 = 255 G0 = T * 8 + 192 B0 = T / 5 * 157 For example, when the current time Tb = 5 seconds and the current elapsed time T = Tb - Ta = 2 seconds, then R0 = 255, G0 = 208, B0 = 62, and the color of this execution box is hexadecimal FFD03E.

[0036] In some embodiments, the color parameters of the active state and the inactive state corresponding to the state where the execution is completed and the execution result is marked as failed, and the state where the execution is marked as failed during execution are the same, and both are abnormal colors. If the execution box is a cell group, when the execution state of any execution box in the cell group is the state where the execution is completed and the execution result is marked as failed or the state where the execution is marked as failed during execution, the display color of this cell group is set as an abnormal color.

[0037] The color parameters of the active state and the inactive state corresponding to the state where the execution is completed and marked as failed, and the state marked as failed during execution are the same, and both are abnormal colors. If the execution box is a cell group, if the execution state of any execution box in the cell group is the state where the execution is completed and marked as failed or the state marked as failed during execution, an example of how the display color of the cell group is an abnormal color will be described in detail. The test system executes the execution unit. Its function is to call the API function, and there is a 10-second delay in the function body. During the delay, it determines in real time whether signal 1 is 1. If signal 1 is not 1, it calls another API function "test.set_verdict_nok" to determine that the result is failed. If signal 1 is always 0, when the execution unit calls this API function, it is first marked as the executing state, that is, the display color is 0xFFC000 in hexadecimal. Subsequently, in the state where the execution is completed and marked as failed, the color of the execution box of the execution unit is immediately changed to 0xFF0000 in hexadecimal, and this color is an abnormal color. During the next 0 to 5 seconds, the color of the execution box of the execution unit gradually transitions from the abnormal color (0xFF0000 in hexadecimal) in the active state to the abnormal color (0xFFB7B9 in hexadecimal) in the inactive state, and within the next 5 to 10 seconds, it does not change.

[0038] As shown in FIG. 8, the execution box NOK is the execution unit where the current system is operating. The figure shows the state where the execution is completed and marked as failed immediately after this execution box enters the execution state.

[0039] As shown in FIG. 9, the execution block NOK is the execution unit where the current system is operating. The figure shows the state where this execution box has maintained the execution state for 7 seconds and the execution is completed and marked as failed.

[0040] As shown in FIGS. 10 and 11, when the execution box NOK is in one execution unit group, the execution box is marked as failed during execution, and the display color of the execution box is an abnormal color. The execution unit group including this execution box is also marked as failed, and the display color of the unit group of this execution box is an abnormal color.

[0041] As shown in FIG. 12, some embodiments further provide a signal tracking and observation system in automotive bus tool software. This system includes a computer device, and the computer device is configured to include a setting module and a flag module. The setting module sets flag parameters of an active state and an inactive state corresponding to a corresponding execution state for each execution box in a graphic program based on C code. When the execution state of the execution box changes, the flag module changes the display flag of the execution box to an active state flag corresponding to the new execution state. When the execution box does not change within a preset certain time in the current execution state, the display flag of the execution box is changed from an active state flag to an inactive state flag. The specific implementation functions of the setting module and the flag module are realized in the computer device. Specifically, the content of the method for realizing the visualization of program steps in the above simulation test process can be considered, so the description is omitted here.

[0042] Hereinafter, an electronic device according to an embodiment of the present disclosure will be described from the perspective of hardware processing. The embodiments of the present disclosure do not limit the specific implementation of the electronic device. As shown in FIG. 13, some embodiments further provide an electronic device. This electronic device includes a processor, a computer-readable storage medium, a communication bus, and a communication interface. The above-mentioned processor, the above-mentioned computer-readable storage medium, and the above-mentioned communication interface realize communication with each other via the above-mentioned communication bus. The above-mentioned computer-readable storage medium is used to store a program for executing the method for realizing visualization of program steps in the above-mentioned simulation test process, and the above-mentioned program causes the processor to execute operations corresponding to the method for realizing visualization of program steps in the above-mentioned simulation test process.

[0043] As shown in FIG. 14, some embodiments further provide an electronic device. This electronic device includes a processor, a display for communicating with the processor to display a graphic interface, and a computer-readable storage medium. The above-mentioned computer-readable storage medium stores a command program. The above-mentioned processor is configured to execute the command program so that the following operations are performed. Set flag parameters of an active state and a non-active state corresponding to the respective corresponding execution states for each execution box in the graphic program. When the execution state of the execution box changes, change the display flag of the execution box to the active state flag corresponding to the new execution state. When the execution box does not change within a preset certain time in the current execution state, change the display flag of the execution box from the active state flag to the non-active state flag. The above-mentioned display is configured to display a graphic program via a graphic interface.

[0044] In some embodiments, a computer device and an industrial personal computer can also be regarded as a kind of electronic device. Note that the configurations shown in FIGS. 13 and 14 do not limit the electronic device, and the configuration may be less than, more than, a combination of some of, or different from the illustrated configuration.

[0045] In some embodiments, the communication interface may be a communication interface connectable to an external bus adapter, such as RS232, RS485, a USB port, and a TYPE port. A wired or wireless network interface may also be included, and the network interface may optionally include wired and / or wireless interfaces (e.g., a WI-FI interface, a Bluetooth interface, etc.) typically used to establish a communication connection between the computer device and other electronic devices.

[0046] In some embodiments, the readable storage medium or computer-readable storage medium includes at least one type of memory. The memory includes flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, it may be an internal storage unit of the computer device, such as a hard disk of the computer device. In other embodiments, the memory may be an external storage device of the computer device, such as a plug-in hard disk equipped in the computer device, a Smart Media Card (SMC) (registered trademark), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory may include both an internal storage unit and an external storage device of the computer device. The memory stores various data such as application software installed in the computer device and the code of a computer program, and is also used to temporarily store output data and data to be output.

[0047] In some embodiments, the processor executes program code stored in the memory or processes data, and may be, for example, a Central Processing Unit (CPU) for executing a computer program, a controller, a microcontroller, a microprocessor, or other data processing chips.

[0048] In some embodiments, the communication bus may be an input / output bus that can be, for example, a Peripheral Component Interconnect (PCI) bus or an Enhanced Industry Standard Architecture (EISA) bus. This bus can be divided into an address bus, a data bus, a control bus, and the like.

[0049] Optionally, the computer device may further include a user interface. The user interface can include input units such as a display and a keyboard. Optionally, the user interface can also include a standard wired interface and a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. In this case, the display is also called a display screen or a display unit for displaying the information processed in the computer device and for displaying the visualized user interface.

[0050] When the above-mentioned processor executes the above program, it realizes the steps in the embodiment of the method for realizing the visualization of program steps in the simulation test process shown in FIG. 1 above, for example, steps S101 to S102 shown in FIG. 1. Alternatively, when the processor executes a computer program, it realizes the functions of each module or unit in the above embodiments of each device.

[0051] Some embodiments further provide a computer-readable storage medium. This storage medium stores the method for realizing the visualization of program steps in any of the above possible simulation test processes.

[0052] Some embodiments further provide a computer-readable storage medium. This storage medium stores computer-readable instructions, and when executed by at least one processor, it causes the visualization realization method of the program steps in the simulation test process described above to be executed, specifically as follows. For each execution box in the graphic program, set flag parameters of an active state and a non-active state corresponding to the corresponding execution state respectively. When the execution state of the execution box changes, change the display flag of the execution box to the active state flag corresponding to the new execution state. Also, when the execution box does not change within a preset certain time in the current execution state, change the display flag of the execution box from the active state flag to the non-active state flag. Refer to the specific description of the method for realizing the visualization of program steps in the simulation test process, and the description here is omitted.

[0053] Some embodiments further provide a computer program product. This product includes a computer program or command. When the computer executes the above computer program or command, it causes the computer to execute the method for realizing the visualization of program steps in any of the above possible simulation test processes.

[0054] Some embodiments also provide a computer program product including a computer-readable storage medium storing computer-readable program code that causes at least one processor (one or more computer devices) to perform the following operations. Set flag parameters of an active state and an inactive state corresponding to respective execution states for each execution box in a graphic program. When the execution state of an execution box changes, change the display flag of the execution box to an active state flag corresponding to the new execution state. Also, when the execution box does not change for a preset fixed time in the current execution state, change the display flag of the execution box from an active state flag to an inactive state flag.

[0055] In some embodiments, of course, the disclosed apparatus and method can also be implemented in other ways. The embodiments of the apparatus described above are merely illustrative. For example, the flowcharts and block diagrams in the drawings show the architectures, functions, and operations of apparatuses, methods, and computer program products according to multiple embodiments of the present invention. In this regard, each block in a flowchart or block diagram can represent a module, a program segment, or a part of code. The above module, the above program segment, or the above part of code includes executable instructions for implementing one or more predetermined logical functions. Note that in some alternative implementation ways, the functions represented by the blocks may occur in an order different from the order shown in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel and, depending on the related functions, can sometimes be executed in the reverse order. Also, it should be noted that each block of the block diagram and / or flowchart, and combinations of the blocks of the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system for performing a predetermined function or operation, or may be implemented by a combination of dedicated hardware and computer instructions.

[0056] In addition, each functional module in each embodiment of the present invention may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.

[0057] When the above functions are realized in the form of software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence or the part that contributes to the prior art or the part of the technical solution, can be represented in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or some of the steps of the methods described in each embodiment of the present invention.

[0058] Inspired by the preferred embodiments of the present invention described above, those skilled in the art can make various changes and modifications without departing from the technical idea of the present invention from the above description. The technical scope of the present invention is not limited to the content of the specification, and its technical scope must be determined based on the scope of the claims.

Claims

1. A method for implementing program step visualization in a vehicle simulation test process based on C code, comprising: setting active and inactive flag parameters for each execution box in the C-code based graphics program, the active and inactive flag parameters corresponding to the execution state of each execution box; When the execution state of an execution box changes, changing the display flag of the execution box to an active state flag corresponding to the new execution state; and A method for realizing program step visualization in an automobile simulation test process based on C code, characterized in that it includes changing a display flag of an execution box from an active state flag to an inactive state flag if the execution box does not change in its current execution state for a predetermined period of time.

2. The method for implementing program step visualization according to claim 1 , wherein the flag parameters include a color parameter and / or a pattern parameter.

3. When the flag parameter is a color parameter, the program step visualization realization method includes: assigning active and inactive color parameters to each execution box in the graphics program corresponding to the corresponding execution state; When an execution state of an execution box changes, a display color of the execution box is changed to an active state color corresponding to the new execution state; The method for realizing program step visualization as described in claim 2, further comprising: if the execution box remains in its current execution state, gradually changing the display color of the execution box from the color of an active state to the color of an inactive state.

4. When the flag parameter is a pattern parameter and the pattern parameter type is an execution box shape pattern, the method for implementing program step visualization in the simulation test process includes: setting active and inactive pattern parameters for each execution box in the C code based graphics program, the active and inactive pattern parameters corresponding to the execution state; when an execution state of an execution box changes, setting a shape pattern of the execution box as an active shape pattern corresponding to the new execution state; The method for realizing program step visualization as described in claim 2, further comprising: if the execution box remains in its current execution state, gradually changing the shape pattern of the execution box from an active shape pattern state to an inactive shape pattern state.

5. When the flag parameter is a pattern parameter, and the pattern parameter type is an execution box background filling pattern, the method for implementing program step visualization in the simulation test process includes: setting active and inactive pattern parameters for each execution box in the C code based graphics program, the active and inactive pattern parameters corresponding to the execution state; when an execution state of an execution box changes, setting a background filling pattern of the execution box to an active background filling pattern corresponding to the new execution state; 3. The method for implementing program step visualization according to claim 2, further comprising: if the execution box remains in a current execution state, gradually changing the background filling pattern of the execution box from an active shape pattern state to a background filling pattern of an inactive state.

6. Gradually changing the display color of the execution box from an active state color to an inactive state color while the execution box remains in its current execution state may include: Obtaining an execution time Ta of a current execution state; A time width during which the color of the active state is gradually changed to the color of the inactive state is set to T0; Extracting three components R1, G1, and B1 from the RGB of the active state color; Extracting three components R2, G2, and B2 from the RGB of the inactive state color; Calculating the three components R0, G0, and B0 of the display color RGB of the execution box; 4. The method for implementing program step visualization according to claim 3, further comprising: integrating the three components R0, G0, and B0 to set the display color of the execution box corresponding to the current execution state.

7. To calculate the three components R0, G0, and B0 of the display color RGB of the execution box, Calculating an elapsed time T; If T>T0, then R0=R2, G0=G2, B0=B2, otherwise R0=T / T0*(R2-R1)+R1, G0=T / T0*(G2-G1)+G1, 7. The method for implementing program step visualization according to claim 6, further comprising: B0=T / T0*(B2-B1)+B1.

8. The method for realizing program step visualization according to claim 7, characterized in that the execution states include a state in which execution has not started, a state in which execution is in progress, a state in which execution is completed and the execution result is marked as passed, a state in which execution is completed and the execution result is marked as failed, a state in which execution is interrupted, and a state in which execution is marked as failed.

9. The color parameters of the active and inactive states corresponding to the state where the execution is completed and the execution result is marked as failed, and the state where the execution is marked as failed during execution, are the same, and both are abnormal colors; The method for realizing program step visualization as described in claim 8, characterized in that if the execution box is a cell group, when the execution status of any execution box in the cell group is a state in which execution is completed and the execution result is marked as failed, or a state in which execution is marked as failed during execution, the display color of the cell group is an abnormal color.

10. A system for realizing program step visualization in a C code-based automobile simulation test process, comprising: a computing device configured to include a settings module and a flags module; The setting module respectively sets, for each execution box in the C-code based graphics program, active and inactive flag parameters corresponding to corresponding execution states; The system for realizing program step visualization in an automobile simulation test process based on a C code is characterized in that, when the execution state of an execution box changes, the flag module changes the display flag of the execution box to an active state flag corresponding to the new execution state, and when the execution box does not change in its current execution state for a predetermined period of time, the flag module changes the display flag of the execution box from an active state flag to an inactive state flag.

11. a computer-readable storage medium storing computer-readable instructions; A computer-readable storage medium, which, when executed by at least one processor, executes the method for implementing program step visualization according to any one of claims 1 to 9.

12. An electronic device comprising a processor, a computer-readable storage medium, a communication bus, and a communication interface; the processor, the computer-readable storage medium, and the communication interface communicate with each other via the communication bus; The electronic device is characterized in that the computer-readable storage medium is used to store a program for executing the program step visualization realization method described in any one of claims 1 to 9, and the program causes a processor to execute operations corresponding to the program step visualization realization method.

13. An electronic device, a processor, a display in communication with the processor for displaying a graphical interface, and a computer-readable storage medium; The computer-readable storage medium is used to store a program for executing the program step visualization implementation method according to any one of claims 1 to 9, and the program causes a processor to execute operations corresponding to the program step visualization implementation method, 13. An electronic device, comprising: a display configured to display a graphics program via a graphics interface.

Citation Information

Patent Citations

  • Program development support device

    JP1994083601A

  • Graphical view of program structure during debugging session

    US20030061600A1