Simulation debugging method and system for vehicle signals, electronic equipment and storage medium
Through the virtual hardware abstraction layer and virtual services, independent debugging of vehicle signals is achieved, which solves the problem of dependence on handware on the vehicle and machine side, improves debugging efficiency and controllability, and reduces R&D risks.
Patent Information
- Application Number
- CN202410860705.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-01
AI Technical Summary
The vehicle terminal is highly dependent on counterpart components such as MCU and instruments during the vehicle signal debugging process, which results in prolonged debugging time and difficulty in predicting the development progress, increasing complexity and uncertainty.
The signal value of the vehicle signal is obtained through the virtual hardware abstraction layer, and the virtual service is used for simulation processing to independently debug the vehicle signal, reducing dependence on the handware development progress and achieving independent debugging on the vehicle and computer side.
It shortens debugging time, improves the controllability and predictability of R&D progress, allows debugging before the handware is completed, discovers and fixes potential problems in advance, reduces development risks and complexity, and improves debugging efficiency and flexibility.
Smart Images

Figure CN118733463A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automobile technology, and in particular to a vehicle signal simulation debugging method, a vehicle signal simulation debugging system, an electronic device and a computer-readable storage medium. Background Art
[0002] In the process of debugging vehicle signals on the vehicle side, the current processes and dependencies lead to a variety of inconveniences and risks. Vehicle signal debugging on the vehicle side needs to rely on the cooperation of the microcontroller unit (MCU) and other counterparts such as instruments. For example, counterparts such as MCU and instruments are required to complete the corresponding logic development. These counterparts are responsible for processing and feedback of vehicle signals, such as vehicle speed, door status, etc. The vehicle side can only perform signal debugging after counterparts such as MCU and instruments have completed logic development and provided a joint debugging version. This means that the debugging progress of the vehicle side directly depends on the development progress of the counterpart.
[0003] Since the vehicle computer needs to wait for the joint debugging version of the counterparty, the entire debugging time is greatly extended. If the development progress of the counterparty is slow, or the counterparty fails to provide the joint debugging version, the debugging work of the vehicle computer will be forced to be postponed. This situation makes the development progress of the vehicle computer difficult to predict and control, increasing complexity and uncertainty. Summary of the invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a vehicle signal simulation debugging method, a vehicle signal simulation debugging system, an electronic device and a computer-readable storage medium that overcome the above problems or at least partially solve the above problems.
[0005] In order to solve the above problems, an embodiment of the present invention discloses a simulation debugging method for a vehicle signal, the method comprising: obtaining a signal value of a vehicle signal to be debugged through a virtual hardware abstraction layer; sending the signal value to a virtual service according to the virtual hardware abstraction layer; using the virtual service to simulate the signal value to obtain a callback signal value; using an application to receive the callback signal value, and performing simulation debugging according to the callback signal value, the expected signal value of the vehicle signal, and the actual signal value.
[0006] Optionally, before obtaining the signal value of the vehicle signal to be debugged through the virtual hardware abstraction layer, the method also includes: obtaining the attribute value of the debugging mode through the virtual hardware abstraction layer; based on the virtual hardware abstraction layer, judging whether the debugging mode is in the on state according to the attribute value; if the debugging mode is in the on state, establishing a communication link between the virtual hardware abstraction layer and the virtual service.
[0007] Optionally, after establishing a communication link between the virtual hardware abstraction layer and the virtual service, the method further includes: using the application to send vehicle simulation data based on the Internet control protocol to the virtual service; using the virtual service to extract simulated environment data from the vehicle simulation data; and using the virtual service to synchronously transmit the simulated environment data to the virtual hardware abstraction layer.
[0008] Optionally, after using the application to send the vehicle simulation data based on the Internet control protocol to the virtual service, the method also includes: using the application to call a system interface to register a monitoring function for the vehicle signal and set the expected signal value.
[0009] Optionally, after using the application to call the system interface to register the monitoring function of the vehicle signal and setting the expected signal value, the method also includes: synchronously obtaining a list of available signals from the virtual hardware abstraction layer according to the framework; and detecting whether the vehicle signal is a valid signal in the available signal list through the framework.
[0010] Optionally, after detecting whether the vehicle information is a valid signal in the available signal list through the framework, the method further includes: if the vehicle signal is a valid signal, encapsulating the expected signal value into a data packet according to the virtual hardware abstraction layer, and sending the data packet to the virtual service.
[0011] Optionally, if the vehicle signal is a valid signal, then after encapsulating the expected signal value into a data packet according to the virtual hardware abstraction layer and sending the data packet to the virtual service, the method further includes: using the virtual service to parse the data packet to obtain the expected signal value, and using the expected signal value to update the cached signal value; using the virtual service to simulate the expected signal value, and synchronously transmitting the simulated signal value to the virtual hardware abstraction layer.
[0012] Optionally, after using the virtual service to simulate the expected signal value and synchronously transmitting the simulated signal value to the virtual hardware abstraction layer, the method also includes: transmitting the change notification of the vehicle signal to the framework according to the virtual hardware abstraction layer; and forwarding the simulated signal value to the application according to the framework.
[0013] Optionally, the simulation debugging based on the callback signal value, the expected signal value and the actual signal value of the vehicle signal includes: using the application to compare the callback signal value, the expected signal value and the actual signal value; if the callback signal value, the expected signal value and the actual signal value are all consistent, confirming that the debugging is passed.
[0014] An embodiment of the present invention also discloses a simulation debugging system for vehicle signals, the system comprising: a signal value acquisition module, used to acquire the signal value of a vehicle signal to be debugged through a virtual hardware abstraction layer; a signal value sending module, used to send the signal value to a virtual service according to the virtual hardware abstraction layer; a simulation processing module, used to use the virtual service to perform simulation processing on the signal value to obtain a callback signal value; a simulation debugging module, used to receive the callback signal value using an application, and perform simulation debugging according to the callback signal value, the expected signal value of the vehicle signal, and the actual signal value.
[0015] Optionally, the system also includes: a debugging mode attribute value acquisition module, which is used to obtain the attribute value of the debugging mode through the virtual hardware abstraction layer before the signal value acquisition module obtains the signal value of the vehicle signal to be debugged through the virtual hardware abstraction layer; a debugging mode judgment module, which is used to judge whether the debugging mode is in the on state based on the attribute value based on the virtual hardware abstraction layer; and a communication link establishment module, which is used to establish a communication link between the virtual hardware abstraction layer and the virtual service if the debugging mode is in the on state.
[0016] Optionally, the system also includes: a simulation data sending module, which is used to use the application to send vehicle simulation data based on the Internet control protocol to the virtual service after the communication link establishment module establishes a communication link between the virtual hardware abstraction layer and the virtual service; an environment data extraction module, which is used to use the virtual service to extract simulated environment data from the vehicle simulation data; and an environment data synchronous transmission module, which is used to use the virtual service to synchronously transmit the simulated environment data to the virtual hardware abstraction layer.
[0017] Optionally, the system also includes: a monitoring function registration module, which is used to use the application to call the system interface to register the monitoring function of the vehicle signal and set the expected signal value after the simulation data sending module uses the application to send the vehicle simulation data based on the Internet control protocol to the virtual service.
[0018] Optionally, the system also includes: a signal list acquisition module, which is used to synchronously acquire a list of available signals from the virtual hardware abstraction layer according to the framework after the monitoring function registration module uses the application to call the system interface to register the monitoring function of the vehicle signal and sets the expected signal value; and a valid signal judgment module, which is used to detect whether the vehicle signal is a valid signal in the available signal list through the framework.
[0019] Optionally, the system also includes: a signal value encapsulation module, which is used to encapsulate the expected signal value into a data packet according to the virtual hardware abstraction layer after the valid signal judgment module detects whether the vehicle information is a valid signal in the available signal list through the framework, if the vehicle signal is a valid signal, and send the data packet to the virtual service.
[0020] Optionally, the system also includes: a data packet parsing module, which is used to encapsulate the expected signal value into a data packet according to the virtual hardware abstraction layer if the vehicle signal is a valid signal in the signal value encapsulation module, and after sending the data packet to the virtual service, use the virtual service to parse the data packet to obtain the expected signal value, and use the expected signal value to update the cached signal value; a simulation processing module, which is used to use the virtual service to simulate the expected signal value, and synchronously transmit the simulated signal value to the virtual hardware abstraction layer.
[0021] Optionally, the system also includes: a signal notification module, which is used to transmit the change notification of the vehicle signal to the framework according to the virtual hardware abstraction layer after the simulation processing module uses the virtual service to simulate the expected signal value and synchronously transmits the simulated signal value to the virtual hardware abstraction layer; a signal value forwarding module, which is used to forward the simulated signal value to the application according to the framework.
[0022] Optionally, the simulation debugging module includes: a signal value comparison module, used to use the application to compare the callback signal value, the expected signal value and the actual signal value; a debugging confirmation module, used to confirm that the debugging is passed if the callback signal value, the expected signal value and the actual signal value are consistent.
[0023] An embodiment of the present invention also discloses an electronic device, comprising: one or more processors; and one or more machine-readable media storing instructions thereon, which, when executed by the one or more processors, enables the electronic device to perform a simulation debugging method for a vehicle signal as described above.
[0024] The embodiment of the present invention further discloses a computer-readable storage medium, wherein the computer program stored in the storage medium enables a processor to execute the above-mentioned simulation debugging method of a vehicle signal.
[0025] The embodiments of the present invention include the following advantages:
[0026] The simulation debugging solution for vehicle signals provided by the embodiment of the present invention obtains the signal value of the vehicle signal to be debugged through the virtual hardware abstraction layer, and then sends the signal value to the virtual service according to the virtual hardware abstraction layer. Next, the signal value is simulated and processed by the virtual service to obtain the callback signal value, and finally, the callback signal value is received by the application program, and simulation debugging is performed according to the callback signal value, the expected signal value of the vehicle signal, and the actual signal value.
[0027] In the embodiment of the present invention, through the virtual hardware abstraction layer and virtual services, the vehicle machine end can independently debug the vehicle signal without relying on the counterparty such as MCU and instrument. This reduces the dependence on the development progress of the counterparty, thereby speeding up the debugging and development process. Allow the vehicle machine end to debug before the counterparty is completed. Through virtualization, the vehicle signal can be simulated and debugged at any time, and there is no need to wait for the counterparty to provide a joint debugging version, thereby greatly shortening the debugging time. Since it is no longer dependent on the joint debugging version of the counterparty, the debugging progress of the vehicle machine end becomes more controllable and predictable. This helps project management, ensures that the R&D plan is carried out on time, and reduces the risk of project delays. The vehicle machine end can simulate and debug the vehicle signal through virtual services in the early stage of development, so as to discover and fix potential problems. This can avoid discovering problems in the later joint debugging stage, reducing the workload of repair and debugging. Discovering and fixing problems in advance reduces the complexity and risk of development. The vehicle machine end can troubleshoot and solve problems earlier to ensure the quality and reliability of the product. Using virtual services for signal simulation processing makes the debugging process more efficient. The vehicle side can quickly simulate and test multiple signals, improving the overall debugging efficiency. The virtual hardware abstraction layer and virtual services provide higher flexibility, and can simulate and process signal values according to different debugging requirements. At the same time, the solution has good scalability and can adapt to the types and complexity of vehicle signals that may increase in the future.
[0028] In summary, the embodiments of the present invention realize independent debugging of vehicle signals through a virtual hardware abstraction layer and virtual services, solving the pain point in the background technology that vehicle-side debugging is highly dependent on the counterpart. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flow chart of steps of a simulation debugging method of a vehicle signal according to an embodiment of the present invention;
[0030] Figure 2It is a schematic diagram of a vehicle-side system architecture of a solution for simulating debugging of vehicle signals on a vehicle-side according to an embodiment of the present invention;
[0031] Figure 3 This is a flowchart of simulation debugging steps of a vehicle terminal after the debug mode is turned on in an embodiment of the present invention;
[0032] Figure 4 The present invention is a structural block diagram of a vehicle signal simulation debugging system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0033] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0034] The embodiment of the present invention provides a simulation debugging solution for vehicle signals, which obtains the signal value of the vehicle signal to be debugged through the virtual hardware abstraction layer, and then sends the signal value to the virtual service for simulation processing. The virtual service generates a callback signal value after processing the signal value, and the callback signal value is finally received by the application, and debugged according to the callback signal value, the expected signal value of the vehicle signal and the actual signal value. The embodiment of the present invention enables the vehicle terminal to independently debug the signal, reduces the dependence on the MCU and instruments and other counterparts, shortens the debugging time, improves the controllability and predictability of the R&D progress, and can also discover and solve problems in the early stages of development, reduces development risks, and significantly improves debugging efficiency and flexibility.
[0035] Reference Figure 1 , shows a flow chart of the steps of a simulation debugging method of a vehicle signal according to an embodiment of the present invention. The simulation debugging method of the vehicle signal may specifically include the following steps:
[0036] Step 101: Acquire the signal value of the vehicle signal to be debugged through the virtual hardware abstraction layer.
[0037] In an embodiment of the present invention, the signal value of the vehicle signal to be debugged is obtained through the Virtual Hardware Abstraction Layer (VHAL). VHAL acts as an intermediary between the vehicle terminal and the actual hardware, providing a standardized interface to access various vehicle signals. Through this abstract layer, developers can simulate vehicle signals without the need for actual hardware devices for preliminary testing and debugging. Specifically, the role of the virtual hardware abstraction layer is to shield the underlying hardware differences and provide a consistent interface for upper-level applications. In this way, regardless of the specific hardware configuration of the vehicle, developers can obtain the signal value of the vehicle signal through VHAL. Vehicle signals include vehicle speed, engine status, door switch status, etc. These signals are provided by various sensors and controllers in a real environment, such as MCU and dashboard. Through VHAL, developers can simulate these signals, which is convenient for development and debugging without actual hardware devices.
[0038] In actual operation, VHAL obtains the signal value of vehicle signals by reading system properties or calling system services. For example, the vehicle speed signal can be obtained by reading the value of an analog sensor, and the door switch status signal can be obtained by monitoring the status of the virtual switch. The virtual hardware abstraction layer will periodically update these signal values and provide interfaces for upper-level applications to call.
[0039] Step 102: Send the signal value to the virtual service according to the virtual hardware abstraction layer.
[0040] In an embodiment of the present invention, after obtaining the vehicle signal values to be debugged, these signal values are sent to a virtual service (MockServer). A virtual service is a service that simulates a real hardware device, which is used to receive and process signal values from the vehicle end and simulate the response of the hardware device. The purpose of this step is to simulate various states of the vehicle in a virtual environment to perform functional verification and troubleshooting. Specifically, the signal values obtained by the virtual hardware abstraction layer need to be passed to the virtual service for further processing and simulation. The virtual service communicates with the vehicle end through a specific protocol, receives signal values and executes corresponding logic. The design goal of the virtual service is to simulate the behavior of the actual hardware device as realistically as possible, so it needs to have the ability to process multiple signals and be able to make reasonable responses based on different input signals.
[0041] In the actual signal value transmission process, the obtained signal value can be encapsulated according to a predetermined protocol, for example, the signal value is converted into a data packet in JavaScript Object Notation (JSON) format. The encapsulated signal value data packet is sent to the virtual service through communication protocols such as Inter-Process Communication (IPC), Transmission Control Protocol / Internet Protocol (TCP / IP). After receiving the data packet, the virtual service parses it to obtain the specific signal value. After receiving the signal value, the virtual service will process it according to the internal logic and simulate the response of the hardware device. For example, after receiving the vehicle speed signal, the virtual service may simulate various states of the vehicle at different speeds and feed these states back to the vehicle computer.
[0042] Step 103: Use a virtual service to simulate the signal value to obtain a callback signal value.
[0043] In an embodiment of the present invention, after sending the signal values to the virtual service, the virtual service needs to simulate these signal values and generate callback signal values. The purpose of the simulation is to simulate the actual performance of the vehicle under different signal values so that developers can observe and verify the response behavior of the system. The virtual service generates callback signal values that are close to the actual hardware device behavior through a series of calculations and logical processing. Specifically, after receiving the signal value, the virtual service will perform a series of simulation processing. Including but not limited to:
[0044] Proportional conversion: According to the change of signal value, the original signal value is converted into an analog signal value at a certain ratio. For example, the vehicle speed signal can be scaled up or down to simulate different driving speeds.
[0045] Numerical calculation: Perform mathematical operations on signal values, such as addition, subtraction, multiplication, and division, to generate new signal values. For example, the door switch status signal may be statistically calculated based on the number of switches and time intervals.
[0046] Mapping relationship: Convert the original signal value to the analog signal value according to the predefined mapping relationship. For example, the vehicle speed signal can be mapped to the engine speed, and the door switch status can be mapped to the status of the safety system.
[0047] Logical processing: Process the signal value according to business logic, such as simulating the response behavior of the vehicle in different states. For example, when the vehicle speed exceeds a certain threshold, simulate the response of the braking system.
[0048] The virtual service generates a callback signal value from the processed signal value and returns it to the vehicle computer through the communication protocol. The callback signal value can be used to verify the response behavior of the vehicle computer under different signal inputs to ensure that the vehicle computer can correctly process various vehicle signals.
[0049] Step 104 , using the application to receive the callback signal value, and performing simulation debugging according to the callback signal value, the expected signal value of the vehicle signal, and the actual signal value.
[0050] In an embodiment of the present invention, after the virtual service generates and returns the callback signal value, the application on the vehicle side needs to receive these callback signal values and perform simulation debugging based on these callback signal values, the expected signal value of the vehicle signal, and the actual signal value. The purpose of this step is to verify the response behavior of the vehicle side under different input signals and ensure the correctness and stability of the vehicle side functions. Specifically, after receiving the callback signal value, the application will compare it with the expected signal value and the actual signal value to determine whether the vehicle side works as expected.
[0051] In the actual application process, the application receives the callback signal value returned by the virtual service through the registered callback function. The callback signal value contains information such as the vehicle signal identification, signal value and timestamp. The application compares the callback signal value with the expected signal value and the actual signal value to determine whether the three signal values are consistent. The expected signal value is the reference value set by the developer, and the actual signal value is the current signal value of the vehicle terminal. According to the comparison results, the application performs corresponding debugging operations. If the three signal values are consistent, it means that the vehicle terminal works as expected; if the three signal values are inconsistent, it is necessary to further investigate the cause of the problem. The application records the comparison results and all signal values during the debugging process, and generates a debugging report for developers to analyze and optimize the system.
[0052] The simulation debugging solution for vehicle signals provided by the embodiment of the present invention obtains the signal value of the vehicle signal to be debugged through the virtual hardware abstraction layer, and then sends the signal value to the virtual service according to the virtual hardware abstraction layer. Next, the signal value is simulated and processed by the virtual service to obtain the callback signal value, and finally, the callback signal value is received by the application program, and simulation debugging is performed according to the callback signal value, the expected signal value of the vehicle signal, and the actual signal value.
[0053] In the embodiment of the present invention, through the virtual hardware abstraction layer and virtual services, the vehicle machine end can independently debug the vehicle signal without relying on the counterparty such as MCU and instrument. This reduces the dependence on the development progress of the counterparty, thereby speeding up the debugging and development process. Allow the vehicle machine end to debug before the counterparty is completed. Through virtualization, the vehicle signal can be simulated and debugged at any time, and there is no need to wait for the counterparty to provide a joint debugging version, thereby greatly shortening the debugging time. Since it is no longer dependent on the joint debugging version of the counterparty, the debugging progress of the vehicle machine end becomes more controllable and predictable. This helps project management, ensures that the R&D plan is carried out on time, and reduces the risk of project delays. The vehicle machine end can simulate and debug the vehicle signal through virtual services in the early stage of development, so as to discover and fix potential problems. This can avoid discovering problems in the later joint debugging stage, reducing the workload of repair and debugging. Discovering and fixing problems in advance reduces the complexity and risk of development. The vehicle machine end can troubleshoot and solve problems earlier to ensure the quality and reliability of the product. Using virtual services for signal simulation processing makes the debugging process more efficient. The vehicle side can quickly simulate and test multiple signals, improving the overall debugging efficiency. The virtual hardware abstraction layer and virtual services provide higher flexibility, and can simulate and process signal values according to different debugging requirements. At the same time, the solution has good scalability and can adapt to the types and complexity of vehicle signals that may increase in the future.
[0054] In summary, the embodiments of the present invention realize independent debugging of vehicle signals through a virtual hardware abstraction layer and virtual services, solving the pain point in the background technology that vehicle-side debugging is highly dependent on the counterpart.
[0055] In an exemplary embodiment of the present invention, before obtaining the signal value of the vehicle signal to be debugged through the virtual hardware abstraction layer, an implementation method is to obtain the attribute value of the debug mode through the virtual hardware abstraction layer; based on the virtual hardware abstraction layer, determine whether the debug mode is in the on state according to the attribute value; if the debug mode is in the on state, establish a communication link between the virtual hardware abstraction layer and the virtual service. In the vehicle signal debugging process, obtaining the attribute value of the debug mode through VHAL is a common preliminary step. The goal of this implementation is to ensure that the vehicle terminal is in the debug mode, and to decide whether to establish a communication link between the virtual hardware abstraction layer and the virtual service (MockServer) according to the state of the debug mode. This implementation can improve the flexibility and security of the debugging process and avoid unnecessary resource consumption and potential risks in non-debugging mode.
[0056] In actual application, the attribute value of the debug mode is obtained through the virtual hardware abstraction layer. The attribute value of the debug mode can be an indicator in the system properties, indicating whether the current vehicle end is in debug mode. This attribute value is usually stored in the system configuration file or system properties of the vehicle end, and the developer can read the value by calling the system interface. For example, suppose that the attribute value of the debug mode is stored in the system property persist.vhal.debug_mode. After obtaining the attribute value of the debug mode, it is necessary to judge the attribute value based on the virtual hardware abstraction layer to determine whether the debug mode is on. If the debug mode is on, you can continue with the subsequent debugging steps; if the debug mode is not on, the debugging operation should be terminated to avoid unnecessary resource consumption and potential risks.
[0057] In this judgment process, if the debugging mode is turned on, a communication link between the virtual hardware abstraction layer and the virtual service needs to be established. The establishment of the communication link is a key step in the debugging process, ensuring that the virtual hardware abstraction layer can exchange data with the virtual service, thereby realizing the simulation and debugging of vehicle signals.
[0058] In the actual process of establishing a communication link, it involves setting parameters such as communication protocol, port number and IP address to ensure that the virtual hardware abstraction layer can correctly connect to the virtual service. Establish a connection with the virtual service through a specified communication protocol (such as TCP / IP) to ensure the stability and reliability of data transmission. Verify whether the connection is successful by sending a test message or handshake signal to ensure that the virtual hardware abstraction layer and the virtual service can communicate normally.
[0059] By judging the attribute value of the debugging mode, the embodiment of the present invention allows developers to flexibly control the opening and closing of the debugging process, avoid unnecessary operations in the non-debugging mode, and improve the flexibility of the debugging process. In the non-debugging mode, the communication link between the virtual hardware abstraction layer and the virtual service will not be established, avoiding potential security risks and waste of resources, and ensuring the safety of the vehicle end. Only in the debugging mode will the communication link be established and the simulation processing of the vehicle signal will be performed, thereby optimizing the use of system resources and avoiding unnecessary resource consumption. By pre-judging the debugging mode, developers can simplify the debugging process, ensure that the debugging process is carried out in an orderly manner, and improve development efficiency and product quality.
[0060] In an exemplary embodiment of the present invention, after establishing a communication link between a virtual hardware abstraction layer and a virtual service, an implementation method is to use an application to send vehicle simulation data based on the Internet Control Protocol to the virtual service; use the virtual service to extract simulated environment data from the vehicle simulation data; and use the virtual service to synchronously transmit the simulated environment data to the virtual hardware abstraction layer. After establishing a communication link between the virtual hardware abstraction layer (VHAL) and the virtual service (MockServer), in order to realize the simulation debugging of vehicle signals, an implementation method of sending vehicle simulation data based on the Internet Control Protocol (ICP) to the virtual service through an application can be adopted. This implementation method uses a virtual service to extract simulated environment data from the vehicle simulation data, and synchronously transmits these data to the virtual hardware abstraction layer, thereby realizing the simulation debugging of vehicle signals. In the actual application process, after the communication link is established, the application sends vehicle simulation data to the virtual service through the Internet Control Protocol (ICP). The Internet Control Protocol is a standard protocol for transmitting data between network devices, which has reliability and flexibility. The vehicle simulation data can contain a variety of information, such as vehicle speed, door switch status, engine speed, etc., which are used to simulate the running status of a real vehicle.
[0061] For example, suppose the developer is debugging a vehicle speed signal. In this example, the application generates a set of vehicle simulation data, including vehicle speed values, timestamps, and other related information. This data is encapsulated into ICP-compliant data packets and sent to the virtual service over the network. The sending process of simulated data ensures that in the debugging environment, the vehicle system can receive signal data similar to the real environment, facilitating effective debugging and testing.
[0062] After receiving the vehicle simulation data sent by the application, the virtual service needs to parse and process the vehicle simulation data to extract the simulation environment data. The simulation environment data refers to the specific signal values used to simulate the vehicle's operating status, such as vehicle speed, door switch status, etc. These data are the focus of attention during the debugging process, and can help developers verify and optimize the processing logic of vehicle signals.
[0063] For example: Continuing with the above speed signal debugging example, after receiving the data packet, the virtual service parses the content in the data packet and extracts the speed value and related information. For example, the virtual service extracts the speed value of 60km / h, the timestamp of 2024-06-01 12:00:00, and other related simulation environment data from the data packet. These data will serve as key inputs in the debugging process to ensure the accuracy and effectiveness of the debugging process.
[0064] After extracting the simulated environment data, the virtual service needs to synchronously transmit this data to the virtual hardware abstraction layer (VHAL). VHAL is responsible for receiving this simulated environment data and passing it as an input signal to various components in the vehicle system for processing. Through this implementation, developers can simulate the operating status of a real vehicle in a debugging environment and verify and optimize various signal processing logics.
[0065] For example, in the vehicle speed signal debugging example, the virtual service will extract the vehicle speed value of 60km / h and the timestamp of 2024-06-01 12:00:00 and transmit it to VHAL. After receiving this data, VHAL will pass it as an input signal to the relevant components in the vehicle system, such as the instrument panel display system and the driver assistance system. After receiving the vehicle speed signal, these components will perform corresponding processing and display. Developers can observe the actual effect of the debugging process and verify and optimize the processing logic of the vehicle speed signal.
[0066] The embodiment of the present invention sends vehicle simulation data based on the Internet control protocol to the virtual service through an application program. Developers can quickly generate and transmit a variety of vehicle signals, reduce dependence on actual vehicles and hardware, and improve debugging efficiency. The virtual service can extract the simulated environment data from the vehicle simulation data and synchronously transmit it to the virtual hardware abstraction layer. Developers can flexibly adjust and control the signals and environment during the debugging process, enhancing the flexibility of debugging. Data transmission and processing through standard protocols ensure the accuracy and consistency of the simulated environment data, and developers can perform precise signal processing and logic verification based on these data. Reliance on actual vehicles and hardware devices is reduced, and developers can perform comprehensive signal debugging and verification in a virtual environment, improving the controllability and safety of the debugging process. Through the collaborative work of virtual services and VHAL, developers can discover and solve problems in signal processing in the early stages of the debugging process, avoiding risks and uncertainties in the later joint debugging process.
[0067] In an exemplary embodiment of the present invention, after using an application to send vehicle simulation data based on the Internet Control Protocol to a virtual service, an implementation method is to use the application to call a system interface to register a monitoring function for vehicle signals and set an expected signal value. After using an application to send vehicle simulation data based on the Internet Control Protocol (ICP) to a virtual service, an implementation method can be adopted to register a monitoring function for vehicle signals by calling a system interface and set an expected signal value. This implementation method ensures that vehicle signals can be effectively monitored and processed through the operation of the application, and provides a clear benchmark for signal debugging.
[0068] In actual application, the application needs to call the system interface to register the monitoring function of the vehicle signal. The monitoring function allows the application to monitor the changes of a specific vehicle signal in real time and trigger the corresponding callback function when the vehicle signal changes. The process of registering the monitoring function usually involves specifying the signal type and signal ID to be monitored, and defining the callback function to handle the signal change.
[0069] For example, suppose the developer is debugging a vehicle speed signal. The application calls the system interface, registers the monitoring function for the vehicle speed signal, specifies the type and ID of the vehicle speed signal, and defines a callback function. When the vehicle speed signal changes, the callback function will be triggered, and the application can process the new vehicle speed value in the callback function. For example, the developer can update the vehicle speed display on the dashboard in the callback function, or record the vehicle speed change for subsequent analysis.
[0070] After registering the monitoring function, the application also needs to set the expected signal value. The expected signal value refers to the signal value that the developer hopes to verify and test during the debugging process. By setting the expected signal value, the developer can clarify the debugging target and compare and verify when the signal changes.
[0071] For example: Continuing with the above speed signal debugging example, the developer can set an expected speed value in the application, such as 60km / h. This expected value will be used as a benchmark during the debugging process, and the developer can compare the actual received speed value with the expected value in the callback function. If the actual speed value is consistent with the expected value, it means that the processing logic of the speed signal is correct; if not, the developer can further analyze and debug the signal processing logic.
[0072] By registering the monitoring function of the vehicle signal in the embodiment of the present invention, the application can monitor the changes of the specific vehicle signal in real time and respond in time when the vehicle signal changes. This real-time monitoring and response capability helps developers quickly discover and solve problems in signal processing during the debugging process. By setting the expected signal value, the developer can clarify the debugging target and compare and verify when the vehicle signal changes. The expected signal value provides a clear benchmark, based on which the developer can verify and optimize the signal processing logic. By using the application to call the system interface to register the monitoring function and set the expected signal value, the developer can quickly locate the problem during the debugging process and make effective corrections. This method improves the debugging efficiency and accuracy and reduces the errors and uncertainties that may occur during the debugging process. Through the operation of the application, the developer can flexibly adjust and control the signals and environment during the debugging process, which enhances the flexibility of the debugging process. The developer can change the configuration of the expected signal value and the monitoring function at any time as needed to adapt to different debugging needs.
[0073] In an exemplary embodiment of the present invention, after using an application to call a system interface to register the monitoring function of a vehicle signal and setting the expected signal value, an implementation method is to synchronously obtain a list of available signals from a virtual hardware abstraction layer according to a framework; and detect whether the vehicle signal is a valid signal in the available signal list through the framework. After using an application to call a system interface to register the monitoring function of a vehicle signal and setting the expected signal value, an implementation method can be adopted in which a list of available signals is synchronously obtained from a virtual hardware abstraction layer (VHAL) through a framework, and detect whether the vehicle signal is a valid signal in the available signal list through the framework. This implementation method ensures that the signal data during the debugging process is accurate and reliable by further verifying and confirming the validity of the vehicle signal.
[0074] In actual application, the framework needs to synchronously obtain the list of available signals from VHAL. The list of available signals refers to the collection of all valid signals that VHAL can process and transmit under the current system configuration and environment. By synchronously obtaining this list, the framework can obtain all available signal types and signal IDs in the current system, providing a basis for subsequent signal verification.
[0075] For example, suppose the developer is debugging the vehicle speed signal and the door status signal. The framework synchronously obtains the available signal list from VHAL, which contains various signal types and signal IDs such as vehicle speed signal, door status signal, engine speed signal, fuel level signal, etc. By obtaining this list, the framework knows which signals are valid in the current system and can further detect and confirm the registered signals.
[0076] After obtaining the list of available signals, the framework needs to check whether the vehicle signal is a valid signal in the list. A valid signal is a signal that exists in the list of available signals, which means that the signal can be correctly processed and transmitted by VHAL. By checking the validity of the signal, the framework can verify whether the signal registered by the application is available in the current system, thereby ensuring the accuracy and reliability of signal debugging.
[0077] For example: Continuing with the above debugging example of vehicle speed signal and door status signal, the framework detects vehicle speed signal and door status signal in the available signal list. Assuming that the vehicle speed signal exists in the list, it indicates that the vehicle speed signal is a valid signal; and the door status signal does not exist in the list, it indicates that the door status signal is an invalid signal. The framework feeds back this detection result to the application, and the application can adjust and optimize the signal processing logic based on the result.
[0078] In the embodiment of the present invention, by synchronously obtaining a list of available signals from VHAL and detecting the validity of the signals in the list, the framework can effectively verify whether the signals registered by the application are available in the current system. Ensuring the validity of the signal helps to improve the accuracy and reliability of the debugging process. During the debugging process, developers may encounter some problems caused by invalid signals or configuration errors. Through the signal validity detection of the framework, these problems can be discovered and solved early, reducing errors and uncertainties in the debugging process and improving debugging efficiency. Verifying the validity of the signal ensures the stability and consistency of the system when processing and transmitting signals. Valid signals can be correctly processed and transmitted by VHAL, reducing system crashes or anomalies caused by invalid or incorrect signals, and improving the overall stability of the system. By synchronously obtaining the list of available signals through the framework and detecting the validity of the signal, developers can flexibly adjust and optimize the signal processing logic to adapt to different debugging needs. Developers can adjust the signal configuration and processing strategy in a timely manner according to the signal validity detection results to improve the flexibility and adaptability of debugging.
[0079] In an exemplary embodiment of the present invention, after detecting whether the vehicle information is a valid signal in the list of available signals through the framework, an implementation method is that if the vehicle signal is a valid signal, the expected signal value is encapsulated into a data packet according to the virtual hardware abstraction layer, and the data packet is sent to the virtual service. After detecting whether the vehicle signal is a valid signal in the list of available signals through the framework, if it is confirmed that the vehicle signal is a valid signal, the next step is to encapsulate the expected signal value into a data packet according to the virtual hardware abstraction layer (VHAL), and send the data packet to the virtual service. This implementation method ensures that the expected value of the valid signal can be correctly encapsulated and transmitted, and further verifies and simulates the signal processing logic.
[0080] In actual application, the expected signal value is encapsulated into a standardized data packet according to the interface and protocol of VHAL. The data packet usually includes a signal ID, a signal value, a timestamp, and other necessary metadata. Through this implementation, the expected signal value is converted into a standardized data format to facilitate subsequent transmission and processing.
[0081] For example: suppose the developer is debugging a vehicle speed signal, and the expected vehicle speed value is 60km / h. After detecting that the vehicle speed signal is a valid signal, VHAL encapsulates the expected vehicle speed value (60km / h) into a data packet. The data packet contains information such as the vehicle speed signal ID, the expected vehicle speed value, and the current timestamp. In this way, the expected vehicle speed value is encapsulated into a standardized data packet and is ready for transmission.
[0082] After completing the data packet encapsulation, VHAL sends the data packet to the virtual service through the network protocol. The virtual service is responsible for receiving, parsing and processing these data packets, thereby simulating a real signal processing environment. Through this implementation, the expected signal value can be transmitted to the virtual service and further simulated and processed in the virtual service.
[0083] For example: Continuing with the above speed signal debugging example, the encapsulated speed signal data packet is sent to the virtual service through the network protocol. After receiving the data packet, the virtual service parses the speed signal ID and the expected speed value (60km / h). Then, the virtual service simulates the processing environment of the speed signal based on the received data packet to further verify and simulate the signal processing logic.
[0084] The embodiment of the present invention ensures that the expected signal value can be accurately delivered to the virtual service by encapsulating the expected signal value into a standardized data packet and sending it to the virtual service through a network protocol. The errors and losses in data transmission are reduced, and the accuracy and reliability of signal debugging are improved. The expected signal value is encapsulated into a standardized data packet, which is convenient for subsequent parsing and processing. The standardized data format ensures the data compatibility and consistency between different components, and improves the overall stability and maintainability of the system. The virtual service receives and processes the data packet of the expected signal value, which can simulate the real signal processing environment. The virtual service parses, processes and simulates the signal based on the received data packet, further verifies and optimizes the signal processing logic, and improves the efficiency and effect of debugging. Through standardized data encapsulation and transmission, developers can flexibly adjust and optimize the signal processing logic to adapt to different debugging requirements. Developers can flexibly simulate various signal processing scenarios based on the data packet of the expected signal value, which improves the flexibility and adaptability of debugging.
[0085] In an exemplary embodiment of the present invention, if the vehicle signal is a valid signal, an implementation method after encapsulating the expected signal value into a data packet according to the virtual hardware abstraction layer and sending the data packet to the virtual service is to use the virtual service to parse the data packet to obtain the expected signal value, and use the expected signal value to update the cached signal value; use the virtual service to simulate the expected signal value, and synchronously transmit the simulated signal value to the virtual hardware abstraction layer. After encapsulating the expected signal value into a data packet and sending it to the virtual service, the next step is to use the virtual service to parse the data packet, obtain the expected signal value, and update the cached signal value. Then, the virtual service simulates the expected signal value and synchronously transmits the processed signal value to the virtual hardware abstraction layer (VHAL). This implementation method ensures that the expected signal value can be correctly parsed, updated and transmitted, and further verifies and simulates the signal processing logic.
[0086] In actual application, after receiving the data packet, the virtual service parses the expected signal value in the data packet. Then, the virtual service updates the cached signal value with the expected signal value to ensure that the cached signal value is consistent with the expected signal value. By updating the cached signal value, the virtual service can track and record the changes in the signal value, providing an accurate data basis for subsequent simulation processing.
[0087] For example: Assume that the developer is debugging the vehicle speed signal. In the previous step, VHAL encapsulates the expected vehicle speed value into a data packet and sends it to the virtual service. After receiving the data packet, the virtual service parses the expected vehicle speed value (60km / h) in the data packet. Then, the virtual service updates the expected vehicle speed value to the cached vehicle speed signal value.
[0088] After updating the cached signal value, the virtual service simulates the expected signal value. The simulation process usually includes performing certain calculations, transformations, or mappings based on the expected signal value to obtain the simulated signal value. Finally, the virtual service synchronously transmits the simulated signal value to VHAL to ensure that VHAL obtains the simulated signal value for subsequent signal processing and debugging.
[0089] For example: Continuing with the above speed signal debugging example, after the virtual service updates the cached speed signal value, it simulates the expected speed value. For example, the virtual service performs certain calculations based on the expected speed value to obtain the simulated speed value (65km / h). Finally, the virtual service synchronously transmits the simulated speed value to VHAL to ensure that VHAL obtains the simulated speed value for subsequent signal processing and debugging.
[0090] The embodiment of the present invention ensures the consistency between the cached signal value and the expected signal value by updating the cached signal value. In this way, the virtual service can track and record the changes in the signal value, providing an accurate data basis for subsequent simulation processing. By performing simulation processing on the expected signal value, the signal value after simulation processing is obtained. Simulation processing usually includes certain calculations, transformations or mappings, which can simulate the signal processing process more realistically, thereby improving the accuracy and reliability of simulation processing. By synchronously transmitting the signal value after simulation processing to VHAL, it is ensured that VHAL obtains the signal value after simulation processing, and performs subsequent signal processing and debugging. In this way, the stability of signal processing can be enhanced, and the correctness and reliability of the signal processing process can be ensured.
[0091] In an exemplary embodiment of the present invention, after using a virtual service to simulate the expected signal value and synchronously transmitting the simulated signal value to the virtual hardware abstraction layer, an implementation method is to transmit the vehicle signal change notification to the framework according to the virtual hardware abstraction layer; and forward the simulated signal value to the application according to the framework. After synchronously transmitting the simulated signal value to the virtual hardware abstraction layer (VHAL), the next step is to transmit the vehicle signal change notification to the framework and forward the simulated signal value to the application. This implementation method ensures that the application can receive the simulated signal value and perform further processing and debugging.
[0092] In actual application, the change notifications of vehicle signals are transmitted to the framework according to VHAL. These change notifications include the update, change and status information of signal values. After receiving these change notifications, the framework can update the relevant signal information in time to ensure the real-time and accuracy of the signal information.
[0093] For example, suppose the vehicle speed in the vehicle signal changes from 80km / h to 85km / h. VHAL transmits the notification of the speed change to the framework, and after receiving the notification, the framework updates the value of the vehicle speed signal to 85km / h.
[0094] Then, the framework forwards the received simulated signal values to the application. The application can receive the simulated signal values and perform further processing and debugging based on these signal values. In this way, the application can obtain the latest signal information and perform simulation debugging of vehicle signals.
[0095] For example: Continuing with the above speed signal debugging example, the framework forwards the simulated speed value (85km / h) transmitted by VHAL to the application. After receiving this value, the application can further debug the speed signal, such as comparing it with the expected value to verify whether the processing logic of the speed signal is correct.
[0096] The embodiment of the present invention ensures the real-time and accuracy of signal information by transmitting the change notification of vehicle signals to the framework and forwarding the signal value after simulation processing to the application. The application can obtain the latest signal information in a timely manner for further processing and debugging. Through the transfer of the framework, the stable transmission and processing of signal information is ensured. Even in a complex signal processing environment, the stability and reliability of signal processing can be maintained. The application can directly receive the signal value after simulation processing without additional processing steps, thereby improving the debugging efficiency of the application. The application can quickly obtain the latest signal information and perform simulation debugging of vehicle signals.
[0097] In an exemplary embodiment of the present invention, an implementation method of simulation debugging based on the callback signal value, the expected signal value and the actual signal value of the vehicle signal is to use an application to compare the callback signal value, the expected signal value and the actual signal value; if the callback signal value, the expected signal value and the actual signal value are all consistent, then the debugging is confirmed to be passed. This implementation method is the last step of simulation debugging of vehicle signals, and the correctness of signal processing is confirmed by comparing the callback signal value, the expected signal value and the actual signal value. This process is usually completed by the application, which can effectively verify whether the processing logic of the vehicle signal is correct.
[0098] In actual application, the application obtains the callback signal value, expected signal value and actual signal value. Then, the application compares these three values to determine whether they are consistent. If all three values are consistent, that is, the callback signal value is equal to the expected signal value and equal to the actual signal value, then the signal processing logic is confirmed to be correct.
[0099] For example: Assume that the application needs to debug the vehicle speed signal. The application obtains the callback signal value of 80km / h, the expected signal value is also 80km / h, and the actual signal value is 80km / h. After comparison, it is found that the callback signal value is equal to the expected signal value and the actual signal value, so it is confirmed that the vehicle speed signal processing logic is correct.
[0100] Based on the comparison results, the application confirms whether the processing logic of the vehicle signal is correct. If the callback signal value, expected signal value, and actual signal value are consistent, it means that the signal processing logic is correct and the debugging is passed. Otherwise, further analysis and debugging are required to find out the problem of the signal processing logic.
[0101] The embodiment of the present invention can effectively verify the correctness of vehicle signal processing by comparing the callback signal value, the expected signal value and the actual signal value. If the three are consistent, it is confirmed that the signal processing logic is correct, which improves the accuracy and reliability of signal processing. The application can quickly compare the signal value to confirm whether the signal processing logic is correct. In this way, a lot of debugging time and cost can be saved, and the efficiency and effect of debugging can be improved. By confirming the correctness of the signal processing logic, the stability of signal processing can be improved. The application can promptly discover and correct problems with the signal processing logic to ensure the stability and reliability of the signal processing process.
[0102] Based on the above description of the embodiment of a simulation debugging method for a vehicle signal, a solution for simulating debugging a vehicle signal on a vehicle machine side is introduced below. Figure 2, showing a schematic diagram of the vehicle-side system architecture of a vehicle-side simulation debugging vehicle signal solution of an embodiment of the present invention. The vehicle-side may specifically involve an application (App), a framework (Framework), a virtual hardware abstraction layer (VHAL) and a virtual service (MockServer). Among them, the virtual service can also be called a simulation service, which is a native service or local service (Native Service) of the vehicle-side, mainly used to simulate the reception and response of signals to the counterparts such as MCU and instruments.
[0103] Furthermore, the embodiment of the present invention adds a debug mode switch to VHAL.
[0104] VHAL calls the system interface:
[0105] android::base::GetProperty("persist.vhal.propconfig.runmode","debug") reads the value of the system property "persist.vhal.propconfig.runmode" to determine whether the property value is "debug". If the property value is "debug", it means that the debug mode switch is on; otherwise, it is off. If you want to turn on the debug mode switch later, you only need to use the Android command "su" to open the root permission of the car during debugging, and then use the command "setprop persist.vhal.propconfig.runmode debug" to set the value of the system property "persist.vhal.propconfig.runmode" to debug, and then restart the car to turn on the debug mode.
[0106] When debug mode is turned on, the IP and port of the VHAL point-to-point communication target use the IP and port of MockServer. At this time, VHAL changes from communicating with MCU and instrument in the formal environment to communicating with MockServer in debug mode.
[0107] Reference Figure 3 , shows a flowchart of simulation debugging steps of a vehicle terminal after turning on debug mode in an embodiment of the present invention.
[0108] Step 301, App communicates with MockServer point-to-point through IPCP protocol, and then sends protocol data to MockServer, which then synchronizes to VHAL to simulate the test environment.
[0109] For example, vehicle speed, door switch status, etc. Different environments have different code processing logic. Simulating these environments can test whether there are problems with the corresponding code logic.
[0110] Step 302 , the App calls the system interface: registerCallback of CarPropertyManager to register the monitoring of the signal value to be debugged (supports testing of all types of signals).
[0111] CarPropertyManager is the management class of vehicle signals of the vehicle computer, which is responsible for providing the interface for setting and obtaining vehicle signals.
[0112] Step 303 , the App calls the system interface for setting the signal value: setProperty of CarPropertyManager to set the signal value.
[0113] The signal value set specifically here is used as the expected value and will be used later.
[0114] Step 304: Framework determines whether the set signal is included in the available signal list synchronized from VHAL.
[0115] If the set signal is included in the list of available signals, it means that it is implemented by the underlying layer and is a valid signal; otherwise it is an invalid signal.
[0116] Step 305: Determine whether the signal is a valid signal or an invalid signal.
[0117] If the signal is an invalid signal, the process ends; if the signal is a valid signal, proceed to step 306.
[0118] Step 306: VHAL receives the call, encapsulates the data according to the protocol based on the input parameters, and then sends the data packet to MockServer through point-to-point communication based on the IPCP protocol.
[0119] Step 307: MockServer parses the received data and updates the signal value in the cache.
[0120] Since the data is sent in full for simulation when the environment is simulated in step 301, it is easy to overwrite other signals. The signal is updated and cached here. After caching, when it is to be overwritten, this signal can be judged separately and the value is taken from the cache, so it will not be overwritten.
[0121] Step 308: MockServer performs multiplication, subtraction, mapping, etc. on the signal value according to the expected proportional coefficient, numerical difference, mapping relationship, etc., and synchronizes the processed value to VHAL.
[0122] Step 309: VHAL updates the stored signal value. Based on Android's own settings, VHAL notifies the Framework of changes in the synchronization signal value.
[0123] Step 310: The Framework receives a notification of a change in the signal value and forwards the notification to the App that has registered to monitor the signal.
[0124] Step 311: The App receives a callback notification of a signal value change.
[0125] Step 312, the App compares the callback signal value and the signal value obtained by calling the system interface with the expected value (the expected value is the signal value set in step S3). If they are consistent, it means that the test has passed.
[0126] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of action combinations, but those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0127] Reference Figure 4 , shows a structural block diagram of a vehicle signal simulation debugging system according to an embodiment of the present invention. The vehicle signal simulation debugging system may specifically include the following modules.
[0128] A signal value acquisition module 41, used for acquiring the signal value of the vehicle signal to be debugged through a virtual hardware abstraction layer;
[0129] A signal value sending module 42, configured to send the signal value to the virtual service according to the virtual hardware abstraction layer;
[0130] A simulation processing module 43, configured to use the virtual service to simulate the signal value to obtain a callback signal value;
[0131] The simulation debugging module 44 is used to receive the callback signal value by using an application program, and perform simulation debugging according to the callback signal value, the expected signal value and the actual signal value of the vehicle signal.
[0132] In an exemplary embodiment of the present invention, the system further comprises:
[0133] A debugging mode attribute value acquisition module, used to acquire the attribute value of the debugging mode through the virtual hardware abstraction layer before the signal value acquisition module 41 acquires the signal value of the vehicle signal to be debugged through the virtual hardware abstraction layer;
[0134] A debugging mode determination module, configured to determine whether the debugging mode is in an on state based on the virtual hardware abstraction layer and the attribute value;
[0135] The communication link establishing module is used to establish a communication link between the virtual hardware abstraction layer and the virtual service if the debugging mode is turned on.
[0136] In an exemplary embodiment of the present invention, the system further comprises:
[0137] a simulation data sending module, configured to send vehicle simulation data based on the Internet Control Protocol to the virtual service using the application program after the communication link establishing module establishes a communication link between the virtual hardware abstraction layer and the virtual service;
[0138] an environment data extraction module, configured to extract simulated environment data from the vehicle simulation data using the virtual service;
[0139] The environment data synchronous transmission module is used to synchronously transmit the simulated environment data to the virtual hardware abstraction layer using the virtual service.
[0140] In an exemplary embodiment of the present invention, the system further comprises:
[0141] A monitoring function registration module is used to register the monitoring function of the vehicle signal by using the application to call the system interface and set the expected signal value after the simulation data sending module uses the application to send the vehicle simulation data based on the Internet control protocol to the virtual service.
[0142] In an exemplary embodiment of the present invention, the system further comprises:
[0143] A signal list acquisition module, configured to synchronously acquire an available signal list from the virtual hardware abstraction layer according to a framework after the monitoring function registration module registers the monitoring function of the vehicle signal by using the application to call the system interface and sets the expected signal value;
[0144] The valid signal judgment module is used to detect whether the vehicle signal is a valid signal in the available signal list through the framework.
[0145] In an exemplary embodiment of the present invention, the system further comprises:
[0146] A signal value encapsulation module is used to encapsulate the expected signal value into a data packet according to the virtual hardware abstraction layer after the valid signal judgment module detects whether the vehicle information is a valid signal in the available signal list through the framework, if the vehicle signal is a valid signal, and send the data packet to the virtual service.
[0147] In an exemplary embodiment of the present invention, the system further comprises:
[0148] a data packet parsing module, configured to encapsulate the expected signal value into a data packet according to the virtual hardware abstraction layer if the vehicle signal is a valid signal in the signal value encapsulation module, and after sending the data packet to the virtual service, parse the data packet using the virtual service to obtain the expected signal value, and update the cached signal value using the expected signal value;
[0149] The simulation processing module is used to use the virtual service to perform simulation processing on the expected signal value, and synchronously transmit the signal value after the simulation processing to the virtual hardware abstraction layer.
[0150] In an exemplary embodiment of the present invention, the system further comprises:
[0151] a signal notification module, configured to transmit a change notification of the vehicle signal to the framework according to the virtual hardware abstraction layer after the simulation processing module performs simulation processing on the expected signal value using the virtual service and synchronously transmits the simulated signal value to the virtual hardware abstraction layer;
[0152] The signal value forwarding module is used to forward the signal value after simulation processing to the application according to the framework.
[0153] In an exemplary embodiment of the present invention, the simulation debugging module 44 includes:
[0154] a signal value comparison module, configured to compare the callback signal value, the expected signal value and the actual signal value using the application program;
[0155] The debugging confirmation module is used to confirm that the debugging is successful if the callback signal value, the expected signal value and the actual signal value are all consistent.
[0156] As for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the embodiments can refer to each other.
[0157] It will be appreciated by those skilled in the art that the embodiments of the present invention may be provided as methods, devices, or computer program products. Therefore, the embodiments of the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0158] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing terminal device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device, so that a series of operation steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable terminal device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0159] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0160] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or terminal device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or terminal device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or terminal device including the elements.
[0161] The above is a detailed introduction to a vehicle signal simulation debugging method and a vehicle signal simulation debugging system provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A simulation debugging method for vehicle signals, It is characterized in that The method comprises: Acquire the signal value of the vehicle signal to be debugged through the virtual hardware abstraction layer; sending the signal value to a virtual service according to the virtual hardware abstraction layer; Using the virtual service to simulate the signal value to obtain a callback signal value; The callback signal value is received by using an application program, and simulation debugging is performed according to the callback signal value, the expected signal value and the actual signal value of the vehicle signal.
2. The method according to claim 1, It is characterized in that Before obtaining the signal value of the vehicle signal to be debugged through the virtual hardware abstraction layer, the method further includes: Acquire the attribute value of the debugging mode through the virtual hardware abstraction layer; Based on the virtual hardware abstraction layer, judging whether the debugging mode is in an on state according to the attribute value; If the debugging mode is on, a communication link is established between the virtual hardware abstraction layer and the virtual service.
3. The method according to claim 2, It is characterized in that After establishing the communication link between the virtual hardware abstraction layer and the virtual service, the method further includes: Using the application to send Internet control protocol-based vehicle simulation data to the virtual service; extracting simulated environment data from the vehicle simulation data using the virtual service; The simulation environment data is synchronously transmitted to the virtual hardware abstraction layer using the virtual service.
4. The method according to claim 3, It is characterized in that After using the application to send the vehicle simulation data based on the Internet Control Protocol to the virtual service, the method further includes: The application program is used to call a system interface to register a monitoring function of the vehicle signal and to set the expected signal value.
5. The method according to claim 4, It is characterized in that After using the application to call the system interface to register the monitoring function of the vehicle signal and setting the expected signal value, the method further includes: Synchronously obtain a list of available signals from the virtual hardware abstraction layer according to the framework; The framework detects whether the vehicle signal is a valid signal in the available signal list.
6. The method according to claim 5, It is characterized in that After detecting whether the vehicle information is a valid signal in the available signal list through the framework, the method further includes: If the vehicle signal is a valid signal, the expected signal value is encapsulated into a data packet according to the virtual hardware abstraction layer, and the data packet is sent to the virtual service.
7. The method according to claim 6, It is characterized in that After encapsulating the expected signal value into a data packet according to the virtual hardware abstraction layer if the vehicle signal is a valid signal and sending the data packet to the virtual service, the method further includes: Using the virtual service to parse the data packet to obtain the expected signal value, and using the expected signal value to update the cached signal value; The expected signal value is simulated using the virtual service, and the simulated signal value is synchronously transmitted to the virtual hardware abstraction layer.
8. The method according to claim 7, It is characterized in that After using the virtual service to simulate the expected signal value and synchronously transmitting the simulated signal value to the virtual hardware abstraction layer, the method further includes: transmitting a change notification of the vehicle signal to the framework according to the virtual hardware abstraction layer; The analog processed signal value is forwarded to the application according to the framework.
9. The method according to claim 1, It is characterized in that The simulation debugging is performed according to the callback signal value, the expected signal value and the actual signal value of the vehicle signal, including: using the application to compare the callback signal value, the expected signal value, and the actual signal value; If the callback signal value, the expected signal value and the actual signal value are all consistent, it is confirmed that the debugging is successful.
10. A vehicle signal simulation debugging system, It is characterized in that The system comprises: A signal value acquisition module, used to acquire the signal value of the vehicle signal to be debugged through a virtual hardware abstraction layer; A signal value sending module, used for sending the signal value to the virtual service according to the virtual hardware abstraction layer; A simulation processing module, used for using the virtual service to simulate the signal value to obtain a callback signal value; The simulation debugging module is used to receive the callback signal value by using an application program, and perform simulation debugging according to the callback signal value, the expected signal value and the actual signal value of the vehicle signal.
11. An electronic device, It is characterized in that include: one or more processors; and One or more machine-readable media having instructions stored thereon, when executed by the one or more processors, enable the electronic device to perform the vehicle signal simulation debugging method as claimed in any one of claims 1 to 9.
12. A computer-readable storage medium, It is characterized in that The computer program stored therein enables the processor to execute the vehicle signal simulation debugging method as claimed in any one of claims 1 to 9.
