Vehicle CAN link monitoring method, system and device, electronic equipment and storage medium
By dividing and monitoring CAN signals in Android and QNX dual-system vehicles, it solves the problem of difficulty in monitoring the resource consumption of the vehicle CAN signal system in the existing technology, realizes a comprehensive test of the vehicle CAN link, expands the test scope and Properly design information processing tasks.
Patent Information
- Application Number
- CN202410656779.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-10-11
AI Technical Summary
Existing CAN link debugging methods are difficult to monitor the system resource consumption and processing capabilities of the vehicle's CAN signals, especially under dual-system architecture, resulting in increased debugging complexity and hardware costs, making it impossible to monitor the entire vehicle's full link signals. Effective testing.
By dividing CAN signals into uplink and downlink signals in Android and QNX dual-system vehicles, and monitoring signal processing and system resource consumption according to the time interval of cyclic transmission, test projects are set up to simulate the sending and receiving of CAN signals, and the entire vehicle CAN chain is monitored. Interactions and subsystem resource consumption on the road generate MAP data structures to analyze transmission paths and processing status.
It achieves a comprehensive test of the vehicle CAN link, reflects the system resource consumption and CAN processing capabilities, expands the test scope compared to point-to-point testing, and rationally designs information processing tasks to facilitate understanding of system resource consumption and CAN processing under different signal frequencies. processing power.
Smart Images

