Method and system for visualizing program steps in the automotive simulation testing process

The method and system for setting active and inactive state flags in C-code-based automotive simulation test programs address the challenges of intuitive state display and efficient error detection, improving visualization and monitoring efficiency.

JP7855250B2Active Publication Date: 2026-05-08SHANGHAI TOSUN TECH LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
SHANGHAI TOSUN TECH LTD
Filing Date
2024-06-30
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Automotive simulation test programs based on C code face challenges in intuitively displaying the driving state, inability to determine destructive operations, inefficient failure judgment, and unclear test logic branches, leading to potential system damage and inefficient troubleshooting.

Method used

Implementing a method and system that sets active and inactive state flags for execution boxes in C-code-based graphics programs, changing flags based on execution state changes and time durations, using color and pattern parameters to visually represent program steps.

Benefits of technology

Enhances visualization of test processes, allowing users to track execution units, identify errors, and improve monitoring efficiency by highlighting current operations and errors, reducing the risk of system damage and streamlining troubleshooting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007855250000002
    Figure 0007855250000002
  • Figure 0007855250000003
    Figure 0007855250000003
  • Figure 0007855250000004
    Figure 0007855250000004
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 of its content is 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, an automobile simulation test program always needs to load and execute the C code of the automobile, which is essentially different from graphic programs in other robot fields. Graphic programs in the robot field mainly consist of compiled frames for construction and execution, 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 transferred to graphic programs in the automobile field.

[0004] Therefore, an automobile simulation test program based on C code has field uniqueness and brings technical problems specific to the simulation test program. That is, when the simulation test program is running, 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 performed 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 testing process, it is not possible to know whether a test judgment failed or which type of judgment failed. The conventional method is inefficient because it involves searching through log records. (3) In test logic with many branches and loops, it is not possible to know which branch the test logic has followed, and therefore it is not possible to evaluate what state the test logic is in. [Overview of the project]

[0005] This invention relates to a method for visualizing program steps in an automotive simulation test process based on C code. This method includes the following: In the graphics program written in C code, each execution box is set with flag parameters for the active and inactive states corresponding to its respective execution state. When the execution state of an execution box changes, the display flag of that execution box is changed to the active state flag corresponding to the new execution state. Also, if the execution box does not change for a predetermined period of time in its current execution state, the display flag of that execution box is changed 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 automotive simulation test process based on C code. This system includes a computer device, which is configured to include a setting module and a flag module. The configuration module sets active and inactive state flag parameters for each execution box in the graphics program based on C code, corresponding to the execution state. The flag module changes the display flag of an execution box to the active state flag corresponding to the new execution state when the execution state of the execution box changes. If the execution box does not change for a predetermined period of time in its 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 will become apparent from the specification or will be understood by practicing the invention. The object and other advantages of the present invention are realized and obtained by the structures specifically pointed out in the specification and drawings. To make the above-mentioned objectives, features, and advantages of the present invention easier to understand, preferred embodiments will be given below and described in detail in conjunction with the accompanying drawings. [Brief explanation of the drawing]

