Data stream selection control method and device, equipment and storage medium
By configuring the mutual exclusion system list of the controller area network bus, the system mutual exclusion problem when selecting multiple system data streams in vehicle diagnostics is solved, and stable data stream refresh and efficient data stream viewing are achieved.
Patent Information
- Application Number
- CN202411380993.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2044-09-29
AI Technical Summary
During vehicle diagnostics, system mutual exclusion occurs when selecting multiple system data streams, leading to CAN bus communication abnormalities and refresh failures, making it impossible to view multiple system data streams simultaneously.
By receiving system information from the vehicle, the system configures a list of mutually exclusive systems on the controller area network bus, selects and controls the data flow of the electronic control unit based on this list, generates a data flow selection control menu, and sets the mutually exclusive systems to a disabled state.
Ensure that no communication errors occur when refreshing data streams from multiple systems, thereby improving data stream viewing efficiency and user experience.
Smart Images

Figure CN119270823A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle diagnosis technology, and in particular to a data stream selection control method, device, equipment and storage medium. Background Art
[0002] When using diagnostic equipment to diagnose the vehicle being tested, it is necessary to view data stream data across systems. However, when selecting multi-system data streams, there may be system mutual exclusion on the same CAN (Controller Area Network) bus of the vehicle, that is, the data streams of two mutually exclusive systems cannot be viewed at the same time, so it is necessary to control the selection of mutually exclusive systems.
[0003] The current solution does not have a multi-select system to restrict, resulting in the data stream refresh in different vehicle electronic control units ECU (Electronic Control Unit) simultaneously selecting two mutually exclusive systems for electronic control unit refresh when refreshing multiple system data streams, which will cause CAN bus communication abnormalities, refresh failure, or switching systems back and forth resulting in untimely refresh data, and then prompting the user that the selected system cannot be accessed at the same time, and cannot solve the problem of viewing multiple system data streams in the case of multiple system mutual exclusion. Therefore, it is urgent to propose a solution that can perform data stream selection control in the case of system mutual exclusion.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present application is to provide a data stream selection control method, device, equipment and storage medium, aiming to solve the technical problem of abnormal viewing of data streams when multiple systems are mutually exclusive.
[0006] To achieve the above object, the present application proposes a data stream selection control method, which is applied to a diagnosis end and includes the following steps:
[0007] Receiving corresponding system information of the electronic control unit on the controller area network bus sent by the vehicle end;
[0008] According to the system information of the electronic control unit, a mutually exclusive system list of the corresponding controller area network bus is configured;
[0009] The data flow of the electronic control unit is selectively controlled based on the mutually exclusive system list.
[0010] In one embodiment, the step of configuring the mutually exclusive system list of the corresponding controller area network bus according to the system information of the electronic control unit includes:
[0011] Determine the electronic control unit connected to each controller area network bus according to the system information of the electronic control unit;
[0012] Based on the connected electronic control units, obtaining corresponding mutually exclusive system information of the electronic control units;
[0013] According to the mutually exclusive system information of the electronic control unit, a mutually exclusive system list of the corresponding controller area network bus is configured and generated.
[0014] In one embodiment, the step of selectively controlling the data flow of the electronic control unit based on the mutually exclusive system list includes:
[0015] Initializing the diagnostic interface of the diagnostic terminal based on the mutually exclusive system list and generating a data stream selection control menu;
[0016] Based on the data stream selection control menu, the data stream of the electronic control unit is selectively controlled.
[0017] In one embodiment, the step of selecting and controlling the data stream of the electronic control unit based on the data stream selection control menu includes:
[0018] receiving a data stream selection instruction issued by a user;
[0019] Acquire the target data stream selected by the user and the target system where the target data stream is located according to the data stream instruction;
[0020] Based on the data stream selection control menu, the mutually exclusive system of the target system in the data stream selection control menu is set to a disabled state.
[0021] In one embodiment, the method further comprises:
[0022] Receive modification operation instructions;
[0023] The mutually exclusive system list is modified according to the modification operation instruction, so that a modified data stream selection control menu is generated according to the mutually exclusive system list after the modification operation.
[0024] In one embodiment, the data stream selection control method is applied to a vehicle end, and the method includes:
[0025] Scanning the controller area network bus of the target vehicle, acquiring the electronic control unit on each controller area network bus, and obtaining the corresponding system information of the electronic control unit;
[0026] The corresponding system information of the electronic control unit is sent to the diagnosis end, so that the diagnosis end configures a mutually exclusive system list according to the system information of the electronic control unit and selectively controls the data flow of the electronic control unit.
[0027] In one embodiment, the step of scanning the controller area network bus of the target vehicle, acquiring the electronic control unit on each controller area network bus, and obtaining the corresponding data stream of the electronic control unit includes:
[0028] Initialize multithreading of target vehicle;
[0029] Scanning the controller area network bus of the target vehicle through multi-threading to obtain bus information of the controller area network bus;
[0030] The bus information is analyzed to obtain the electronic control units on each controller area network bus, and obtain the corresponding data stream of the electronic control units.
[0031] In addition, to achieve the above-mentioned purpose, the present application also proposes a data stream selection control device, the data stream selection control device comprising:
[0032] An information receiving module, used for receiving corresponding system information of the electronic control unit on the controller area network bus sent by the vehicle end;
[0033] A list configuration module, used for configuring a mutually exclusive system list of a corresponding controller area network bus according to system information of the electronic control unit;
[0034] A selection control module is used to perform selection control on the data flow of the electronic control unit based on the mutually exclusive system list.
[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a data stream selection control device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data stream selection control method as described above.
[0036] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data stream selection control method described above are implemented.
[0037] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the data stream selection control method described above are implemented.
[0038] One or more technical solutions proposed in this application have at least the following technical effects:
[0039] The embodiment of the present application proposes a data stream selection control method, device, equipment and storage medium, which receives the corresponding system information of the electronic control unit on the controller area network bus sent by the vehicle end; configures the mutually exclusive system list of the corresponding controller area network bus according to the system information of the electronic control unit; and selects and controls the data stream of the electronic control unit based on the mutually exclusive system list. By configuring the mutually exclusive system list of the corresponding controller area network bus and selecting and controlling the data stream of the electronic control unit based on the mutually exclusive system list, it can be ensured that when refreshing the multi-system data stream, there will be no refresh communication abnormalities, thereby improving the viewing efficiency of the data stream and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0041] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0042] Figure 1 A flowchart of the first embodiment of the data flow selection control method of the present application is provided;
[0043] Figure 2 A flow chart of the second embodiment of the data flow selection control method of the present application;
[0044] Figure 3 This is a schematic diagram of the module structure of the data stream selection control device according to an embodiment of the present application;
[0045] Figure 4 Schematic diagram of the device structure of the hardware operating environment involved in the data flow selection control method in the embodiment of the present application.
[0046] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0049] The main solution of the embodiment of the present application is: receiving the corresponding system information of the electronic control unit on the controller area network bus sent by the vehicle end; configuring the mutually exclusive system list of the corresponding controller area network bus according to the system information of the electronic control unit; and selectively controlling the data flow of the electronic control unit based on the mutually exclusive system list.
[0050] When using diagnostic equipment to diagnose the vehicle being tested, it is necessary to view data stream data across systems. However, when selecting multi-system data streams, there may be system mutual exclusion on the same CAN (Controller Area Network) bus of the vehicle, that is, the data streams of two mutually exclusive systems cannot be viewed at the same time, so it is necessary to control the selection of mutually exclusive systems.
[0051] The current solution does not have a multi-select system to restrict, resulting in the data stream refresh in different vehicle electronic control units ECU (Electronic Control Unit) simultaneously selecting two mutually exclusive systems for electronic control unit refresh when refreshing multiple system data streams, which will cause CAN bus communication abnormalities, refresh failure, or switching systems back and forth resulting in untimely refresh data, and then prompting the user that the selected system cannot be accessed at the same time, and cannot solve the problem of viewing multiple system data streams in the case of multiple system mutual exclusion. Therefore, it is urgent to propose a solution that can perform data stream selection control in the case of system mutual exclusion.
[0052] This application configures the mutually exclusive system list of the corresponding controller local area network bus, and selectively controls the data flow of the electronic control unit based on the mutually exclusive system list, so as to ensure that there will be no refresh communication anomalies when refreshing multiple system data streams, thereby improving the viewing efficiency of the data stream and improving the user experience.
[0053] In this embodiment, for ease of description, the following description is made by taking the identification of data stream selection control device as the execution subject.
[0054] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a data stream selection control device, etc. The following takes the data stream selection control device as an example to illustrate this embodiment and the following embodiments.
[0055] Based on this, the embodiment of the present application provides a data stream selection control method, referring to Figure 1 , Figure 1This is a flow chart of the first embodiment of the data stream selection control method of the present application, wherein the data stream selection control method is applied to the diagnosis end.
[0056] In this embodiment, the data stream selection control method includes steps S10 to S30:
[0057] Step S10, receiving corresponding system information of the electronic control unit on the controller area network bus sent by the vehicle end.
[0058] It should be noted that the diagnostic end refers to an external device or software directly or indirectly connected to the vehicle, such as a diagnostic instrument or a diagnostic program in a computer, which communicates with the vehicle through an interface to perform operations such as fault detection, performance monitoring, data recording and analysis.
[0059] In addition, it should be noted that the vehicle end usually refers to a system or device installed on the vehicle, which is used to monitor the vehicle's operating status in real time, collect vehicle data, and transmit this data to an external device or cloud server for analysis and processing through a specific method (such as Bluetooth, Wi-Fi, mobile network, etc.).
[0060] In addition, it should be noted that the controller area network bus refers to the CAN (Controller Area Network) bus, which is a serial communication protocol mainly used to realize real-time and reliable data communication between nodes in a distributed system. As a microcontroller communication in an automotive environment, it is used to exchange information between various electronic control units ECU (Electronic Control Unit) on board the vehicle to form an automotive electronic control network. Today, the controller area network bus has been widely used in automotive electronics, industrial automation, ships, medical equipment and other fields. It has the advantages of high reliability (the controller area network bus adopts a two-wire serial communication method, has strong error detection and anti-interference capabilities, and can work stably in a high noise interference environment), multi-master control (the controller area network bus supports multi-master working mode, that is, any node on the bus can send messages when idle, which improves the flexibility and real-time performance of the system), long-distance communication (the controller area network bus has a long communication distance, up to 10 kilometers, which is suitable for long-distance communication needs), high speed (the controller area network bus has a high communication rate, up to 1Mbps, which can meet the needs of high-speed data transmission), and good scalability (the controller area network bus system is easy to expand, and there is no need to change the software and hardware configuration of the existing nodes when adding new nodes).
[0061] In addition, it should be noted that the electronic control unit ECU (Electronic Control Unit) is a microcomputer controller dedicated to the car, which is equivalent to the brain of the car. The main function of the ECU is to receive signals from various sensors, such as engine speed, air intake, water temperature, oil pressure, etc., and then process these signals according to a predetermined program, and finally send control instructions to the actuator to realize the control of various functions of the vehicle. These functions include but are not limited to engine control, fuel injection, ignition control, emission control, transmission control, body stability control, etc.
[0062] In addition, it should be noted that the system information corresponding to the electronic control unit refers to the information of the system corresponding to the electronic control unit, including but not limited to the system name, system abbreviation, system identification ID and data flow information contained in the system (data flow name, data flow type, unit).
[0063] More specifically, a vehicle may have multiple CAN bus lines. A traditional fuel vehicle may be equipped with about 5 CAN buses, while a pure electric vehicle may have more and more complex CAN bus systems. Each CAN bus line may have multiple ECUs, and each ECU has a corresponding system and system information. The number of CAN bus lines and ECUs depends on the vehicle design, manufacturer, and functional requirements. These ECUs include, but are not limited to, the engine control unit (mainly responsible for engine control, including fuel injection, ignition control, emission control, etc.), the transmission control unit (responsible for transmission control, ensuring that the transmission can shift gears appropriately according to driving conditions and driver needs), the brake control unit (responsible for the control of the brake system, including the realization of functions such as the anti-lock brake system and the electronic stability program), and the body control unit (mainly responsible for the control of the body electrical equipment, such as lights, wipers, door locks, windows, etc.).
[0064] Specifically, the vehicle end scans the controller area network bus of the target vehicle through multi-threading, obtains the electronic control units connected to each controller area network bus, and reads the system and system information corresponding to the electronic control unit. The system information includes but is not limited to the system name, system abbreviation, system identification ID, and data stream information contained in the system (data stream name, data stream type, unit); then the corresponding system information of the electronic control unit is sent to the diagnostic end through the vehicle end, and the diagnostic end receives the corresponding system information of the electronic control unit sent from the vehicle end.
[0065] Step S20: configuring a mutually exclusive system list of a corresponding controller area network bus according to the system information of the electronic control unit.
[0066] It should be noted that the mutually exclusive system list is a list of system identification IDs used to record the mutual exclusion between systems. Some electronic control units may have mutually exclusive relationships in communication. This mutual exclusion relationship may arise due to a variety of reasons, such as security considerations, functional conflicts or resource limitations. When an electronic control unit is performing certain operations, other mutually exclusive electronic control units may need to suspend their activities or communications to ensure the normal operation and safety of the system. In this application, when there is mutual exclusion between two systems, the data streams of the two systems cannot be viewed at the same time.
[0067] Specifically, first, the system information of the received electronic control unit is analyzed to determine the electronic control units connected to each controller local area network bus; then, based on the connected electronic control units, the corresponding mutually exclusive system information of the electronic control unit is obtained, that is, the system ID that has a mutually exclusive relationship with the electronic control unit is determined, and the system IDs of the systems that have a mutually exclusive relationship with the systems corresponding to the electronic control unit are added to the mutually exclusive system list of the system, and finally each system has a corresponding mutually exclusive system list.
[0068] More specifically, determining whether there is a mutually exclusive relationship between systems can be determined through the following steps: First, understand the functions and tasks of the electronic control units corresponding to the system, and clarify the specific functions and tasks of each electronic control unit in the vehicle system. Different electronic control units may be responsible for different vehicle subsystems, such as engine control, transmission system control, body control, etc.; identify whether there are shared resources between electronic control units, such as sensor data, actuator control signals, bus communication bandwidth, etc. The existence of shared resources is the basis for the generation of mutually exclusive relationships.
[0069] Then, on the one hand, analyze the communication and bus architecture, understand the communication protocols used between electronic control units (such as CAN, LIN, etc.), and how these protocols manage message transmission, priority and conflict resolution; study the connection method and topology of electronic control units in the vehicle bus network, which helps to understand how electronic control units communicate with each other, as well as possible communication conflicts and synchronization problems.
[0070] On the other hand, we can review the mutual exclusion control mechanism and check whether the electronic control unit software implements mutexes, semaphores or other synchronization mechanisms to control access to shared resources. These mechanisms are usually used to ensure that only one electronic control unit can access specific resources or perform specific tasks at the same time; analyze how the electronic control unit handles interrupts, especially when multiple interrupts occur at the same time, how the electronic control unit allocates processing priorities and prevents critical tasks from being interrupted. Interrupt management strategies may directly affect the mutual exclusion relationship between electronic control units.
[0071] On the other hand, you can also consult the ECU software documentation and code, and carefully read the ECU software design documents, requirement specifications, etc. to understand the system's definition and implementation of mutual exclusion relationships. These documents usually provide detailed information on the ECU's functions, resource access, task scheduling, and communication protocols; review the parts of the ECU's source code related to mutual exclusion control. This helps to gain a deeper understanding of how mutual exclusion relationships between ECUs are implemented at the software level.
[0072] Step S30 : Selectively controlling the data flow of the electronic control unit based on the mutually exclusive system list.
[0073] Specifically, the diagnostic interface of the diagnostic terminal can be used by the user to select and view data streams. The diagnostic terminal initializes the diagnostic interface according to the generated mutually exclusive system list, and generates a data stream selection control menu on the interface. The data stream selection control menu includes but is not limited to the data stream name, data stream identification ID, system name of the system where the data stream is located, and system identification ID of the system where the data stream is located. In addition, the maximum number of selectable systems and the maximum number of selectable data streams for each system in the data stream selection control menu can also be set in the diagnostic interface.
[0074] When the user selects a data stream on the data stream selection control menu on the diagnostic interface, the device obtains the system ID of the data stream, determines the mutually exclusive system of the system by comparing it with the mutually exclusive system list, and sets the mutually exclusive system to a disabled state, that is, a non-clickable state, and the data stream under the mutually exclusive system cannot be selected.
[0075] When the number of systems selected in the data stream selection control menu reaches the maximum number of selectable systems, the device will set other systems without selected data streams to disabled state and make them unclickable.
[0076] For each system with selected data streams, when the number of selected data streams in the system reaches the maximum number of selectable data streams, the device will set other unselected data streams to disabled state, making them unselectable.
[0077] This embodiment adopts the above scheme, by receiving the corresponding system information of the electronic control unit on the controller area network bus sent by the vehicle end at the diagnosis end; configuring the mutually exclusive system list of the corresponding controller area network bus according to the system information of the electronic control unit; and selectively controlling the data flow of the electronic control unit based on the mutually exclusive system list. By configuring the mutually exclusive system list of the corresponding controller area network bus and selectively controlling the data flow of the electronic control unit based on the mutually exclusive system list, it can be ensured that when refreshing the multi-system data flow, there will be no refresh communication abnormality, thereby improving the viewing efficiency of the data flow and improving the user experience.
[0078] Based on the above implementation scheme, in a feasible implementation manner, configuring the mutually exclusive system list of the corresponding controller area network bus according to the system information of the electronic control unit includes steps S21 to S23:
[0079] Step S21, determining the electronic control units connected to each controller area network bus according to the system information of the electronic control units.
[0080] Specifically, the device analyzes the system information of the received electronic control unit, which includes but is not limited to the system name, system abbreviation, system identification ID of the system corresponding to the electronic control unit and the data flow information (data flow name, data flow type, unit) contained in the system, and determines the electronic control units connected to each controller local area network bus.
[0081] Step S22: acquiring corresponding mutually exclusive system information of the electronic control unit based on the connected electronic control unit.
[0082] Specifically, the received system information of the electronic control unit is first analyzed to determine the electronic control units connected to each controller area network bus; then based on the connected electronic control units, the corresponding mutually exclusive system information of the electronic control unit is obtained, that is, the system ID that has a mutually exclusive relationship with the electronic control unit is determined.
[0083] Step S23, configuring and generating a mutually exclusive system list of a corresponding controller area network bus according to the mutually exclusive system information of the electronic control unit.
[0084] Specifically, after determining the system ID of the system mutually exclusive with the electronic control unit, the system ID of the system mutually exclusive with the system corresponding to the electronic control unit is added to the mutually exclusive system list of the system, and finally each system has a corresponding mutually exclusive system list.
[0085] Based on the above implementation scheme, in a feasible implementation manner, the selective control of the data flow of the electronic control unit based on the mutually exclusive system list includes steps S31 to S32:
[0086] Step S31, initializing the diagnosis interface of the diagnosis terminal based on the mutually exclusive system list, and generating a data stream selection control menu.
[0087] Specifically, based on the mutually exclusive system list, available data flow information is parsed from the documents or configuration files of the corresponding electronic control units in the list, including data flow name, data type, unit, etc.; based on the parsed data flow information, a data flow selection control menu is constructed in the diagnostic interface. This menu can be a drop-down list, a check box group, or a tree structure, etc. The specific form depends on the number and type of data flows.
[0088] Step S32: Based on the data stream selection control menu, the data stream of the electronic control unit is selectively controlled.
[0089] Specifically, when the user selects a data stream on the data stream selection control menu of the diagnostic interface, the device will obtain the system ID of the data stream, determine the mutually exclusive system of the system by comparing the mutually exclusive system list, and set the mutually exclusive system to a disabled state, making it unclickable, and the data stream under the mutually exclusive system cannot be selected.
[0090] When the number of systems selected in the data stream selection control menu reaches the maximum number of selectable systems, the device will set other systems without selected data streams to disabled state and make them unclickable.
[0091] For each system with selected data streams, when the number of selected data streams in the system reaches the maximum number of selectable data streams, the device will set other unselected data streams to disabled state, making them unselectable.
[0092] Based on the above implementation scheme, in a feasible implementation manner, the selective control of the data stream of the electronic control unit based on the data stream selection control menu includes steps S321 to S323:
[0093] Step S321, receiving a data stream selection instruction issued by a user.
[0094] It should be noted that the data stream selection instruction refers to an instruction for selecting a data stream issued by a user and received by the diagnosis interface of the diagnosis terminal.
[0095] Specifically, the user issues a data stream selection instruction, selects a data stream to be viewed on a data stream selection control menu, and the diagnostic interface receives the data stream selection instruction issued by the user.
[0096] Step S322, obtaining the target data flow selected by the user and the target system where the target data flow is located according to the data flow instruction.
[0097] Specifically, after receiving the instruction, the diagnostic end needs to parse the instruction content to determine the target data stream that the user wants to select and the target system where it is located; based on the parsing result, the system queries and obtains the target data stream selected by the user; the device identifies the target system where the target data stream is located.
[0098] Step S323: based on the data stream selection control menu, setting the mutually exclusive system of the target system in the data stream selection control menu to a disabled state.
[0099] Specifically, after the device identifies the target system where the target data flow is located, it obtains the system ID of the target system, compares the mutually exclusive system list, determines the mutually exclusive system of the target system, and based on the data flow selection control menu, sets the mutually exclusive system of the target system in the data flow selection control menu to a disabled state.
[0100] Through the above scheme, this embodiment ensures that only one system in the mutually exclusive system is in an active selectable state by setting the mutually exclusive system of the target system in the data stream selection control menu to a disabled state, thereby avoiding communication anomalies caused by simultaneously selecting data streams under the mutually exclusive system, avoiding data conflicts, and improving system efficiency; and automatically setting the mutually exclusive system to a disabled state after selection also improves the user experience.
[0101] Based on the above implementation scheme, in a feasible implementation scheme, the data stream selection control method further includes steps S40 to S50:
[0102] Step S40, receiving a modification operation instruction.
[0103] Step S50: performing a modification operation on the mutually exclusive system list according to the modification operation instruction, so as to generate a modified data stream selection control menu according to the mutually exclusive system list after the modification operation.
[0104] Specifically, the modification operation instruction is an instruction on how to modify the mutually exclusive system list; the modified mutually exclusive system list is based on the original mutually exclusive system list, and the mutually exclusive system list is modified according to the specific actual changes, and then the diagnostic end is initialized according to the modified mutually exclusive system list to obtain a new data stream selection control menu; the modification operation includes but is not limited to modification operations such as adding, deleting, and modifying the menu status, which is used to modify the mutually exclusive system list according to the specific actual changes, and then generate a data stream selection control menu corresponding to the needs.
[0105] This embodiment adopts the above scheme, specifically by modifying the mutually exclusive system list according to specific actual conditions, and then the diagnostic end obtains a data flow selection control menu according to the mutually exclusive system list after the modification operation, which can effectively adapt to the scene changes of data flow viewing and improve the precise control of data flow viewing permissions.
[0106] Reference Figure 2 , Figure 2 This is a flow chart of the second embodiment of the data stream selection control method of the present application, wherein the data stream selection control method is applied to a vehicle end.
[0107] Based on the first embodiment, a second embodiment of the present application is proposed. The difference between the second embodiment of the present application and the first embodiment is that:
[0108] Based on the above implementation scheme, in a feasible implementation scheme, the data stream selection control method is applied to the vehicle side, and the method includes steps S60 to S70:
[0109] Step S60, scanning the controller area network bus of the target vehicle, acquiring the electronic control unit on each controller area network bus, and obtaining the corresponding system information of the electronic control unit.
[0110] Specifically, the multithreading of the target vehicle is initialized, the controller area network bus of the target vehicle is scanned by the multithreading, the bus information of the controller area network bus is obtained, the bus information is analyzed, the electronic control unit on each controller area network bus is obtained, and the system information of the electronic control unit is analyzed.
[0111] Step S70, sending the corresponding system information of the electronic control unit to the diagnosis end, so that the diagnosis end configures a mutually exclusive system list according to the system information of the electronic control unit and selectively controls the data flow of the electronic control unit.
[0112] Specifically, the corresponding system information of the electronic control unit is sent to the diagnostic end. After receiving the system information, the diagnostic end determines the electronic control units connected to each controller area network bus according to the system information of the electronic control unit, obtains the corresponding mutually exclusive system information of the electronic control unit based on the connected electronic control units, and configures and generates a mutually exclusive system list of the corresponding controller area network bus according to the mutually exclusive system information of the electronic control unit.
[0113] Based on the above implementation scheme, in a feasible implementation scheme, scanning the controller area network bus of the target vehicle, acquiring the electronic control unit on each controller area network bus, and obtaining the corresponding data stream of the electronic control unit includes steps S61 to S63:
[0114] Step S61, initializing multithreading of the target vehicle.
[0115] Specifically, firstly, a multi-threaded architecture is designed. According to the number and complexity of the Controller Area Network (CAN) buses of the target vehicle, a reasonable multi-threaded architecture is designed. Each thread can be responsible for scanning one or more CAN channels. Use appropriate programming languages (such as C / C++, Python, etc.) and libraries (such as SocketCAN, python-can, etc.) to create threads; then configure thread parameters, set the CAN interface (such as can0, can1, etc.), baud rate (such as 500kbps, 1Mbps, etc.) and other necessary communication parameters of each thread, and allocate necessary resources to each thread, such as memory, file handles, etc.; then assign the CAN buses of the vehicle to different threads, ensuring that at least one thread is responsible for each bus; finally, start the threads, initialize all threads and start them, so that they start to perform the scanning task of the CAN bus.
[0116] Step S62, scanning the controller area network bus of the target vehicle through multi-threading to obtain bus information of the controller area network bus.
[0117] Specifically, all threads are started and parallel scanning begins. Each thread scans the assigned controller area network bus and monitors the communication on the bus. The threads collect information about the controller area network bus, including bus load, error frames, remote transmission requests, etc., analyze the bus information, and identify all electronic control units connected to the controller area network bus.
[0118] Step S63, analyzing the bus information, acquiring the electronic control units on each controller area network bus, and obtaining the corresponding data stream of the electronic control units.
[0119] Specifically, the bus information is analyzed to identify all electronic control units connected to the controller area network bus, the information of the electronic control units is analyzed to obtain the data flow under the corresponding system of each electronic control unit, the obtained data flow is analyzed to extract useful information such as vehicle status, performance parameters, etc.
[0120] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the data stream selection control method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0121] This application also provides a data stream selection control device, please refer to Figure 3 , the data stream selection control device comprises:
[0122] The information receiving module 301 is used to receive the corresponding system information of the electronic control unit on the controller area network bus sent by the vehicle end;
[0123] A list configuration module 302, configured to configure a mutually exclusive system list of a corresponding controller area network bus according to system information of the electronic control unit;
[0124] The selection control module 303 is used to select and control the data flow of the electronic control unit based on the mutually exclusive system list.
[0125] The data stream selection control device provided by the present application adopts the data stream selection control method in the above embodiment, which can solve the technical problem of abnormal viewing of data streams in the case of mutual exclusion among multiple systems. Compared with the prior art, the beneficial effects of the data stream selection control device provided by the present application are the same as the beneficial effects of the data stream selection control method provided by the above embodiment, and other technical features in the data stream selection control device are the same as the features disclosed in the above embodiment method, which will not be described in detail here.
[0126] The present application provides a data stream selection control device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data stream selection control method in the above-mentioned embodiment 1.
[0127] Reference below Figure 4 , which shows a schematic diagram of the structure of a data stream selection control device suitable for implementing an embodiment of the present application. The data stream selection control device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Multimedia Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The data stream selection control device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0128] like Figure 4As shown, the data stream selection control device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read On ly Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. Various programs and data required for the operation of the data stream selection control device are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 may allow the data stream selection control device to communicate with other devices wirelessly or by wire to exchange data. Although the data stream selection control device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0129] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0130] The data stream selection control device provided by the present application adopts the data stream selection control method in the above embodiment, which can solve the technical problem of abnormal viewing of data streams in the case of mutual exclusion of multiple systems. Compared with the prior art, the beneficial effects of the data stream selection control device provided by the present application are the same as the beneficial effects of the data stream selection control method provided by the above embodiment, and other technical features in the data stream selection control device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0131] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0132] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0133] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data stream selection control method in the above-mentioned embodiment.
[0134] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM: Erasable Programmab le Read On ly Memory or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM: CD-Read On ly Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency: Radio Frequency), etc., or any suitable combination of the above.
[0135] The computer-readable storage medium may be included in the data stream selection control device; or may exist independently without being assembled into the data stream selection control device.
[0136] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the data flow selection control device, the data flow selection control device: receives the corresponding system information of the electronic control unit on the controller local area network bus sent by the vehicle end; configures the mutually exclusive system list of the corresponding controller local area network bus according to the system information of the electronic control unit; and selects and controls the data flow of the electronic control unit based on the mutually exclusive system list.
[0137] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0138] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0139] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0140] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data stream selection control method, and can solve the technical problem of abnormal viewing of data streams in the case of mutual exclusion of multiple systems. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the data stream selection control method provided by the above-mentioned embodiment, and will not be repeated here.
[0141] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data flow selection control method when executed by a processor.
[0142] The computer program product provided by the present application can solve the technical problem of abnormal viewing of data streams when multiple systems are mutually exclusive. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the data stream selection control method provided by the above embodiment, which will not be repeated here.
[0143] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A data stream selection control method, characterized in that: The data stream selection control method is applied to the diagnosis end, and the method includes: Receiving corresponding system information of the electronic control unit on the controller area network bus sent by the vehicle end; According to the system information of the electronic control unit, a mutually exclusive system list of the corresponding controller area network bus is configured; The data flow of the electronic control unit is selectively controlled based on the mutually exclusive system list.
2. The method according to claim 1, characterized in that The step of configuring the mutually exclusive system list of the corresponding controller area network bus according to the system information of the electronic control unit comprises: Determine the electronic control unit connected to each controller area network bus according to the system information of the electronic control unit; Based on the connected electronic control units, obtaining corresponding mutually exclusive system information of the electronic control units; According to the mutually exclusive system information of the electronic control unit, a mutually exclusive system list of the corresponding controller area network bus is configured and generated.
3. The method according to claim 1, characterized in that The step of selectively controlling the data flow of the electronic control unit based on the mutually exclusive system list comprises: Initializing the diagnostic interface of the diagnostic terminal based on the mutually exclusive system list and generating a data stream selection control menu; Based on the data stream selection control menu, the data stream of the electronic control unit is selectively controlled.
4. The method according to claim 3, characterized in that The step of selecting and controlling the data stream of the electronic control unit based on the data stream selection control menu comprises: receiving a data stream selection instruction issued by a user; Acquire the target data stream selected by the user and the target system where the target data stream is located according to the data stream instruction; Based on the data stream selection control menu, the mutually exclusive system of the target system in the data stream selection control menu is set to a disabled state.
5. The method according to claim 1, characterized in that The method further comprises: Receive modification operation instructions; The mutually exclusive system list is modified according to the modification operation instruction, so that a modified data stream selection control menu is generated according to the mutually exclusive system list after the modification operation.
6. A data stream selection control method, characterized in that: The data stream selection control method is applied to a vehicle end, and the method comprises: Scanning the controller area network bus of the target vehicle, acquiring the electronic control unit on each controller area network bus, and obtaining the corresponding system information of the electronic control unit; The corresponding system information of the electronic control unit is sent to the diagnosis end, so that the diagnosis end configures a mutually exclusive system list according to the system information of the electronic control unit and selectively controls the data flow of the electronic control unit.
7. The method according to claim 6, characterized in that The step of scanning the controller area network bus of the target vehicle, acquiring the electronic control unit on each controller area network bus, and obtaining the corresponding data stream of the electronic control unit comprises: Initialize multithreading of target vehicle; Scanning the controller area network bus of the target vehicle through multi-threading to obtain bus information of the controller area network bus; The bus information is analyzed to obtain the electronic control units on each controller area network bus, and obtain the corresponding data stream of the electronic control units.
8. A data stream selection control device, characterized in that: The device comprises: An information receiving module, used for receiving corresponding system information of the electronic control unit on the controller area network bus sent by the vehicle end; A list configuration module, used for configuring a mutually exclusive system list of a corresponding controller area network bus according to system information of the electronic control unit; A selection control module is used to perform selection control on the data flow of the electronic control unit based on the mutually exclusive system list.
9. A data stream selection control device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data stream selection control method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data stream selection control method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Data flow grouping display method and device, terminal equipment and storage medium
CN116483893A
Task control method, storage medium and electronic equipment
CN118012635A
Scanning method for electronic control unit in vehicle and vehicle diagnostic device
US20210241549A1
On-board diagnostic method, device and system
WO2023205916A1