Figure CN118764407A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of link monitoring, and in particular to a whole vehicle CAN link monitoring method, a whole vehicle CAN link monitoring system, a whole vehicle CAN link monitoring device, electronic equipment, storage medium and vehicle. Background Art
[0002] With the increase of automotive electronic equipment, a large number of applications and arrangements involving CAN communication have resulted in an increase in communication devices. In addition, most car computers adopt a dual-system architecture, which increases the complexity of debugging and testing, and increases the skill requirements for R&D personnel.
[0003] The original debugging method required connecting the CAN box through the Windows host and debugging a single signal through the ZCANPRO software, which was basically limited to small point-to-point scenarios. This not only made debugging more cumbersome and increased hardware costs, but also made it impossible to know the consumption of system resources by the CAN signal of the entire vehicle link, and the load of the application subsystem used to process the CAN signal.
[0004] Therefore, a whole vehicle CAN link monitoring method is needed. Based on the dual system, test items or test objects are set to test a single CAN signal or multiple CAN signals to obtain the system resource consumption and CAN signal processing under the whole vehicle CAN link. Summary of the invention
[0005] The purpose of the present invention is to provide a whole vehicle CAN link monitoring method, a whole vehicle CAN link monitoring system, a whole vehicle CAN link monitoring device, an electronic device, a storage medium and a vehicle, so as to solve at least one of the above-mentioned technical problems.
[0006] The present invention provides the following scheme:
[0007] According to one aspect of the present invention, a vehicle CAN link monitoring method is provided, the vehicle CAN link monitoring method comprising:
[0008] For dual-system vehicles based on Android and QNX, plan the CAN signals on the vehicle CAN link;
[0009] The planning of the CAN signal on the vehicle CAN link includes dividing the CAN signal into an uplink signal and a downlink signal and dividing the CAN signal into a QNX side signal and an Android side signal;
[0010] Set test items according to the division of CAN signals into uplink signals and downlink signals and the division of CAN signals into QNX side signals and Android side signals;
[0011] Control the time interval for cyclic sending of CAN signals;
[0012] According to the time interval for controlling the cyclic sending of the CAN signal, the processing of the CAN signal and the resource consumption of the system in the test project are monitored.
[0013] Furthermore, it also includes:
[0014] The setting of the test items includes setting the test objects;
[0015] According to the test object, a corresponding subsystem is selected to monitor the sending and receiving status of CAN signals;
[0016] According to the time interval of controlling the cyclic transmission of the CAN signal and the setting of the test object, simulating the transmission and reception of the CAN signal;
[0017] Monitoring the interaction of one or more CAN signals on the vehicle CAN link according to the sending and receiving of the simulated CAN signal;
[0018] Based on the interaction of one or more CAN signals on the vehicle CAN link, monitor the subsystems involved in the CAN signal and the resource consumption of the system.
[0019] Furthermore, it also includes:
[0020] According to the CAN signal reception and transmission between the upper system and the lower system, the uplink signal and the downlink signal are defined;
[0021] Define QNX side signals or Android side signals according to the interaction ends involved in the vehicle CAN link;
[0022] According to the definitions of uplink signal, downlink signal, QNX side signal and Android side signal, the CAN signals on the vehicle CAN link are planned as uplink signal QNX side, uplink signal Android side, downlink signal QNX side and downlink signal Android side;
[0023] Generate a MAP data structure according to the CAN signal planning into QNX side uplink signal, Android side uplink signal, QNX side downlink signal and Android side downlink signal;
[0024] According to the MAP data structure, the transmission path and processing status of the CAN signal on the vehicle CAN link are monitored.
[0025] Furthermore, it also includes:
[0026] Initialize the configuration file of CAN signal;
[0027] The configuration file includes the MAP data structure of the CAN signal;
[0028] Establishing a search based on the MAP data structure of the CAN signal;
[0029] Establishing a search according to the above, querying inter-process communication and inter-system communication;
[0030] Monitor the CAN signals in the communication according to the inter-process communication and / or inter-system communication.
[0031] Furthermore, it also includes:
[0032] According to the MAP data structure, FIAG is set in the monitoring program;
[0033] Filter data streams based on FIAG;
[0034] The filtering of the data stream according to FIAG includes determining whether the inter-system signal is a CAN signal according to the FIAG state;
[0035] If it is a CAN signal, determine whether the CAN signal is a single CAN signal;
[0036] If the CAN signal is a single CAN signal, the transmission path and processing status of the signal are monitored;
[0037] According to the monitoring of the transmission path and processing status of the signal, the processing capability of the subsystem at the transmitting end and the subsystem at the receiving end for the single CAN signal and the proportion of system resources occupied are monitored.
[0038] Furthermore, it also includes:
[0039] If the CAN signal is not a single CAN signal, determine whether the CAN signal is a full-link CAN signal;
[0040] If the CAN signal is a full-link CAN signal, the transmission path and processing status of the signal are monitored;
[0041] The monitoring of the transmission path and processing status of the signal involves a subsystem at a transmitting end corresponding to a plurality of subsystems at a receiving end;
[0042] According to the monitoring of the transmission path and processing status of the signal, monitoring the processing capability of a subsystem at a transmitting end and multiple subsystems at receiving ends for the CAN signal and the proportion of system resources occupied;
[0043] By monitoring the CAN signal processing capabilities and system resource occupancy ratios of a transmitting subsystem and multiple receiving subsystems, status information on the entire system resource consumption of the full-link CAN signal is obtained.
[0044] According to two aspects of the present invention, a whole vehicle CAN link simulation system is provided, the whole vehicle CAN link simulation system comprising: an Android module, a QNX module and a CAN communication link module;
[0045] The Android module and the QNX module are data connected via the CAN communication link module;
[0046] The CAN communication link module is used to transmit CAN signals, including uplink signals and downlink signals;
[0047] The QNX module is used for cross-process communication on the QNX side;
[0048] The Android module is used to send and receive CAN signals with the QNX module through a hardware abstraction layer.
[0049] Further, the QNX module includes: a can_simulator module;
[0050] The can_simulator module loads the CAN configuration file;
[0051] The CAN configuration file includes a MAP data structure file;
[0052] Initialize the CAN signal of the vehicle according to the CAN configuration file loaded;
[0053] Differentiate and manage CAN signals through MAP data structure;
[0054] The search is established based on distinguishing and managing CAN signals through the MAP data structure.
[0055] Furthermore, the QNX module also includes: a shared memory shm_spi1 module and a shared memory sshm_gvm1 module;
[0056] The can_simulator module creates a client instantiation class by initializing the shared memory shm_spi1 module and the shared memory shm_gvm1 module;
[0057] Create a client instantiation class as described above to perform cross-process communication in QNX.
[0058] Furthermore, the QNX module also includes: a resource management module;
[0059] The can_simulator module creates a client instantiation class through the resource management module in QNX;
[0060] The QNX module also includes an mcu_service module;
[0061] According to the creation of the client instantiation class, the can_simulator module communicates with the mcu_service module;
[0062] The mcu_service module communicates with the Android side through HAB to perform cross-system communication;
[0063] According to the communication of the mcu_service module, cross-system communication is performed with the Android side through HAB, the can_simulator module communicates with the mcu_service module, and the
[0064] According to the communication between the can_simulator module and the mcu_service module, the QNX module and the Android module perform cross-system communication.
[0065] Furthermore, the QNX module also includes: a shared memory shm_spi2 module, a shared memory shm_gvm2 module and a sysctrl_service module;
[0066] The can_simulator module communicates with the sysctrl_service module across processes through the shared memory shm_spi2 module and the shared memory shm_gvm2 module;
[0067] Wherein, the QNX module also includes an AudioFrameWorkService module and a PowerManagerService module;
[0068] According to the communication between the sysctrl_service module and the AudioFrameWorkService module and the PowerManagerService module through the shared memory shm_spi2 module and the shared memory shm_gvm2 module.
[0069] Furthermore, it also includes:
[0070] The can_simulator module determines the CAN signal in communication;
[0071] If the CAN signal is an uplink signal on the QNX side, the CAN signal is sent to the sysctrl_service module through the shared memory shm_spi2 module and the shared memory shm_gvm2 module after initialization, and then distributed to each application;
[0072] The Android side includes one or more applications;
[0073] According to the uplink signal on the Android side, it is sent to the mcu_service module through the sysctrl_service module, and cross-system communication is performed with the Android side through HAB, and distributed to each application.
[0074] Furthermore, it also includes: an MCU module;
[0075] The mcu_service module communicates bidirectionally with the MCU module;
[0076] The MCU module is used to control the configuration logic of each sub-module under the QNX module;
[0077] The configuration logic includes, after the can_simulator module is started, loading the CAN matrix;
[0078] According to the CAN matrix, CAN signals are parsed and processed, and stored in a MAP data structure;
[0079] Control the CAN signal sending cycle by presetting the time interval of CAN signal cyclic sending;
[0080] Through FIAG judgment, simulate the sending of a single CAN signal or the CAN signal of the entire vehicle link;
[0081] By querying the MAP data structure, it is determined whether the CAN signal to be sent is an uplink signal;
[0082] If it is an uplink signal, query the MAP data structure to see if it is a CAN signal on the QNX side;
[0083] If it is a CAN signal on the QNX side, it is sent to the sysctrl_service module through the shared memory shm_spi2, and is sent to the AudioFrameWorkService module and the PowerManagerService module;
[0084] By controlling the CAN signal sending cycle, the resource occupancy and processing rate between cycles are compared.
[0085] According to three aspects of the present invention, a whole vehicle CAN link monitoring device is provided, and the whole vehicle CAN link monitoring device comprises:
[0086] Planning module, used to plan the CAN signals on the vehicle CAN link;
[0087] The planning of the CAN signal on the vehicle CAN link includes dividing the CAN signal into an uplink signal and a downlink signal, and dividing the CAN signal into a QNX side signal and an Android side signal;
[0088] A setting module is used to set test items according to the division of CAN signals into uplink signals and downlink signals and the division of CAN signals into QNX side signals and Android side signals;
[0089] A control module, used to control the time interval of cyclic transmission of CAN signals;
[0090] The monitoring module is used to monitor the processing of the CAN signal and the resource consumption of the system in the test project according to the time interval of controlling the CAN signal to be sent cyclically.
[0091] According to four aspects of the present invention, there is provided an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0092] A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of the vehicle CAN link monitoring method.
[0093] According to five aspects of the present invention, a computer-readable storage medium is provided, including: a computer program executable by an electronic device is stored therein, and when the computer program runs on the electronic device, the electronic device executes the steps of the vehicle CAN link monitoring method.
[0094] According to six aspects of the present invention, there is provided a vehicle, comprising:
[0095] An electronic device, used to implement the steps of the vehicle CAN link monitoring method;
[0096] A processor, wherein the processor runs a program, and when the program runs, the steps of the vehicle CAN link monitoring method are executed from the data output by the electronic device;
[0097] The storage medium is used to store a program, and when the program is running, the steps of the vehicle CAN link monitoring method are executed for the data output from the electronic device.
[0098] Through the above scheme, the following beneficial technical effects are obtained:
[0099] This application plans the CAN signals of the entire vehicle CAN link based on a dual system, making the test project objectives clear. The test results reflect the overall system resource consumption and CAN processing capabilities, which expands the test scope compared to point-to-point testing.
[0100] This application selects a subsystem as the test object, tests the degree to which it is affected by CAN signal processing in the operation of the entire system, and reasonably designs the information processing task.
[0101] This application tests the signal processing capability of the system side at different signal frequencies by controlling the time interval of cyclic transmission of CAN signals, making it easier to understand the overall system resource consumption and CAN processing capability. BRIEF DESCRIPTION OF THE DRAWINGS
[0102] Figure 1 It is a flow chart of a vehicle CAN link monitoring method provided by one or more embodiments of the present invention.
[0103] Figure 2 It is a structural diagram of a whole vehicle CAN link monitoring system provided by one or more embodiments of the present invention.
[0104] Figure 3 It is a structural diagram of a whole vehicle CAN link monitoring device provided by one or more embodiments of the present invention.
[0105] Figure 4 It is a schematic diagram of CAN signal classification according to a specific embodiment of the present invention.
[0106] Figure 5 It is a schematic diagram of a CAN communication link under a dual system according to a specific embodiment of the present invention.
[0107] Figure 6 It is a schematic diagram of a CAN signal test process according to a specific embodiment of the present invention.
[0108] Figure 7 It is a schematic diagram of a CAN signal structure of a specific embodiment of the present invention.
[0109] Figure 8 It is a schematic diagram of a MAP data structure of a specific embodiment of the present invention.
[0110] Fig. 9 It is a structural block diagram of an electronic device of a vehicle CAN link monitoring method provided by one or more embodiments of the present invention. DETAILED DESCRIPTION
[0111] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0112] Figure 1It is a flow chart of a vehicle CAN link monitoring method provided by one or more embodiments of the present invention.
[0113] like Figure 1 The vehicle CAN link monitoring method shown includes:
[0114] Step S1, based on the dual-system vehicle of Android and QNX, planning the CAN signal on the CAN link of the whole vehicle;
[0115] Step S2, planning the CAN signal on the vehicle CAN link includes dividing the CAN signal into an uplink signal and a downlink signal and dividing the CAN signal into a QNX side signal and an Android side signal;
[0116] Step S3, setting test items according to the division of the CAN signal into an uplink signal and a downlink signal and the division of the CAN signal into a QNX side signal and an Android side signal;
[0117] Step S4, controlling the time interval for cyclically sending the CAN signal;
[0118] Step S5, monitoring the processing of the CAN signal and the resource consumption of the system in the test project according to the time interval of controlling the cyclic sending of the CAN signal.
[0119] Specifically, in one embodiment, the vehicle system includes a dual system of Android and QNX, there is upper and lower layer communication on the Android side, there is upper and lower layer communication on the QNX side, and the Android side and the QNX side are interconnected based on HAB.
[0120] In one embodiment, based on CAN signals or data between Android subsystems, between QNX subsystems, and between Android and QNX systems, test items are set. The items may include selecting two ends of communication of a group of subsystems, or sending and receiving of a group of CAN signals between subsystems.
[0121] In one embodiment, CAN signals have a sending time interval. The closer the time interval, the higher the density of interrupt response, and the greater the resource occupation of the subsystem. In addition to sending and receiving CAN signals (CAN information, CAN data, etc.), the subsystem may also have other task processes. When the time interval is further reduced, it may cause data loss or other task process failures. By controlling the time interval of CAN signal cyclic transmission, monitoring the processing of CAN signals and system resource consumption in the test project, and then evaluating the best solution for CAN signal processing and system resource consumption in various scenarios on the vehicle CAN link.
[0122] In this embodiment, it also includes:
[0123] Setting up a test project includes setting up a test object;
[0124] According to the test object, select the corresponding subsystem to monitor the sending and receiving status of CAN signals;
[0125] Simulate the sending and receiving of CAN signals by controlling the time interval of CAN signal cyclic sending and setting the test object;
[0126] Monitor the interaction of one or more CAN signals on the vehicle CAN link based on the sending and receiving of simulated CAN signals;
[0127] Based on the interaction of one or more CAN signals on the vehicle CAN link, monitor the subsystems involved in the CAN signal and the resource consumption of the system.
[0128] Specifically, in one embodiment, a test object is selected according to the test items. The test object can be a subsystem or a CAN signal transmitted between subsystems. By monitoring the sending and receiving status of CAN signals between subsystems, the quality and resource occupancy of processing and receiving CAN signals are evaluated. For example, if the priority of adjusting the CAN data interrupt in the subsystem parameters is increased, resources can be seized to improve the quality of CAN signal processing, but the resource occupancy is affected. Parameter settings can be improved through monitoring.
[0129] In one embodiment, by controlling the time interval for cyclically sending CAN signals and setting the test object, the sending and receiving of CAN signals are simulated. For example, by shortening the time interval for cyclically sending CAN signals and creating pressure on the subsystem, the processing capability of the subsystem under different receiving or sending states of single or multiple CAN signals can be monitored.
[0130] In this embodiment, it also includes:
[0131] According to the CAN signal reception and transmission between the upper system and the lower system, the uplink signal and the downlink signal are defined;
[0132] Define QNX side signals or Android side signals according to the interaction ends involved in the vehicle CAN link;
[0133] According to the definitions of uplink signal, downlink signal, QNX side signal and Android side signal, the CAN signals on the vehicle CAN link are planned as uplink signal QNX side, uplink signal Android side, downlink signal QNX side and downlink signal Android side;
[0134] Generate a MAP data structure according to the CAN signal planning into QNX side uplink signal, Android side uplink signal, QNX side downlink signal and Android side downlink signal;
[0135] According to the MAP data structure, the transmission path and processing status of the CAN signal on the vehicle CAN link are monitored.
[0136] Specifically, in one embodiment, if the CAN signal parameter attribute value is set to "read", the upper layer reads the lower layer; if the CAN signal parameter attribute value is set to "write", the upper layer writes to the lower layer; in addition to determining whether a single CAN signal is an uplink signal or a downlink signal, it is also necessary to determine whether it is sent to the QNX side or the Android side. Therefore, based on the vehicle CAN link, CAN signals are divided into four types of signals: the QNX side of the uplink signal, the Android side of the uplink signal, the QNX side of the downlink signal, and the Android side of the downlink signal.
[0137] Based on the four types of signals, a MAP data structure is generated. Based on the MAP data structure, the CAN signal to be monitored is selected, that is, the transmission path and processing status of the CAN signal on the vehicle CAN link.
[0138] In this embodiment, it also includes:
[0139] Initialize the configuration file of CAN signal;
[0140] The configuration file includes the MAP data structure of the CAN signal;
[0141] Establish a search based on the MAP data structure of the CAN signal;
[0142] According to the established search, query inter-process communication and inter-system communication;
[0143] Monitor the CAN signals in the communication according to the inter-process communication and / or inter-system communication.
[0144] Specifically, in one embodiment, when starting the vehicle system process monitoring, the program first initializes the configuration file of the CAN signal, the configuration file includes the MAP data structure of the CAN signal, and establishes a search based on the MAP data structure of the CAN signal to query the inter-process communication and inter-system communication. Determine the search under the MAP data structure corresponding to the preset monitoring test object, and monitor the CAN signal in the communication.
[0145] In this embodiment, it also includes:
[0146] According to the MAP data structure, FIAG is set in the monitoring program;
[0147] Filter data streams based on FIAG;
[0148] Filtering the data stream according to FIAG includes determining whether the inter-system signal is a CAN signal according to the FIAG status;
[0149] If it is a CAN signal, determine whether the CAN signal is a single CAN signal;
[0150] If the CAN signal is a single CAN signal, the transmission path and processing status of the signal are monitored;
[0151] By monitoring the transmission path and processing status of the signal, the processing capability of the subsystem at the transmitting end and the subsystem at the receiving end for the single CAN signal and the proportion of system resources occupied are monitored.
[0152] Specifically, in one embodiment, the FIAG data bit is set in the program, and the FIAG data bit is used to determine whether the current data stream is the data of the CAN signal. If it is not the data of the CAN signal, the current data stream is abandoned for monitoring, and if it is a single CAN signal, the transmission path and processing status of the signal are monitored.
[0153] In this embodiment, it also includes:
[0154] If the CAN signal is not a single CAN signal, determine whether the CAN signal is a full-link CAN signal;
[0155] If the CAN signal is a full-link CAN signal, the transmission path and processing status of the signal are monitored;
[0156] Monitoring the transmission path and processing status of the signal involves a subsystem at a transmitting end corresponding to a plurality of subsystems at a receiving end;
[0157] According to the transmission path and processing status of the signal, the processing capability of a transmitting end subsystem and multiple receiving end subsystems for the CAN signal and the proportion of system resources occupied are monitored;
[0158] By monitoring the CAN signal processing capabilities and system resource occupancy ratios of a transmitting subsystem and multiple receiving subsystems, status information on the entire system resource consumption of the full-link CAN signal is obtained.
[0159] Specifically, the FIAG data bit is used to determine whether the current data stream is the data of the full-link CAN signal. If so, the transmission path and processing status of the signal are monitored; the full-link CAN signal may involve a subsystem at the transmitting end sending and a corresponding multiple receiving subsystems receiving. By monitoring the CAN signal processing capabilities and system resource occupancy ratio of a subsystem at the transmitting end and multiple subsystems at the receiving end, the status information of the full-link CAN signal on the resource consumption of the relevant subsystems is obtained, and then the status information of the full-link CAN signal on the resource consumption of the entire system is obtained.
[0160] Figure 2It is a structural diagram of a whole vehicle CAN link monitoring system provided by one or more embodiments of the present invention.
[0161] like Figure 2 The vehicle CAN link simulation system shown includes: Android module, QNX module and CAN communication link module;
[0162] The Android module and the QNX module are connected via the CAN communication link module data;
[0163] CAN communication link module, used to transmit CAN signals, including uplink signals and downlink signals;
[0164] QNX module, used for cross-process communication on the QNX side;
[0165] Android module for sending and receiving CAN signals with QNX module through hardware abstraction layer.
[0166] Specifically, in one embodiment, the vehicle system is a dual system of Android and QNX, and a CAN communication link is established between them. There are four types of signals: uplink and downlink signals within the Android module and the QNX module, uplink signals between the Android module and the QNX module on the QNX side, uplink signals on the Android side, downlink signals on the QNX side, and downlink signals on the Android side. There is cross-process communication on the QNX side, and CAN signals are sent and received between the Android module and the QNX module through the hardware abstraction layer (HAB).
[0167] In this embodiment, the QNX module includes: a can_simulator module;
[0168] The can_simulator module loads the CAN configuration file;
[0169] The CAN configuration file includes the MAP data structure file;
[0170] Initialize the CAN signal of the vehicle according to the loaded CAN configuration file;
[0171] Differentiate and manage CAN signals through MAP data structure;
[0172] The search is established based on distinguishing and managing CAN signals through the MAP data structure.
[0173] Specifically, in one embodiment, the can_simulator module is used for the whole vehicle full link CAN signal simulation application service. The can_simulator module loads the CAN configuration file, including the MAP data structure file; initializes the CAN signal of the whole vehicle according to the loaded CAN configuration file, such as relevant parameters, preset flags, interrupt priority, etc.; establishes a search after distinguishing and managing the CAN signal through the MAP data structure, and selects the test items to be monitored through the search.
[0174] In this embodiment, the QNX module further includes: a shared memory shm_spi1 module and a shared memory sshm_gvm1 module;
[0175] The can_simulator module creates a client instantiation class by initializing the shared memory shm_spi1 module and the shared memory shm_gvm1 module;
[0176] According to the creation of client instantiation class, cross-process communication in QNX.
[0177] Specifically, in one embodiment, shared memory shm_spi1, shared memory shm_spi2, shared memory shm_gvm1, and shared memory shm_gvm2 are used for inter-process communication in QNX.
[0178] For example, the can_simulator module creates a client instantiation class by initializing the shared memory shm_spi1 module and the shared memory shm_gvm1 module, and performs cross-process communication in QNX based on the created client instantiation class.
[0179] In this embodiment, the QNX module further includes: a resource management module;
[0180] The can_simulator module creates client instantiation classes through the resource management module in QNX;
[0181] QNX modules also include,mcu_service module;
[0182] According to the creation of the client instantiation class, the can_simulator module communicates with the mcu_service module;
[0183] The mcu_service module communicates with the Android side through HAB across systems;
[0184] According to the mcu_service module communication, cross-system communication is carried out with the Android side through HAB, and the can_simulator module communicates with the mcu_service module.
[0185] According to the can_simulator module communicating with the mcu_service module, the QNX module and the Android module perform cross-system communication.
[0186] Specifically, in one embodiment, mcu_service communicates with Android across systems through HAB, and the underlying layer also communicates in a shared memory manner.
[0187] In one embodiment, can_simulator uses the resource management module in QNX
[0188] / dev / mcu_prop, creates a client instantiation class for communicating with the mcu_service service, and mcu_service communicates with Android across systems.
[0189] In this embodiment, the QNX module further includes: a shared memory shm_spi2 module, a shared memory shm_gvm2 module and a sysctrl_service module;
[0190] The can_simulator module communicates with the sysctrl_service module across processes through the shared memory shm_spi2 module and the shared memory shm_gvm2 module;
[0191] Among them, QNX modules also include AudioFrameWorkService module and PowerManagerService module;
[0192] According to the sysctrl_service module, the AudioFrameWorkService module and the PowerManagerService module communicate through the shared memory shm_spi2 module and the shared memory shm_gvm2 module.
[0193] Specifically, in one embodiment, the can_simulator module communicates with sysctrl_service across processes through the shared memory shm_spi2 module and the shm_gvm2 module.
[0194] Sysctrl_service and upper-level modules such as AudioFrameWorkService and PowerManagerService also communicate with each other through shared memory.
[0195] In this embodiment, it also includes:
[0196] The can_simulator module determines the CAN signal in communication;
[0197] If the CAN signal is an uplink signal on the QNX side, the CAN signal is sent to the sysctrl_service module through the shared memory shm_spi2 module and the shared memory shm_gvm2 module after initialization, and then distributed to each application;
[0198] The Android side includes one or more applications;
[0199] According to the uplink signal on the Android side, it is sent to the mcu_service module through the sysctrl_service module, and cross-system communication with the Android side is carried out through HAB to distribute to various applications.
[0200] Specifically, in one embodiment, the can_simulator module determines the CAN signal, for example, the uplink signal QNX side, the uplink signal on the QNX side is initialized and processed, and then the CAN signal is distributed to the sysctrl_service service (module) through the shared memory, and then distributed to each application. The uplink signal Android side is sent to the mcu_service module through the resource management module / dev / mcu_prop, and then sent to the Android side through the Qualcomm HAB channel.
[0201] In this embodiment, it also includes: an MCU module;
[0202] The mcu_service module communicates bidirectionally with the MCU module;
[0203] MCU module, used to control the configuration logic of each sub-module under the QNX module;
[0204] The configuration logic includes, after the can_simulator module is started, loading the CAN matrix;
[0205] According to the CAN matrix, CAN signals are parsed and processed and stored in the MAP data structure;
[0206] Control the CAN signal sending cycle by presetting the time interval of CAN signal cyclic sending;
[0207] Through FIAG judgment, simulate the sending of a single CAN signal or the CAN signal of the entire vehicle link;
[0208] By querying the MAP data structure, it is determined whether the CAN signal to be sent is an uplink signal;
[0209] If it is an uplink signal, query the MAP data structure to see if it is a CAN signal on the QNX side;
[0210] If it is a CAN signal on the QNX side, it is sent to the sysctrl_service module through the shared memory shm_spi2, and then to the AudioFrameWorkService module and the PowerManagerService module;
[0211] By controlling the CAN signal sending cycle, the resource occupancy and processing rate between cycles are compared.
[0212] Specifically, in one embodiment, after the can_simulator service is started, the CAN matrix is loaded, CAN signals are parsed and processed, and the parsing results are stored in a MAP data structure for search and access.
[0213] By obtaining the signal sending interval time parameters, CAN signal sending control with different cycles is performed.
[0214] FLAG (flag bit) is used to determine whether the simulation is sending a single CAN signal or a CAN signal for the entire vehicle's entire link; if FLAG is neither a single CAN signal nor a full-link CAN signal, this round of monitoring program exits.
[0215] By querying the MAP data structure, it is determined whether the single CAN signal to be sent is an uplink signal or a downlink signal. According to the uplink signal or downlink signal, different program logics are followed; if it is an uplink signal, the logic judgment continues; otherwise, the CAN signal is sent. If the corresponding data is not found in the MAP data structure, the transmission of this round of monitoring fails and exits.
[0216] If the query shows that it is an uplink or downlink signal, it is also necessary to query the MAP data structure to determine whether the signal is on the QNX side or the Android side; if it is on the QNX side, it is sent to the sysctrl_service service through the shared memory shm_spi2, and then sent to the upper-level modules such as AudioFrameWorkService and PowerManagerService through the shared memory.
[0217] Otherwise, if the CAN signal to be sent is not found in the MAP data structure, the sending will fail and the program will exit.
[0218] When all processes are processed, change the parameters of the cycle and continue to send single / whole vehicle full-link CAN signals, monitoring the signal processing status and resource consumption status under different cycle cycles.
[0219] Figure 3It is a structural diagram of a whole vehicle CAN link monitoring device provided by one or more embodiments of the present invention.
[0220] like Figure 3 The vehicle CAN link monitoring device shown includes: a planning module, a setting module, a control module, and a monitoring module;
[0221] Planning module, used to plan the CAN signals on the vehicle CAN link;
[0222] Planning the CAN signals on the vehicle CAN link includes dividing the CAN signals into uplink signals and downlink signals, and dividing the CAN signals into QNX side signals and Android side signals;
[0223] A setting module is used to set test items according to the division of CAN signals into uplink signals and downlink signals and the division of CAN signals into QNX side signals and Android side signals;
[0224] A control module, used to control the time interval of cyclic transmission of CAN signals;
[0225] The monitoring module is used to monitor the processing of the CAN signal and the resource consumption of the system in the test project according to the time interval of controlling the CAN signal to be sent cyclically.
[0226] It is worth noting that although the present system only discloses a planning module, a setting module, a control module, and a monitoring module, it does not mean that the present device is limited to the above-mentioned basic functional modules. Rather, what the present invention wants to express is that, based on the above-mentioned basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with the prior art to form an infinite number of embodiments or technical solutions. In other words, the present system is open rather than closed. Just because the present embodiment only discloses individual basic functional modules, it cannot be considered that the scope of protection of the claims of the present invention is limited to the above-mentioned disclosed basic functional modules.
[0227] Through the above scheme, the following beneficial technical effects are obtained:
[0228] This application plans the CAN signals of the entire vehicle CAN link based on a dual system, making the test project objectives clear. The test results reflect the overall system resource consumption and CAN processing capabilities, which expands the test scope compared to point-to-point testing.
[0229] This application selects a subsystem as the test object, tests the degree to which it is affected by CAN signal processing in the operation of the entire system, and reasonably designs the information processing task.
[0230] This application tests the signal processing capability of the system side at different signal frequencies by controlling the time interval of cyclic transmission of CAN signals, making it easier to understand the overall system resource consumption and CAN processing capability.
[0231] Figure 4 It is a schematic diagram of CAN signal classification according to a specific embodiment of the present invention.
[0232] Figure 5 It is a schematic diagram of a CAN communication link under a dual system according to a specific embodiment of the present invention.
[0233] Figure 6 It is a schematic diagram of a CAN signal test process according to a specific embodiment of the present invention.
[0234] Figure 7 It is a schematic diagram of a CAN signal structure of a specific embodiment of the present invention.
[0235] Figure 8 It is a schematic diagram of a MAP data structure of a specific embodiment of the present invention.
[0236] In a specific embodiment, a vehicle-wide full-link CAN signal simulation solution is provided, such as Figure 4 As shown in the figure, the CAN signal is divided into uplink signal (read) and downlink signal (write), as well as QNX side signal and Android side signal. This can not only simulate a single CAN signal, which is convenient for R&D personnel to debug signal problems, but also simulate all CAN signals of the entire vehicle link, thus achieving a real real vehicle environment.
[0237] By further increasing the interval time for cyclically sending CAN signals, R&D personnel can adjust the CAN signal sending rate to view the corresponding application's ability to process CAN signals and the system load occupied by the application.
[0238] In another specific embodiment, the uplink signal, the CAN signal is a read attribute, and the upper layer reads the attribute value of the CAN signal from the lower layer; the downlink signal, the CAN signal is a write attribute, and the upper layer writes the attribute value of the CAN signal to the lower layer.
[0239] First, for a single CAN signal, it is necessary to determine whether it is an uplink or downlink signal, and then determine whether it is sent to the QNX side or the Android side;
[0240] The vehicle CAN signal is divided into four types of signals: the QNX side of the uplink signal, the Android side of the uplink signal, the QNX side of the downlink signal, and the Android side of the downlink signal.
[0241] like Figure 5As shown, after the vehicle CAN signal simulation service can_simulator is started, the CAN matrix configuration file is loaded and all CAN signals are initialized. The CAN signals are distinguished and managed through the MAP data structure, and a fast search can be performed.
[0242] can_simulator creates two client instantiation classes for cross-process communication in QNX by initializing the shared memory shm_spi1 and shm_gvm1 modules;
[0243] can_simulator creates a client instantiation class through the resource management module / dev / mcu_prop in QNX, which is used to communicate with the mcu_service service, and mcu_service communicates with Android across systems.
[0244] Among them, mcu_service communicates with Android across systems through Qualcomm HAB, and the underlying layer also communicates in a shared memory manner.
[0245] can_simulator communicates with sysctrl_service across processes via the shared memory shm_spi2 and shm_gvm2 modules.
[0246] Sysctrl_service and upper-level modules such as AudioFrameWorkService and PowerManagerService also communicate with each other through shared memory.
[0247] can_simulator judges the CAN signal, for example, the QNX side of the uplink signal, and distributes the CAN signal to the sysctrl_service service through shared memory after initialization and processing, and then distributes it to each application. The Android side of the uplink signal is sent to mcu_service through the resource management module / dev / mcu_prop, and then sent to Android through the Qualcomm HAB channel.
[0248] mcu_service and MCU communicate bidirectionally via SPI, and MCU is responsible for the underlying configuration.
[0249] In another embodiment, Figure 6 As shown, after the can_simulator service is started and the CAN matrix is loaded, the CAN signal is parsed and processed and stored in the MAP data structure to facilitate signal access;
[0250] By obtaining the signal sending interval, CAN signals with different cycles are sent (for example, 100ms);
[0251] Use FLAG to determine whether to simulate sending a single CAN signal or a CAN signal for the entire vehicle link; if FLAG is neither a single CAN signal nor a full-link CAN signal, the system fails and exits.
[0252] By querying the MAP data structure, it is determined whether the signal to be sent is an uplink signal or a downlink signal, and different program logic needs to be followed; if it is an uplink signal, the logical judgment continues; otherwise, the CAN signal to be sent is not found in the MAP data structure, and the sending fails and exits.
[0253] Then, by querying the MAP data structure, it is determined whether the signal is on the QNX side or the Android side; if it is on the QNX side, it is sent to the sysctrl_service service through the shared memory shm_spi2, and then sent to the upper-level modules such as AudioFrameWorkService and PowerManagerService through the shared memory.
[0254] Otherwise, if the CAN signal to be sent is not found in the MAP data structure, the sending will fail and exit.
[0255] After all processes are completed, different cycles are required to send single / whole vehicle full-link CAN signals.
[0256] In another embodiment,
[0257] shm_spi1, shm_spi2, shm_gvm1, shm_gvm2: Shared memory in QNX, used for inter-process communication.
[0258] Resource management module / dev / mcu_prop: The resource manager in QNX can be considered as a device driver.
[0259] can_simulator: vehicle-wide CAN signal simulation application service.
[0260] sysctrl_service: Service for handling and distributing CAN signals.
[0261] mcu_service: used to receive CAN signals sent by MCU.
[0262] VehicleHAL: Android-side vehicle hardware abstraction layer (HAL) interface definition.
[0263] HAB: A driver or service component used for communication between user space and kernel space, and for shared memory data exchange between HOST and Gest VM.
[0264] flag: It is an input parameter for executing the can_simulator program, and is used to determine whether to send a single CAN signal or a full-link CAN signal for the entire vehicle.
[0265] In another embodiment, in the vehicle full-link CAN signal simulation function:
[0266] Sending at different cycles, including but not limited to 50ms / 100ms / 200ms / 500ms for CAN signal sending;
[0267] In different cycles, you can observe the CPU occupancy and memory occupancy of each thread in the mcu_service and sysctrl_service applications, so as to optimize the application and improve the robustness and fault tolerance of the application.
[0268] In another embodiment, in a single CAN signal simulation function:
[0269] During the CAN signal development and testing process, it is convenient to debug the CAN signal path without the need to build the software and hardware environment, and to repeatedly browse the CAN matrix to search and configure the CAN signal data structure for assembly and sending.
[0270] When debugging a single signal, you can send a single CAN signal with different values to perform fault tolerance testing;
[0271] In another embodiment, there are four types of CAN signals: QNX side of upstream signal, Android side of upstream signal, QNX side of downstream signal and Android side of downstream signal.
[0272] For example, the CAN signal of vehicle speed is displayed by the upper-layer QNX-side instrument application by reading the underlying signal through read. This signal belongs to the QNX side of the uplink signal (read). Similarly, the Android side reads the underlying signal through read, which belongs to the Android side of the uplink signal.
[0273] For example, the signal for turning on the Bluetooth function is a signal that the upper-layer Android application writes to the underlying layer, which requires the MCU to set up the hardware module. This signal belongs to the Android side of the downlink signal (write).
[0274] mcu_service and MCU communicate bidirectionally via SPI, and MCU is used to control related hardware modules.
[0275] In another embodiment, Figure 7 As shown in the figure, CAN signal communication protocol: VehicleCanSigProperty structure. "int32_t prop" refers to the prop property value of the CAN signal.
[0276] In another embodiment, Figure 8 As shown, the MAP data structure: MAP key: int32_t type; map vaule: VehicleCanSigPropertyT is the structure of CAN signal.
[0277] Fig. 9 It is a structural block diagram of an electronic device of a vehicle CAN link monitoring method provided by one or more embodiments of the present invention.
[0278] like Fig. 9 As shown, the present application provides an electronic device, including: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus;
[0279] A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of a whole vehicle CAN link monitoring method.
[0280] The present application also provides a computer-readable storage medium, which stores a computer program that can be executed by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of a vehicle CAN link monitoring method.
[0281] The present application also provides a vehicle, comprising:
[0282] An electronic device for implementing the steps of a vehicle CAN link monitoring method;
[0283] A processor, wherein the processor runs a program, and when the program runs, the steps of the vehicle CAN link monitoring method are executed based on the data output by the electronic device;
[0284] The storage medium is used to store a program, and when the program is running, it executes the steps of the vehicle CAN link monitoring method for the data output from the electronic device.
[0285] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0286] The electronic device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory. The operating system can be any one or more computer operating systems that implement electronic device control through a process, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a Windows operating system. In addition, in an embodiment of the present invention, the electronic device can be a handheld device such as a smart phone or a tablet computer, or can be an electronic device such as a desktop computer or a portable computer, which is not particularly limited in the embodiment of the present invention.
[0287] The execution subject of the electronic device control in the embodiment of the present invention may be an electronic device, or a functional module in the electronic device that can call and execute a program. The electronic device may obtain the firmware corresponding to the storage medium. The firmware corresponding to the storage medium is provided by the supplier. The firmware corresponding to different storage media may be the same or different, which is not limited here. After the electronic device obtains the firmware corresponding to the storage medium, the firmware corresponding to the storage medium may be written into the storage medium, specifically, the firmware corresponding to the storage medium may be burned into the storage medium. The process of burning the firmware into the storage medium may be implemented using existing technology, which will not be described in detail in the embodiment of the present invention.
[0288] The electronic device may also obtain a reset command corresponding to the storage medium. The reset command corresponding to the storage medium is provided by the supplier. The reset commands corresponding to different storage media may be the same or different, and are not limited here.
[0289] At this time, the storage medium of the electronic device is a storage medium in which the corresponding firmware is written, and the electronic device can respond to the reset command corresponding to the storage medium in the storage medium in which the corresponding firmware is written, so that the electronic device resets the storage medium in which the corresponding firmware is written according to the reset command corresponding to the storage medium. The process of resetting the storage medium according to the reset command can be implemented by the existing technology and will not be described in detail in the embodiments of the present invention.
[0290] For the convenience of description, the above devices are described in terms of functions and are divided into various units and modules. Of course, when implementing the present application, the functions of each unit and module can be implemented in the same or multiple software and / or hardware.
[0291] Those skilled in the art will appreciate that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined.
[0292] For the method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know 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, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know 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.
[0293] It can be known from the description of the above implementation modes that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute the methods described in the various implementation modes of the present application or certain parts of the implementation modes.
[0294] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A vehicle CAN link monitoring method, characterized in that: The vehicle CAN link monitoring method comprises: For dual-system vehicles based on Android and QNX, plan the CAN signals on the vehicle CAN link; The planning of the CAN signal on the vehicle CAN link includes dividing the CAN signal into an uplink signal and a downlink signal and dividing the CAN signal into a QNX side signal and an Android side signal; Set test items according to the division of CAN signals into uplink signals and downlink signals and the division of CAN signals into QNX side signals and Android side signals; Control the time interval for cyclic sending of CAN signals; According to the time interval for controlling the cyclic sending of the CAN signal, the processing of the CAN signal and the resource consumption of the system in the test project are monitored.
2. The vehicle CAN link monitoring method according to claim 1 is characterized in that: Also includes: The setting of the test items includes setting the test objects; According to the test object, a corresponding subsystem is selected to monitor the sending and receiving status of CAN signals; According to the time interval of controlling the cyclic transmission of the CAN signal and the setting of the test object, simulating the transmission and reception of the CAN signal; Monitoring the interaction of one or more CAN signals on the vehicle CAN link according to the sending and receiving of the simulated CAN signal; Based on the interaction of one or more CAN signals on the vehicle CAN link, monitor the subsystems involved in the CAN signal and the resource consumption of the system.
3. The vehicle CAN link monitoring method according to claim 2 is characterized in that: Also includes: According to the CAN signal reception and transmission between the upper system and the lower system, the uplink signal and the downlink signal are defined; Define QNX side signals or Android side signals according to the interaction ends involved in the vehicle CAN link; According to the definitions of uplink signal, downlink signal, QNX side signal and Android side signal, the CAN signals on the vehicle CAN link are planned as uplink signal QNX side, uplink signal Android side, downlink signal QNX side and downlink signal Android side; Generate a MAP data structure according to the CAN signal planning into QNX side uplink signal, Android side uplink signal, QNX side downlink signal and Android side downlink signal; According to the MAP data structure, the transmission path and processing status of the CAN signal on the vehicle CAN link are monitored.
4. The vehicle CAN link monitoring method according to claim 3 is characterized in that: Also includes: Initialize the configuration file of CAN signal; The configuration file includes the MAP data structure of the CAN signal; Establishing a search based on the MAP data structure of the CAN signal; Establishing a search according to the above, querying inter-process communication and inter-system communication; Monitor the CAN signals in the communication according to the inter-process communication and / or inter-system communication.
5. The vehicle CAN link monitoring method according to claim 4 is characterized in that: Also includes: According to the MAP data structure, FIAG is set in the monitoring program; Filter data streams based on FIAG; The data flow is filtered according to FIAG Including, judging whether the inter-system signal is a CAN signal according to the FIAG status; If it is a CAN signal, determine whether the CAN signal is a single CAN signal; If the CAN signal is a single CAN signal, the transmission path and processing status of the signal are monitored; According to the monitoring of the transmission path and processing status of the signal, the processing capability of the subsystem at the transmitting end and the subsystem at the receiving end for the single CAN signal and the proportion of system resources occupied are monitored.
6. The vehicle CAN link monitoring method according to claim 5 is characterized in that: Also includes: If the CAN signal is not a single CAN signal, determine whether the CAN signal is a full-link CAN signal; If the CAN signal is a full-link CAN signal, the transmission path and processing status of the signal are monitored; The monitoring of the transmission path and processing status of the signal involves a subsystem at a transmitting end corresponding to a plurality of subsystems at a receiving end; According to the monitoring of the transmission path and processing status of the signal, monitoring the processing capability of a subsystem at a transmitting end and multiple subsystems at receiving ends for the CAN signal and the proportion of system resources occupied; By monitoring the CAN signal processing capabilities and system resource occupancy ratios of a transmitting subsystem and multiple receiving subsystems, status information on the entire system resource consumption of the full-link CAN signal is obtained.
7. A vehicle CAN link simulation system, characterized in that: The vehicle CAN link simulation system includes: an Android module, a QNX module and a CAN communication link module; The Android module and the QNX module are data connected via the CAN communication link module; The CAN communication link module is used to transmit CAN signals, including uplink signals and downlink signals; The QNX module is used for cross-process communication on the QNX side; The Android module is used to send and receive CAN signals with the QNX module through a hardware abstraction layer.
8. The vehicle CAN link simulation system according to claim 7, characterized in that: The QNX module includes: a can_simulator module; The can_simulator module loads the CAN configuration file; The CAN configuration file includes a MAP data structure file; Initialize the CAN signal of the vehicle according to the CAN configuration file loaded; Differentiate and manage CAN signals through MAP data structure; The search is established based on distinguishing and managing CAN signals through the MAP data structure.
9. The vehicle CAN link simulation system according to claim 8, characterized in that: The QNX module also includes: a shared memory shm_spi1 module and a shared memory sshm_gvm1 module; The can_simulator module creates a client instantiation class by initializing the shared memory shm_spi1 module and the shared memory shm_gvm1 module; Create a client instantiation class as described above to perform cross-process communication in QNX.
10. The vehicle CAN link simulation system according to claim 9, characterized in that: The QNX module also includes: a resource management module; The can_simulator module creates a client instantiation class through the resource management module in QNX; The QNX module also includes an mcu_service module; According to the creation of the client instantiation class, the can_simulator module communicates with the mcu_service module; The mcu_service module communicates with the Android side through HAB to perform cross-system communication; According to the communication of the mcu_service module, cross-system communication is performed with the Android side through HAB, the can_simulator module communicates with the mcu_service module, and the According to the communication between the can_simulator module and the mcu_service module, the QNX module and the Android module perform cross-system communication.
11. The vehicle CAN link simulation system according to claim 10, characterized in that: The QNX module also includes: a shared memory shm_spi2 module, a shared memory shm_gvm2 module and a sysctrl_service module; The can_simulator module communicates with the sysctrl_service module across processes through the shared memory shm_spi2 module and the shared memory shm_gvm2 module; Wherein, the QNX module also includes an AudioFrameWorkService module, PowerManagerService module; According to the communication between the sysctrl_service module and the AudioFrameWorkService module and the PowerManagerService module through the shared memory shm_spi2 module and the shared memory shm_gvm2 module.
12. The vehicle CAN link simulation system according to claim 11, characterized in that: Also includes: The can_simulator module determines the CAN signal in communication; If the CAN signal is an uplink signal on the QNX side, the CAN signal is sent to the sysctrl_service module through the shared memory shm_spi2 module and the shared memory shm_gvm2 module after initialization, and then distributed to each application; The Android side includes one or more applications; According to the uplink signal on the Android side, it is sent to the mcu_service module through the sysctrl_service module, and cross-system communication is performed with the Android side through HAB, and distributed to each application.
13. The vehicle CAN link simulation system according to claim 12, characterized in that: Also includes: MCU module; The mcu_service module communicates bidirectionally with the MCU module; The MCU module is used to control the configuration logic of each sub-module under the QNX module; The configuration logic includes, after the can_simulator module is started, loading the CAN matrix; According to the CAN matrix, CAN signals are parsed and processed, and stored in a MAP data structure; Control the CAN signal sending cycle by presetting the time interval of CAN signal cyclic sending; Through FIAG judgment, simulate the sending of a single CAN signal or the CAN signal of the entire vehicle link; By querying the MAP data structure, it is determined whether the CAN signal to be sent is an uplink signal; If it is an uplink signal, query the MAP data structure to see if it is a CAN signal on the QNX side; If it is a CAN signal on the QNX side, it is sent to the sysctrl_service module through the shared memory shm_spi2, and is sent to the AudioFrameWorkService module and the PowerManagerService module; By controlling the CAN signal sending cycle, the resource occupancy and processing rate between cycles are compared.
14. A vehicle CAN link monitoring device, characterized in that: The vehicle CAN link monitoring device comprises: Planning module, used to plan the CAN signals on the vehicle CAN link; The planning of the CAN signal on the vehicle CAN link includes dividing the CAN signal into an uplink signal and a downlink signal, and dividing the CAN signal into a QNX side signal and an Android side signal; A setting module is used to set test items according to the division of CAN signals into uplink signals and downlink signals and the division of CAN signals into QNX side signals and Android side signals; A control module, used to control the time interval of cyclic transmission of CAN signals; The monitoring module is used to monitor the processing of the CAN signal and the resource consumption of the system in the test project according to the time interval of controlling the CAN signal to be sent cyclically.
15. An electronic device, characterized in that: include: A processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of the vehicle CAN link monitoring method according to any one of claims 1 to 6.
16. A computer-readable storage medium, characterized in that: include: It stores a computer program that can be executed by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of the vehicle CAN link monitoring method described in any one of claims 1 to 6.
17. A vehicle, characterized in that: include: An electronic device, used to implement the steps of the vehicle CAN link monitoring method according to any one of claims 1 to 6; A processor, wherein the processor runs a program, and when the program runs, data output from the electronic device executes the steps of the vehicle CAN link monitoring method according to any one of claims 1 to 6; A storage medium is used to store a program, and when the program is running, it executes the steps of the vehicle CAN link monitoring method according to any one of claims 1 to 6 for data output from the electronic device.