[0008] To more clearly describe specific embodiments of the present invention or technical solutions of the prior art, the drawings that are necessary for describing specific embodiments or prior art are briefly described below. The drawings described below are some embodiments of the present invention, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without any creative effort. [Figure 1] A flowchart shows a method for visualizing program steps during the simulation test process in several embodiments. [Figure 2] This diagram illustrates an example of a method for visualizing program steps during the simulation test process in several embodiments. [Figure 3] This diagram illustrates an example of a method for visualizing program steps during the simulation test process in several embodiments. [Figure 4] This diagram illustrates an example of a method for visualizing program steps during the simulation test process in several embodiments. [Figure 5]This diagram illustrates an example of a method for visualizing program steps during the simulation test process in several embodiments. [Figure 6] This diagram illustrates an example of a method for visualizing program steps during the simulation test process in several embodiments. [Figure 7] This diagram illustrates an example of a method for visualizing program steps during the simulation test process in several embodiments. [Figure 8] This diagram illustrates an example of a method for visualizing program steps during the simulation test process in several embodiments. [Figure 9] This diagram illustrates an example of a method for visualizing program steps during the simulation test process in several embodiments. [Figure 10] This diagram illustrates an example of a method for visualizing program steps during the simulation test process in several embodiments. [Figure 11] This diagram illustrates an example of a method for visualizing program steps during the simulation test process in several embodiments. [Figure 12] This document presents a system for visualizing program steps in the automotive simulation test process based on C code, relating to several embodiments. [Figure 13] The following are block diagrams illustrating the principles of electronic devices according to several embodiments. [Figure 14] The following are block diagrams illustrating the principles of electronic devices according to several embodiments. [Modes for carrying out the invention]

[0009] To further clarify the object, technical aspects and advantages of the embodiments of the present invention, the technical aspects of the present invention will be described below clearly and completely in reference to the accompanying drawings, although it is clear that the embodiments described are only some embodiments of the present invention and not all embodiments. All other embodiments obtained based on the embodiments of the invention, without creative work by a person skilled in the art, are within the scope of the protection of the invention.

[0010] Automotive simulation test programs based on C code have unique characteristics in the field and present technical problems specific to such simulation test programs, namely, the inability to intuitively display the driving state when the simulation test program is in operation, and the problems resulting from the inability to intuitively display the driving state are as follows: (1) The current test process does not know what actions it is performing or whether the performed actions are destructive. Attempting to interrupt the test during a destructive execution could result in the destruction of the object under test or the test system. (2) In the current testing process, it is not possible to know whether a test judgment failed or which type of judgment failed. The conventional method is inefficient because it involves searching through log records. (3) In test logic with many branches and loops, it is not possible to know which branch the test logic has followed, and therefore it is not possible to evaluate what state the test logic is in.

[0011] Therefore, at least one embodiment provides a method for realizing program step visualization in the simulation test process. This method includes the following: Each execution box in the graphics program has flag parameters set for its corresponding active and inactive states. When the execution state of an execution box changes, the display flag of that execution box is changed to the active state flag corresponding to the new execution state. If the execution box does not change for a predetermined period of time in its current execution state, the display flag of that execution box is changed from the active state flag to the inactive state flag. In this simulation test process, the method for visualizing program steps is designed using a graphic program, which allows for an intuitive presentation of the steps currently being executed by the program during operation.

[0012] The following will describe in detail various non-limiting embodiments of the examples of the present disclosure in relation to the accompanying drawings. As shown in FIG. 1, some embodiments provide a method for realizing program step visualization in the C-code-based simulation test process. This method includes the following. In S101, flag parameters of active state and non-active state corresponding to the respective 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 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 time from the state transition time to the current time exceeds the preset time after the execution box has been executed by the test system.

[0014] The purpose of setting active and inactive states is to highlight the program's current operating status, namely which execution unit the program is currently running, whether or not an error occurred in the executed execution unit, and how much time has passed since the most recent success or error occurred. Setting active and inactive states improves the visualization of the operating status, allowing users to track the direction of the test flow when monitoring the test process via screens or signs, and simultaneously position themselves at a specific execution unit within the first hour after a program jump or error report, thereby improving the efficiency of monitoring and fault inspection during the test process.

[0015] Furthermore, if the execution status of an execution box is changed to an active status flag corresponding to a new execution status, and the active status remains active, the user cannot clearly determine whether the current active status occurred previously, immediately before, once, multiple times, or consecutively. In other words, if it remains active, it cannot serve to draw the user's attention to the event. Therefore, when an execution box maintains its current execution status for a certain preset time, the display flag of the execution box is changed from an active status flag to an inactive status flag. When the execution status changes in this way, all execution units are switched from an inactive state to an active state, and this active state displays a highlighted color, effectively attracting the user's attention. After the execution status is maintained for a long time, the highlighted color disappears, preventing the continuous occupation of the user's attention and thereby improving the efficiency of monitoring the test flow.

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

[0017] In some embodiments, when the flag parameter is a color parameter, the method for realizing the visualization of the program steps in the above simulation test process includes the following: Each execution box in a graphics program based on C code has its active and inactive state color parameters set to correspond to its current execution state. When the execution state of an execution box changes, the display color of that execution box is changed to the active state color corresponding to the new execution state. If the execution box remains in its current execution state, the display color of that execution box is gradually changed from the active state color to the inactive state color.

[0018] In some embodiments, the pattern parameter types include, but are not limited to, execution box shape patterns and execution box background filling patterns. Execution box shape patterns include, for example, squares, circles, and stars. Execution box background filling patterns do not include single-color background filling patterns, but specifically include, for example, linear tilings, circular tilings, and triangular tilings.

[0019] In some embodiments, when the flag parameter is a pattern parameter, such as an execution box shape pattern, the method for realizing the visualization of program steps in the above simulation test process includes the following: Each execution box in a graphics program based on C code has pattern parameters set for the active and inactive states corresponding to its current execution state. When execution has not started, the active state of the execution box is assumed to be a rectangle. When execution is in progress, the active state of the execution box is assumed to be a square, and the inactive state is assumed to be a circle. When the execution state of an execution box changes, from not started to running, 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. If the execution box remains in its current execution state, the shape pattern of that execution box is gradually changed to the active shape pattern state, i.e., from a square to an inactive shape pattern such as a circle.

[0020] In some embodiments, if the flag parameter is a pattern parameter, for example, an execution box background filling pattern, the method for realizing the program step visualization in the above simulation test process includes the following: Each execution box in a graphics program based on C code has active and inactive state pattern parameters set, corresponding to its current execution state. When execution has not started, the active state of the execution box is assumed to be linear tiling. When execution is in progress, the active state of the execution box is assumed to be circular tiling, and the inactive state is assumed to be triangular tiling. When the execution state of an execution box changes, from not started to running, the background tiling pattern of this execution box is changed from linear tiling to circular tiling, which is the active background tiling pattern corresponding to the new execution state. If the execution box remains in its current execution state, the background tiling pattern of that execution box is gradually changed to an active shape pattern state, i.e., from circular tiling to an inactive state background tiling pattern such as triangular tiling.

[0021] In some embodiments, color parameters and pattern parameters may be combined and expressed as needed. For example, in the case of triangulation, the color changes, or similarly, the color changes when the execution box shape pattern changes.

[0022] In some embodiments, the execution state includes the state of execution not started, the state of execution in progress, the state of execution completed and the execution result marked as pass, the state of execution completed and the execution result marked as failure, the state of execution interrupted, and the state of execution being marked as failure. The following table illustrates the color parameters for the active and inactive states corresponding to the execution state of each execution box. [Table 1]

[0023] The following provides several examples illustrating how the display color of an execution box changes to match the active state color corresponding to the new execution state when the execution state of the execution box changes. As shown in Figure 2, the execution boxes Entry and OK are green because execution has completed and the result is marked as successful. The execution box NOK is red because execution has completed and the result is marked as failed. The execution box "Connected?" is yellow because execution is in progress. The execution boxes Connected and Disconnected are blue because execution has not yet started. As shown in Figure 3, the execution boxes Entry and OK are green because execution has completed and the execution result is marked as successful. The execution box NOK is red because execution is in progress and has been marked as failed. The execution boxes Connected?, Connected, and Disconnected are blue because execution has not yet started. As shown in Figure 4, the execution boxes Entry and OK are in a state where execution has completed and the execution result has been marked as successful, and their current display color is green. The execution box NOK is in a state where execution has been interrupted, and its current display color is purple. The execution boxes "Connected?", Connected, and Disconnected are in a state where execution has not started, and their current display color is blue.

[0024] The following provides several examples illustrating how the display color of an execution box gradually changes from the active state color to the inactive state color while the execution box remains in its current execution state. As shown in Figure 5, the current display color of the Entry and OK execution boxes gradually changes from green to lake green when execution is complete and the execution result is marked as pass. The current display color of the NOK execution box gradually changes from red to light pink when execution is complete and the execution result is marked as fail. The current display color of the Connected? execution box gradually changes from yellow to light yellow when it is running. The Connected and Disconnected execution boxes remain blue when they are not yet running. As shown in Figure 6, the current display color of the Entry and OK execution boxes gradually changes from green to lake green when execution is completed and the execution result is marked as pass. The current display color of the NOK execution box gradually changes from red to light pink when execution is marked as failing. The Connected?, Connected, and Disconnected execution boxes remain blue when execution has not started. As shown in Figure 7, the current display color of the Entry and OK execution boxes gradually changes from green to lake green when execution is completed and the execution result is marked as successful. The current display color of the NOK execution box gradually changes from purple to light purple when execution is interrupted. The Connected?, Connected, and Disconnected execution boxes remain blue when execution has not started.

[0025] In some embodiments, if the execution box remains in its 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: Get the execution time Ta of the current execution state. Let T0 be the time interval over which the color gradually changes from the active state color to the inactive state color. Extract the three components R1, G1, and B1 from the RGB values ​​of the active state color. Extract the three components R2, G2, and B2 from the RGB values ​​of the inactive color. This program calculates the three components of the RGB color of the display box: R0, G0, and B0. The three components R0, G0, and B0 are combined to determine the display color of the execution box corresponding to the current execution state.

[0026] The following example will explain in detail how the display color of an execution box gradually changes from the active state color to the inactive state color while the execution box remains in its current execution state. The test system executes an execution unit that has the function of waiting for signal 1 to change from 0 to 1, and assumes that the waiting timeout period is 10 seconds. If the execution unit activates at 3 seconds and signal 1 is always 0, then this execution box will remain in a waiting state, i.e., in an executing state, for the next 10 seconds. In that case, the display color of the execution box will gradually change from the active state color to the inactive state color, and the process of this change is as follows. The execution time at which the execution box starts running is Ta=3 seconds. At 3 seconds, the execution box is in an active state, its current display color is yellow FFC000, and its corresponding inactive state color is light yellow FFE89D. Set the time interval for the gradual change from the active color to the inactive color to T0 = 5 seconds.

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

[0028] The three components R2, G2, and B2 are extracted from the hexadecimal color value FFE89D in the inactive state. That is, the three components of RGB are R2=0xFF(255), G2=0xE8(232), and B2=0x9D(157).

[0029] The three components of the RGB display color of the execution box are calculated based on the active state color, the inactive state color, and the current elapsed time T. For example, if the current execution time Tb of the execution box is obtained up to 5.5 seconds, and the execution continues for 2.5 seconds relative to Ta, i.e., elapsed time T = 2.5 seconds, then the three components R0, G0, and B0 of the execution box display color are calculated. That is, R0 = 0xFF (255), G0 = 0xD4 (212), and B0 = 0x4E (78).

[0030] The three components R0, G0, and B0 are combined to obtain the hexadecimal value FFD44E, which gradually changes the display color of the execution box corresponding to the current execution state, i.e., the color FFC000 corresponding to the active state, to the color FFE89D corresponding to the inactive state over time. If the execution continues for, for example, 2.5 seconds, i.e., T=2.5 seconds, the display color of the execution box will change from FFC000 to FFD44E.

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

[0032] As an example, we will explain how to calculate the three components R0, G0, and B0 of the RGB color displayed in the execution box. The test system executes an execution unit that has the function of waiting for signal 1 to change from 0 to 1, and assumes that the waiting timeout period is 10 seconds. If this execution unit activates at 3 seconds and signal 1 is always 0, then this execution box will remain in a waiting state for the next 10 seconds, i.e., it will remain in an running state for the next 10 seconds. In that case, the display color of the execution box will gradually change from the active state color to the inactive state color, and the process of this change is as follows. The execution time at which the execution box starts running is Ta=3 seconds. At 3 seconds, the execution box is in an active state, its current display color is yellow FFC000, and its corresponding inactive state color is light yellow FFE89D. Let T0 = 5 seconds be the time interval during which the color gradually changes from the active state color to the inactive state color.

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

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

[0035] The three components of the RGB display color 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 = current time - execution time at which the execution box starts running. That is, T = Tb - Ta, if T > T0, then R0 = R2, G0 = G2, B0 = B2, and the color of the execution box is locked to the 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 In other words, R0 = 255 G0 = T*8 + 192 B0 = T / 5 * 157 For example, if 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 will be the hexadecimal value FFD03E.

[0036] In some embodiments, the color parameters for the active and inactive states corresponding to the state where execution is completed and the execution result is marked as a failure, and the state where execution is marked as a failure, are the same, and both are abnormal colors. If the execution box is part of a cell group, and the execution status of any execution box within that cell group is either completed but marked as failed, or marked as failed during execution, then the display color of this cell group will be set to an abnormal color.

[0037] The active and inactive states corresponding to the state where execution is complete and the result is marked as a failure, and the state where execution is marked as a failure, are the same, and both are abnormal colors. If the execution box is a cell group, the method by which the display color of the cell group is an abnormal color when the execution status of any execution box within the cell group is either complete and the result is marked as a failure, or marked as a failure during execution, will be explained in detail as an example. The test system executes the execution unit. Its function is to call an API function, which has a 10-second delay. During this delay, it determines in real time whether signal 1 is 1 or not. If signal 1 is not 1, it calls another API function, "test.set_verdict_nok," and determines that the result is a failure. If signal 1 is always 0, when the execution unit calls this API function, it is first marked as running, i.e., its display color is hexadecimal FFC000. Subsequently, when the execution is completed and the execution result is marked as a failure, the color of the execution box of the execution unit immediately changes to hexadecimal FF0000, which is an abnormal color. For the next 0 to 5 seconds, the color of the execution box of the execution unit gradually transitions from the abnormal color in the active state (hexadecimal FF0000) to the abnormal color in the inactive state (hexadecimal FFB7B9), and remains unchanged for the next 5 to 10 seconds.

[0038] As shown in Figure 8, the execution box NOK is the execution unit in which the system is currently running. The figure shows the state immediately after this execution box entered the execution state, where execution has completed and the execution result has been marked as a failure.

[0039] As shown in Figure 9, the execution block NOK is the execution unit currently running in the system. The figure shows that this execution box has remained in the execution state for 7 seconds, completing execution and marking the execution result as a failure.

[0040] As shown in Figures 10 and 11, if the execution box NOK is in a group of execution units, the execution box will be marked as failed during execution, and its display color will be an abnormal color. The group of execution units containing this execution box will also be marked as failed, and the display color of the unit group containing this execution box will be an abnormal color.

[0041] As shown in Figure 12, some embodiments further provide a signal tracking and observation system in automotive bus tool software. This system includes a computer device, which is configured to include a configuration module and a flag module. The configuration module sets active and inactive state flag parameters for each execution box in the graphics program based on C code, corresponding to the execution state. The flag module changes the display flag of an execution box to the active state flag corresponding to the new execution state when the execution state of the execution box changes. If the execution box does not change for a predetermined period of time in its current execution state, the display flag of the execution box is changed from the active state flag to the inactive state flag. The specific implementation functions of the configuration module and flag module are realized in the computer device, and specifically, the content of the method for visualizing program steps in the simulation test process described above can be considered, so a detailed explanation is omitted here.

[0042] The following describes an electronic device according to one embodiment of this disclosure from the perspective of hardware processing. The embodiments described herein do not limit the specific realization of electronic devices. As shown in Figure 13, some embodiments further provide electronic equipment. This electronic equipment includes 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 computer-readable storage medium is used to store a program that executes the program step visualization implementation method in the simulation test process, and the program causes the processor to execute operations corresponding to the program step visualization implementation method in the simulation test process.

[0043] As shown in Figure 14, some embodiments further provide electronic devices. These electronic devices include a processor, a display that communicates with the processor to display a graphics interface, and a computer-readable storage medium. The above computer-readable storage medium stores command programs. The above processor is configured to execute a command program so that the following operations are performed: Each execution box in the graphics program has active and inactive state flag parameters corresponding to its respective execution state. When the execution state of an execution box changes, the display flag of that execution box is changed to the active state flag corresponding to the new execution state. If an execution box does not change for a predetermined period of time in its current execution state, the display flag of that execution box is changed from the active state flag to the inactive state flag. The above display is configured to display the graphics program via a graphics interface.

[0044] In some embodiments, computer devices and industrial personal computers can also be considered types of electronic equipment. Note that the configurations shown in Figures 13 and 14 are not limited to electronic devices, and may include fewer or more components than those shown, a combination of some components, or a different configuration altogether.

[0045] In some embodiments, the communication interface may be a communication interface that can be connected to an external bus adapter, such as RS232, RS485, USB port, and 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., Wi-Fi interface, Bluetooth interface, etc.) that are 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, hard disks, multimedia cards, card-type memory (e.g., SD memory), magnetic memory, magnetic disks, optical disks, etc. In some embodiments, it may be an internal storage unit of a computer device, such as a hard disk of a computer device. In other embodiments, the memory may be an external storage device of a computer device, such as a plug-in hard disk equipped in a computer device, a Smart Media Card (SMC) (registered trademark), a Secure Digital (SD) card, or a flash card. Furthermore, the memory may include both an internal storage unit and an external storage device of a computer device. The memory is used to store various types of data, such as application software and computer program code installed in the computer device, as well as to temporarily store output data or data to be output.

[0047] In some embodiments, the processor may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip that executes program code stored in memory or processes data, for example, to run a computer program.

[0048] In some embodiments, the communication bus may be an input / output bus, such as 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, etc.

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

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

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

[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, performs the method for visualizing program steps in the simulation test process described above, specifically as follows: Each execution box in the graphic program is given an active state and an inactive state flag parameter corresponding to its respective execution state. When the execution state of an execution box changes, the display flag of that execution box is changed to the active state flag corresponding to the new execution state. Also, if an execution box does not change in its current execution state for a predetermined period of time, the display flag of that execution box is changed from the active state flag to the inactive state flag. A detailed explanation of the method for visualizing program steps in the simulation test process is provided below and is omitted here.

[0053] Some embodiments further provide computer program products. These products include computer programs or commands. When the computer executes the above computer program or commands, the computer is made to execute one of the above possible simulation test process visualization implementation methods.

[0054] Some embodiments also provide a computer program product that includes a computer-readable storage medium storing computer-readable program code that includes commands to cause at least one processor (one or more computer devices) to perform the following operations: Each execution box in the graphics program has active and inactive state flag parameters corresponding to its respective execution state. When the execution state of an execution box changes, the display flag of that execution box is changed to the active state flag corresponding to the new execution state. Also, if an execution box does not change for a predetermined period of time in its current execution state, the display flag of that execution box is changed from the active state flag to the inactive state flag.

[0055] In some embodiments, the disclosed apparatus and methods can, of course, 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 illustrate the implementable architectures, functions, and operations of apparatus, methods, and computer program products according to some embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or part of code. The module, program segment, or part of code contains executable instructions for implementing one or more predetermined logical functions. In some alternative implementations, the functions represented in the blocks may occur in an order different from that shown in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes in reverse order, depending on the related functions. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in a block diagram and / or flowchart, may be implemented in a dedicated hardware-based system that performs a predetermined function or operation, or in a combination of dedicated hardware and computer instructions.

[0056] Furthermore, in each embodiment of the present invention, each functional module may be integrated to form a single independent part, each module may exist individually, or two or more modules may be integrated to form a single independent part.

[0057] The above functions can be implemented in the form of software function modules and, when sold or used as independent products, can be stored on a single computer-readable storage medium. Based on this understanding, the technical solutions of the present invention, in their essence or contribution to the prior art, or parts thereof, can be represented in the form of a software product. The computer software product is stored on a single storage medium and contains a plurality of instructions that cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.

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

Claims

1. A method for visualizing program steps in the automotive simulation test process based on C code, Multiple execution states that each execution box in a graphics program based on C code can take are defined in advance, and an active state flag parameter and an inactive state flag parameter corresponding to each of the multiple execution states are set. When the execution state of each execution box changes from an arbitrary first execution state to a second execution state different from the first execution state, the display flag of that execution box is changed to the flag parameter of the active state corresponding to the second execution state, and If it is determined that the execution state of the execution box maintains the second execution state and the elapsed time in the second execution state has reached a predetermined fixed time, the display flag of the execution box is changed to the inactive state flag parameter corresponding to the second execution state, The flag parameters for the active state and the flag parameters for the inactive state define the display state independently of the execution state. A method for realizing program step visualization in an automotive simulation test process based on C code, characterized in that the display flag is set independently of the execution state based on the flag parameter of the active state or the flag parameter of the inactive state.

2. The program step visualization implementation method according to claim 1, characterized in that the flag parameter includes a color parameter and / or a pattern parameter.

3. When the flag parameter is a color parameter, the program step visualization implementation method is: When the execution state of each execution box changes from the first execution state to the second execution state, the display color of the execution box is changed to the active state color parameter corresponding to the second execution state, and the time at which the active state color parameter was changed is obtained as the reference time. Based on the elapsed time from the reference time, an intermediate color is calculated between the active state color parameter corresponding to the second execution state and the inactive state color parameter corresponding to the second execution state, and the display color of the execution box is gradually changed based on this intermediate color until the elapsed time reaches the predetermined time. The method for realizing program step visualization according to claim 2, characterized in that, when it is determined that the execution state of the execution box maintains the second execution state and the elapsed time from the reference time has reached the certain period of time, the display color of the execution box is set to the color parameter of the inactive state corresponding to the second execution state.

4. When the flag parameter is a pattern parameter and the pattern parameter type is the shape pattern of the execution box, the method for realizing program step visualization in the simulation test process is: When the execution state of each execution box changes from the first execution state to the second execution state, the shape pattern of the execution box is changed to the shape pattern parameter of the active state corresponding to the second execution state, and the time at which the shape pattern parameter of the active state was changed is obtained as the reference time. Based on the elapsed time from the reference time, an intermediate pattern is calculated between the shape pattern parameters of the active state corresponding to the second execution state and the shape pattern parameters of the inactive state corresponding to the second execution state, and the shape pattern of the execution box is gradually changed based on this intermediate pattern until the elapsed time reaches the predetermined time. The method for realizing program step visualization according to claim 2, characterized in that, when it is determined that the execution state of the execution box maintains the second execution state and the elapsed time from the reference time has reached the certain period of time, the shape pattern of the execution box is set to the shape pattern parameter of the inactive state corresponding to the second execution state.

5. When the flag parameter is a pattern parameter and the pattern parameter type is a background filling pattern for the execution box, the method for realizing program step visualization in the simulation test process is: When the execution state of each execution box changes from the first execution state to the second execution state, the background filling pattern of that execution box is changed to the active state background filling pattern parameter corresponding to the second execution state, and the time at which the active state background filling pattern parameter was changed is obtained as the reference time. Based on the elapsed time from the reference time, an intermediate pattern is calculated between the background filling pattern parameter of the active state corresponding to the second execution state and the background filling pattern parameter of the inactive state corresponding to the second execution state, and the background filling pattern of the execution box is gradually changed based on this intermediate pattern until the elapsed time reaches the predetermined time. The method for realizing program step visualization according to claim 2, characterized in that, when it is determined that the execution state of the execution box maintains the second execution state and the elapsed time from the reference time has reached the certain period of time, the background filling pattern of the execution box is set to the background filling pattern parameter of the inactive state corresponding to the second execution state.

6. The display color of the execution box is to be gradually changed based on the intermediate color until the elapsed time reaches the predetermined time, Obtain the execution time Ta of the second execution state, Let T0 be the time interval over which the color gradually changes from the active state color to the inactive state color, Extracting the three components R1, G1, and B1 from the RGB of the active color, Extracting the three components R2, G2, and B2 from the RGB of an inactive color, The three components R0, G0, and B0 of the RGB display color of the execution box are calculated according to the elapsed time, The method for realizing program step visualization according to claim 3, characterized in that it includes integrating the three components R0, G0, and B0 to determine the display color of the execution box corresponding to the second execution state.

7. The calculation of the three components R0, G0, and B0 of the RGB display color of the execution box according to the elapsed time is: 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, The method for realizing program step visualization according to claim 6, characterized in that B0 = T / T0 * (B2 - B1) + B1.

8. The program step visualization method according to claim 7, characterized in that the plurality of 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 a pass, a state where execution is completed and the execution result is marked as a failure, a state where execution is interrupted, and a state where execution is marked as a failure.

9. The color parameters for the active state and inactive state corresponding to the state where the execution is completed and the execution result is marked as failure, and the state where the execution is marked as failure, are the same and are both abnormal colors. The method for visualizing program steps according to claim 8, characterized in that if the execution box is a cell group, and the execution status of any execution box within the cell group is such that the execution has been completed and the execution result is marked as a failure, or the execution is marked as a failure, the display color of the cell group is set to an abnormal color.

10. A system for visualizing program steps in the automotive simulation test process based on C code, The computer device includes a computer device, and the computer device is configured to include a setting module and a flag module. The aforementioned configuration module, when multiple execution states that each execution box in a graphics program based on C code can take are defined in advance, sets an active state flag parameter and an inactive state flag parameter corresponding to each of the multiple execution states, and the active state flag parameter and the inactive state flag parameter define the display state independently of the execution state. A system for visualizing program steps in an automotive simulation test process based on C code, characterized in that the flag module changes the display flag of an execution box to the active state flag parameter corresponding to the second execution state when the execution state of each execution box changes from an arbitrary first execution state to a second execution state different from the first execution state, and changes the display flag of an execution box to the inactive state flag parameter corresponding to the second execution state when it is determined that the execution state of the execution box has maintained the second execution state and the elapsed time in the second execution state has reached a predetermined fixed time, and the display flag is set independently of the execution state based on the active state flag parameter or the inactive state flag parameter.

11. A computer-readable storage medium for storing programs, A computer-readable storage medium characterized in that, when the program is executed by at least one processor, the program step visualization implementation method according to any one of claims 1 to 9 is performed.

12. An electronic device including 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 computer-readable storage medium stores a program, and when the processor executes the program, the program step visualization method described in any one of claims 1 to 9 is executed, characterized in that the electronic device is configured such that the computer-readable storage medium stores a program, and when the processor executes the program, the program step visualization method described in any one of claims 1 to 9 is executed.

13. It is an electronic device, Includes a processor, a display that communicates with the processor to show a graphics interface, and a computer-readable storage medium. The computer-readable storage medium stores a program, and when the processor executes the program, the program step visualization method described in any one of claims 1 to 9 is executed. The electronic device is characterized in that the display is 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