A multi-system data stream selection method, device, apparatus and storage medium

By employing multi-threaded scanning and mutual exclusion checks, the mutual exclusion problem in selecting data streams from multiple systems in automotive diagnostic equipment is resolved, thereby improving user experience and diagnostic efficiency.

CN119225344BActive Publication Date: 2026-02-13LAUNCH TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411422901.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2026-02-13
Estimated Expiration
2044-10-11

AI Technical Summary

Technical Problem

When using diagnostic equipment to diagnose a car, it may be necessary to view the data streams of multiple systems. However, since the vehicle has multiple CAN buses, there may be mutual exclusion, which may lead to abnormal CAN bus communication, refresh failure, or untimely data, resulting in a poor user experience.

Method used

By scanning all vehicle electronic controllers on the local area network bus of the target vehicle using multi-threaded scanning, system information and data stream information are read to determine whether mutual exclusion exists. The system ID of the mutually exclusive system is added to the target mutual exclusion list. The total number of data streams, the maximum number of selectable systems, and the maximum number of selectable data streams for each system are set to determine the bus mutual exclusion value of the vehicle electronic controller. Based on the data stream selected by the user and the mutual exclusion list, the currently selectable data stream is determined.

Benefits of technology

This avoids selecting mutually exclusive systems when choosing multiple system data streams, improves the user's diagnostic experience, and ensures a smooth and accurate data refresh process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119225344B_ABST
    Figure CN119225344B_ABST
Patent Text Reader

Abstract

The application discloses a multi-system data stream selection method and device, equipment and a storage medium, and relates to the technical field of vehicles. The method comprises the following steps: scanning vehicle electronic controllers on all controller area network buses of a target vehicle, and reading system information and data stream information of the vehicle electronic controllers; judging whether there is mutual exclusion among the vehicle electronic controllers on the same controller area network bus; if there is mutual exclusion, adding the system ID of the target system of the mutual exclusion to a target mutual exclusion list; setting the total data stream number, the maximum selectable system number, and the maximum selectable data stream number of each system, and determining the bus mutual exclusion value; when a data stream selection instruction is received, determining the mutually exclusive systems according to the target data stream, the bus mutual exclusion value and the target mutual exclusion list, and determining the current selectable data stream based on the mutually exclusive systems, the total data stream number, the maximum selectable system number and the maximum selectable data stream number of each system, so that a user can select multi-system data streams. The application realizes the simultaneous selection of multiple data streams.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of vehicles, in particular to a multi-system data stream selection method, device, equipment and storage medium. BACKGROUND

[0002] An OBD (On-Board Diagnostics, vehicle-mounted automatic diagnostic system) interface is an important diagnostic interface on a vehicle, used to connect a diagnostic tool to read the data stream and fault codes of the vehicle. When using a diagnostic device to diagnose a vehicle, it may be necessary to view the data stream of multiple systems. If the vehicle has multiple CAN (Controller Area Network, controller area network) buses, there may be mutual exclusion. Therefore, the selection of multi-system data streams of multiple CAN buses is usually limited, resulting in the following problems when refreshing multi-system data streams: different ECU (Electronic Control Unit, electronic controller) data streams are refreshed simultaneously, and the selection of system ECUs on two mutually exclusive CAN buses is refreshed, which may cause CAN bus communication abnormalities, refresh failures, or back-and-forth switching of systems to cause the refresh data to be not timely, and the user is prompted to select a system that cannot be accessed simultaneously.

[0003] In summary, how to avoid selecting mutually exclusive systems when viewing the data streams of multiple systems and improve user experience is a problem that needs to be solved at present. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a multi-system data stream selection method, device, equipment and storage medium, which can avoid selecting mutually exclusive systems when viewing the data streams of multiple systems and improve user experience. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a multi-system data stream selection method, comprising:

[0006] Scanning all vehicle electronic controllers on the controller area network bus of the target vehicle using multiple threads, and reading the system information and data stream information corresponding to the vehicle electronic controllers;

[0007] Judging whether the vehicle electronic controllers on the same controller area network bus of the target vehicle exist mutual exclusion, if the vehicle electronic controllers exist mutual exclusion, adding the system ID of the target system which is mutually exclusive with the system corresponding to the vehicle electronic controller on the same controller area network bus to a target mutual exclusion list;

[0008] Setting the total data stream number, the maximum number of selectable systems, and the maximum number of selectable data streams of each system based on the system information and the data stream information, and determining the bus mutual exclusion value of the vehicle electronic controller;

[0009] Upon receiving the data stream selection instruction of the user, a mutual exclusion system is determined according to the target data stream selected by the user, the bus mutual exclusion value of the vehicle electronic controller and the target mutual exclusion list, a current selectable data stream is determined based on the mutual exclusion system, the total data stream number, the maximum selectable system number and the maximum selectable data stream number of each system, so that the user selects a multi-system data stream through the current selectable data stream.

[0010] Optionally, the system information comprises a system name, a system abbreviation and a system ID; and the data stream information comprises a data stream name and a data stream unit.

[0011] Optionally, the bus mutual exclusion value of the vehicle electronic controller is determined by:

[0012] The bus mutual exclusion value of the vehicle electronic controller is determined according to the number of controller area network buses of the target vehicle and the mutual exclusion relationship of each controller area network bus.

[0013] Optionally, the bus mutual exclusion value of the vehicle electronic controller is determined according to the number of controller area network buses of the target vehicle and the mutual exclusion relationship of each controller area network bus by:

[0014] It is determined that the communication link of the target vehicle supports the number of paths of the mutual exclusion relationship of the controller area network buses;

[0015] The bus mutual exclusion value of the vehicle electronic controller is determined according to the number of paths and the number of controller area network buses of the target vehicle.

[0016] Optionally, the mutual exclusion system is determined according to the target data stream selected by the user, the bus mutual exclusion value of the vehicle electronic controller and the target mutual exclusion list by:

[0017] It is determined that the user selects a system corresponding to the target data stream, and determines an unselected system according to the user selected system, and determines the bus mutual exclusion value of the user selected system based on the bus mutual exclusion value of the vehicle electronic controller;

[0018] It is determined whether the bus mutual exclusion value of the unselected system is equal to the bus mutual exclusion value of the user selected system;

[0019] If not equal, and the AND value of the bus mutual exclusion value of the unselected system and the bus mutual exclusion value of the user selected system is equal to 0, the unselected system is determined as the mutual exclusion system of the user selected system;

[0020] If equal, it is determined whether there is a system ID corresponding to the unselected system in the target mutual exclusion list;

[0021] The mutually exclusive system is determined based on the result of the judgment that the system ID corresponding to the unselected system exists in the target mutual exclusion list.

[0022] Optionally, determining the mutually exclusive system based on the judgment result of whether the system ID corresponding to the unselected system exists in the target mutually exclusive list includes:

[0023] If the target mutual exclusion list contains a system ID corresponding to the unselected system, then the unselected system is determined as the mutual exclusion system of the user-selected system;

[0024] If the system ID corresponding to the unselected system does not exist in the target mutual exclusion list, then it is determined that the unselected system is not a mutual exclusion system of the user-selected system.

[0025] Optionally, determining the currently selectable data stream based on the mutual exclusion system, the total number of data streams, the maximum number of selectable systems, and the maximum number of selectable data streams for each of the systems includes:

[0026] Enable the first system of the mutual exclusion system corresponding to the target data stream;

[0027] The second system enable and data stream enable corresponding to the target data stream are determined based on the total number of data streams, the maximum number of selectable systems, and the maximum number of selectable data streams for each system.

[0028] By enabling the first system, enabling the second system, and enabling the data stream, the currently unselectable data stream is identified by a page, so that the user can determine the currently selectable data stream based on the corresponding page identifier.

[0029] Secondly, this application discloses a multi-system data stream selection device, comprising:

[0030] The information reading module is used to scan all vehicle electronic controllers on the local area network bus of the target vehicle using multi-threading, and read the system information and data stream information corresponding to the vehicle electronic controllers;

[0031] The mutual exclusion judgment module is used to determine whether there is mutual exclusion between the vehicle electronic controllers on the same controller local area network bus of the target vehicle. If there is mutual exclusion, the system ID of the target system that is mutually exclusive with the system corresponding to the vehicle electronic controller on the same controller local area network bus is added to the target mutual exclusion list.

[0032] The setting module is used to set the total number of data streams, the maximum number of selectable systems, and the maximum number of selectable data streams for each system based on the system information and the data stream information, and to determine the bus mutual exclusion value of the vehicle electronic controller;

[0033] a data stream selection module, configured to determine an exclusion system according to a target data stream selected by a user, a bus exclusion value of a vehicle electronic controller and the target exclusion list when receiving a data stream selection instruction of the user, and determine a current selectable data stream based on the exclusion system, a total data stream number, a maximum selectable system number and a maximum selectable data stream number of each system, so that the user selects a multi-system data stream through the current selectable data stream.

[0034] In a third aspect, the present application discloses an electronic device, comprising:

[0035] a memory, configured to save a computer program;

[0036] a processor, configured to execute the computer program to implement the multi-system data stream selection method.

[0037] In a fourth aspect, the present application discloses a computer readable storage medium, configured to store a computer program; wherein the computer program is executed by a processor to implement the multi-system data stream selection method.

[0038] The application firstly scans all vehicle electronic controllers on a controller area network bus of a target vehicle by using multi-threading, reads system information and data stream information corresponding to the vehicle electronic controllers, judges whether the vehicle electronic controllers on the same controller area network bus of the target vehicle exist mutual exclusion, adds system IDs of target systems corresponding to the vehicle electronic controllers and mutually exclusive with the systems on the same controller area network bus to a target mutual exclusion list if the vehicle electronic controllers exist mutual exclusion, sets total data stream number, maximum selectable system number and maximum selectable data stream number of each system based on the system information and the data stream information, and determines a bus mutual exclusion value of the vehicle electronic controllers; when receiving a data stream selection instruction of a user, determines mutually exclusive systems according to the target data stream selected by the user, the bus mutual exclusion value of the vehicle electronic controllers and the target mutual exclusion list, determines currently selectable data streams based on the mutually exclusive systems, the total data stream number, the maximum selectable system number and the maximum selectable data stream number of each system, so that the user selects multi-system data streams through the currently selectable data streams. It can be seen that, when selecting multi-system data streams, the application firstly scans all vehicle electronic controllers on a controller area network bus of a target vehicle by using multi-threading, reads system information and data stream information corresponding to the vehicle electronic controllers, so as to determine systems controlled by each vehicle electronic controller and data streams corresponding to the systems; then judges whether the vehicle electronic controllers on the same controller area network bus of the target vehicle exist mutual exclusion, adds system IDs of target systems corresponding to the vehicle electronic controllers and mutually exclusive with the systems on the same controller area network bus to a target mutual exclusion list if the vehicle electronic controllers exist mutual exclusion, so as to obtain mutual exclusion relationships of the systems controlled by each vehicle electronic controller on the same controller area network bus; sets total data stream number, maximum selectable system number and maximum selectable data stream number of each system based on the system information and the data stream information, so as to avoid too many data streams or systems selected by the user when selecting multi-system data streams, and then determines a bus mutual exclusion value of the vehicle electronic controllers, so that when receiving a data stream selection instruction of a user, mutually exclusive systems are determined according to the target data stream selected by the user, the bus mutual exclusion value of the vehicle electronic controllers and the target mutual exclusion list, currently selectable data streams are determined based on the mutually exclusive systems, the total data stream number, the maximum selectable system number and the maximum selectable data stream number of each system, so that the user selects multi-system data streams through the currently selectable data streams, avoids the user selecting mutually exclusive systems when viewing data streams of multiple systems, and improves user experience. BRIEF DESCRIPTION OF DRAWINGS

[0039] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, hereinafter, a brief introduction will be given to the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of the provided drawings.

[0040] Figure 1 A multi-system data flow selection method flow chart disclosed by the application;

[0041] Figure 2 A multi-system data flow selection device structure schematic diagram disclosed by the application;

[0042] Figure 3 A structure diagram of an electronic device disclosed by the application. DETAILED DESCRIPTION

[0043] The technical solutions in the embodiments of the application will be clearly and completely described below with reference to the drawings in the embodiments of the application. Obviously, the described embodiments are only part of the embodiments of the application, rather than all the embodiments of the application. Based on the embodiments in the application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the application.

[0044] Currently, when diagnosing a vehicle using a diagnostic device, the data flow of multiple systems may need to be viewed. If the vehicle has multiple CAN buses, mutual exclusion may exist. Therefore, the multi-system data flow selection of multiple CAN buses is usually limited, which leads to the following problems: when refreshing the multi-system data flow, different ECU data flow refreshes the system ECU on two mutually exclusive CAN buses at the same time, which may cause CAN bus communication abnormalities, refresh failures, or back-and-forth switching of systems, resulting in delayed refresh data, and the user is prompted to select a system that cannot be accessed at the same time. In order to solve the above technical problems, the application discloses a multi-system data flow selection method, which can avoid selecting mutually exclusive systems when viewing the data flow of multiple systems and improve the user experience.

[0045] Referring to Figure 1 The embodiment of the application discloses a multi-system data flow selection method, which comprises the following steps:

[0046] Step S11, scanning all vehicle electronic controllers on a controller area network bus of a target vehicle using multi-threading, and reading system information and data flow information corresponding to the vehicle electronic controllers.

[0047] In this embodiment, the vehicle OBD interface usually has 16 pins, most modern cars adopt OBD II standard which stipulates the definition and use of 16 pins. These pins are used to transmit data, provide power and perform vehicle diagnosis. For example, pins 2, 3, 6, 8, 10, 11, 12, 13, 14 are used for CAN bus communication, including CAN-H (high voltage signal in dominant state) and CAN-L (low voltage signal in dominant state), and SAE (Society of Automotive Engineers) J1850 (a kind of automobile communication protocol standard) bus communication. Before performing multi-system data stream selection, first use multi-thread to scan all vehicle electronic controllers on the target vehicle controller area network bus, that is, use multi-thread to scan all system ECUs on the CAN bus of the vehicle to be diagnosed, so as to determine which system ECUs are on each CAN bus, then read the system information and data stream information corresponding to the vehicle electronic controller, that is, determine which data streams are controlled by each system ECU. Among them, the system information includes system name, system abbreviation, system ID (Identity document), and the data stream information includes the name of the data stream and the unit of the data stream.

[0048] Step S12, judge whether there is mutual exclusion between the vehicle electronic controllers on the same controller area network bus of the target vehicle, if there is mutual exclusion, add the system ID of the target system which is mutually exclusive with the system corresponding to the vehicle electronic controller on the same controller area network bus to the target mutual exclusion list.

[0049] In the embodiment, there can be multiple vehicle electronic controllers on the same CAN bus, and there can be mutual exclusion relationship between the systems corresponding to different vehicle electronic controllers. When the data stream of a system is selected, the data stream of the mutually exclusive system is not allowed to be selected, and therefore it is necessary to determine whether there is mutual exclusion between the vehicle electronic controllers on the same CAN bus of the target vehicle. If there is mutual exclusion between the different vehicle electronic controllers on the same CAN bus, the system IDs of the target systems mutually exclusive with the system corresponding to each ECU on the same CAN bus are added to the target mutual exclusion list of the system. That is, if there are four ECUs on a CAN bus, which correspond to four systems A, B, C, and D, and A is mutually exclusive with C and D, A is not mutually exclusive with B, B is mutually exclusive with C and D, A is not mutually exclusive with B, and C is not mutually exclusive with D, C and D are referred to as target systems mutually exclusive with A, C and D are referred to as target systems mutually exclusive with B, A and B are referred to as target systems mutually exclusive with C, and A and B are referred to as target systems mutually exclusive with D. The system ID of C and the system ID of D are added to the target mutual exclusion list of A, and the target mutual exclusion lists corresponding to B, C, and D are determined in the same manner. The target mutual exclusion list of B includes the system ID of C and the system ID of D, the target mutual exclusion list of C includes the system ID of A and the system ID of B, and the target mutual exclusion list of D includes the system ID of A and the system ID of B.

[0050] In step S13, the total number of data streams, the maximum number of selectable systems, and the maximum number of selectable data streams of each system are set based on the system information and the data stream information, and the bus exclusion value of the vehicle electronic controller is determined.

[0051] In the embodiment, the total number of data streams, the maximum number of selectable systems, and the maximum number of selectable data streams of each system are set based on the system information and the data stream information, to avoid too many data streams or systems selected by the user when multiple systems are selected. Then the bus exclusion value of the vehicle electronic controller is determined. The bus exclusion value of the vehicle electronic controller is determined according to the number of controller area network buses of the target vehicle and the mutual exclusion relationship of each controller area network bus. The exclusion value is represented by a 32-bit integer, that is, the mutual exclusion relationship of a maximum of 32 CAN buses is supported.

[0052] In this embodiment, the specific process of determining the bus mutex value of the ECU according to the number of CAN buses of the target vehicle and the mutual exclusion relationship of each CAN bus can include: determining the number of communication links of the target vehicle supporting the mutual exclusion relationship of the CAN buses; determining the bus mutex value of the vehicle electronic controller according to the number of communication links and the number of CAN buses of the target vehicle. If the communication link of the target vehicle only supports one-way CAN bus communication, the bus mutex value of each CAN bus is set to 1 bit as 1 and the remaining bits as 0, such as 0x01. When the number of communication links of the target vehicle supporting the mutual exclusion relationship of the CAN buses is multiple, if the CAN buses are parallel physical lines, the bus mutex value of all lines is at least 1, and more parallel physical lines have more n bit values of 1, such as pin 6 and pin 14 supporting parallel communication with other lines, the bus mutex value is set to 0x0F (all systems are less than or equal to 4-way, if more than 4-way, it can start from 0xFF), if there are more independent physical CAN, it can be increased according to the increase of parallel physical lines, such as maximum support 8-way can be set to 0xFF, maximum support 12-way can be set to 0xFFF, maximum support 16-way parallel communication can be set to 0xFFFF, etc. At the same time, the bus mutex value of other CAN buses not supporting multi-way communication is only allowed to have one bit of 1, and the set bit of 1 of different lines is in different positions. For example, the bus mutex value of pin 3 and pin 11 is 0x01, and the bus mutex value of pin 1 and pin 9 is 0x02. For specific examples, see the following.

[0053] Line 1 pin 6 and pin 14 have systems S1, S2, S3, among which S2, S3 are mutually exclusive, and support multi-way communication, ml_mutex=0x0F, support single-way, ml_mutex=0x04, the following example takes line 1 as an example to support multi-way; Line 2 pin 3 and pin 11 have systems S4, S5, S6, S7, S8, S9, among which S4, S5, S6 are mutually exclusive, S7, S8, S9 are mutually exclusive but not mutually exclusive with S4, S5, S6, ml_mutex=0x01; Line 3 pin 1 and pin 9 have systems S10 and S11, which are not mutually exclusive, ml_mutex=0x02. The specific configuration is as follows:

[0054] "{sys_id":"S1_ID","sys_name":"S1","sys_abbr":"","sys_type":X,"ml_mutex":15,...}";

[0055] "{sys_id":"S2_ID","sys_name":"S2","sys_abbr":"","sys_type":X,"ml_mutex":15,...}";

[0056] ml_mutex”:15,"sys_mutex":["S3_ID"],...};

[0057] {“sys_id”:”S3_ID”,“sys_name”:”S3”,”sys_abbr”:””,”sys_type”:X,”;

[0058] ml_mutex”:15,"sys_mutex":["S2_ID"],...};

[0059] “{ sys_id”:”S4_ID”“, sys_name”:”S4”,”sys_abbr”:””,”sys_type”:X,”ml_mutex”:1,”;

[0060] sys_mutex”:["S5_ID","S6_ID"],...};

[0061] “{ sys_id”:”S5_ID”“, sys_name”:”S5”,”sys_abbr”:””,”sys_type”:X,”ml_mutex”:1,”;

[0062] sys_mutex”:["S4_ID","S6_ID"],...};

[0063] “{ sys_id”:”S6_ID”“, sys_name”:”S6”,”sys_abbr”:””,”sys_type”:X,”ml_mutex”:1,”;

[0064] sys_mutex”:["S4_ID","S5_ID"],...};

[0065] “{ sys_id”:”S7_ID”“, sys_name”:”S7”,”sys_abbr”:””,”sys_type”:X,”ml_mutex”:1,”;

[0066] sys_mutex”:["S8_ID","S9_ID"],...};

[0067] “{ sys_id”:”S8_ID”“, sys_name”:”S8”,”sys_abbr”:””,”sys_type”:X,”ml_mutex”:1,”;

[0068] {"sys_id": "S7_ID", "sys_name": "S7", "sys_abbr": "", "sys_type": X, "ml_mutex": [ "S6_ID", "S8_ID" ],...} ;

[0069] {"sys_id": "S9_ID", "sys_name": "S9", "sys_abbr": "", "sys_type": X, "ml_mutex": 1, "sys_mutex": [ "S7_ID", "S8_ID" ],...} ;

[0070] {"sys_id": "S10_ID", "sys_name": "S10", "sys_abbr": "", "sys_type": X, "ml_mutex": 2,...} ;

[0071] {"sys_id": "S11_ID", "sys_name": "S11", "sys_abbr": "", "sys_type": X, "ml_mutex": 2,...}.

[0072] The above code is the specific configuration process of line 1, line 2 and line 3.

[0073] Step S14, when receiving the data stream selection instruction of the user, determining the mutual exclusion system according to the target data stream selected by the user, the bus mutex value of the vehicle electronic controller and the target mutex list, determining the current selectable data stream based on the mutual exclusion system, the total data stream number, the maximum selectable system number and the maximum selectable data stream number of each system, so that the user selects multi-system data stream through the current selectable data stream.

[0074]

[0075] The above code is the specific configuration process of line 1, line 2 and line 3.

[0076] Step S14, when receiving the data stream selection instruction of the user, determining the mutual exclusion system according to the target data stream selected by the user, the bus mutex value of the vehicle electronic controller and the target mutex list, determining the current selectable data stream based on the mutual exclusion system, the total data stream number, the maximum selectable system number and the maximum selectable data stream number of each system, so that the user selects multi-system data stream through the current selectable data stream.

[0077] ​In the embodiment, when the data stream selection instruction of the user is received, the exclusive system is determined according to the target data stream selected by the user, the bus exclusive value of the vehicle electronic controller and the target exclusive list. In the process of determining the exclusive system, first, the target data stream selected by the user is determined based on the data stream selection instruction, then the user selection system corresponding to the target data stream is determined, and the unselected system is determined according to the user selection system, then the bus exclusive value of the user selection system and the bus exclusive value of the unselected system are determined based on the bus exclusive value of each ECU; it is judged whether the bus exclusive value of the unselected system is equal to the bus exclusive value of the user selection system; if the bus exclusive value of the unselected system is not equal to the bus exclusive value of the user selection system, and the and value of the bus exclusive value of the unselected system and the bus exclusive value of the user selection system is equal to 0, the unselected system is determined as the exclusive system of the user selection system; if the bus exclusive value of the unselected system is not equal to the bus exclusive value of the user selection system, and the and value of the bus exclusive value of the unselected system and the bus exclusive value of the user selection system is greater than 0, it is indicated that the unselected system and the user selection system are located on two CAN buses which are not exclusive, and can be selected at the same time.

[0078] At the same time, if the bus exclusive value of the unselected system is equal to the bus exclusive value of the user selection system, it is indicated that the unselected system and the user selection system are located on the same CAN bus, then it is needed to judge whether the system ID corresponding to the unselected system exists in the target exclusive list; if the system ID corresponding to the unselected system exists in the target exclusive list corresponding to the user selection system, the unselected system is determined as the exclusive system of the user selection system; if the system ID corresponding to the unselected system does not exist in the target exclusive list, it is determined that the unselected system is not the exclusive system of the user selection system.

[0079] In the embodiment, after determining all the mutually exclusive systems corresponding to the system selected by the user, if the data stream of a certain system is selected, the mutually exclusive system is not allowed to select the data stream. Therefore, the current selectable data stream is determined based on the mutually exclusive system, the total number of data streams, the maximum number of selectable systems, and the maximum number of selectable data streams of each system. The specific process can include: setting the first system enable of the mutually exclusive system corresponding to the target data stream; determining the second system enable and the data stream enable of the target data stream based on the total number of data streams, the maximum number of selectable systems, and the maximum number of selectable data streams of each system; and performing page identification on the current unselectable data stream through the first system enable, the second system enable, and the data stream enable, so that the user determines the current selectable data stream based on the corresponding page identification. In a specific embodiment, after setting the first system enable of the mutually exclusive system, the user cannot click the mutually exclusive system and cannot select the data stream under the mutually exclusive system. After setting the second system enable, the user cannot click the data stream under the other unselected system after the number of systems corresponding to the currently selected data stream reaches the maximum number of selectable systems. After setting the data stream enable, the user cannot select the data stream exceeding the total number of data streams, nor can the user select the data stream exceeding the maximum number of selectable data streams of each system in the same system. For example, if the total number of data streams is set to 10 and the maximum number of selectable data streams of each system is set to 5, the user can select at most 10 data streams, and the data stream in the same system can be selected at most 5 times. After selecting 10 data streams, the user cannot select other data streams. After selecting 5 data streams in the same system, the user cannot select other data streams in the system.

[0080] In addition, if the user selects a data stream in the current selectable data stream to add a target data stream, the new mutually exclusive system is determined based on the added target data stream, the bus exclusion value of the vehicle electronic controller, and the added target exclusion list. The current selectable data stream is re-determined based on the new mutually exclusive system, the total number of data streams, the maximum number of selectable systems, and the maximum number of selectable data streams of each system, so that the user selects the multi-system data stream through the current selectable data stream, and records the selected multi-system data according to the category of the last selected multi-system data stream. At the same time, if the user cancels a target data stream currently selected, the unselectable data stream corresponding to the canceled data stream is restored to the selectable state, and the user can click to select. For example, the user currently selects only one data stream, and the data stream of the mutually exclusive system corresponding to the selected data stream in the current page becomes unclickable, and the user cannot select it, but can select other data streams in the clickable state. However, after canceling the selection of the data stream, that is, no data stream is selected in the current page, all data streams become selectable, and the user can click any data stream at will. Finally, the multi-system data stream without mutual exclusion is selected.

[0081] In summary, in the process of selecting multi-system data flow, the vehicle electronic controller on all controller area network buses of the target vehicle is scanned by using multi-threading, and the system information and data flow information corresponding to the vehicle electronic controller are read, so as to determine the system controlled by each vehicle electronic controller and the data flow corresponding to the system. Then, it is judged whether there is mutual exclusion of the vehicle electronic controller on the same controller area network bus of the target vehicle. If there is mutual exclusion, the system ID of the target system corresponding to the system of the vehicle electronic controller on the same controller area network bus is added to the target mutual exclusion list, so as to obtain the mutual exclusion relationship of the system controlled by each vehicle electronic controller on the same controller area network bus. The total data flow number, the maximum selectable system number and the maximum selectable data flow number of each system are set based on the system information and the data flow information, so as to avoid too many data flows or systems selected by the user when selecting multi-system data flow. Then, the bus mutual exclusion value of the vehicle electronic controller is determined, so that when the data flow selection instruction of the user is received, the mutually exclusive system is determined according to the target data flow selected by the user, the bus mutual exclusion value of the vehicle electronic controller and the target mutual exclusion list, the current selectable data flow is determined based on the mutually exclusive system, the total data flow number, the maximum selectable system number and the maximum selectable data flow number of each system, so that the user selects multi-system data flow through the current selectable data flow, avoids selecting mutually exclusive systems when viewing the data flow of multiple systems, and improves the experience of the user.

[0082] Based on the above embodiment, the application discloses a multi-system data flow selection method, which can avoid selecting mutually exclusive systems when viewing the data flow of multiple systems and improve the experience of the user. Next, the specific multi-system data flow selection process will be described in detail.

[0083] In the process of selecting multi-system data flow, the ECU on all controller area network buses of the target vehicle is scanned by using multi-threading, and the system information and data flow information corresponding to the ECU are read, the system information includes system name, system abbreviation and system ID, and the data flow information includes the name of the data flow and the unit of the data flow. Then, it is judged whether there is mutual exclusion of the ECU on the same controller area network bus of the target vehicle. If the ECUs on the same controller area network bus exist mutual exclusion, the system ID of the target system corresponding to the system of the ECU on the same controller area network bus is added to the target mutual exclusion list.

[0084] After obtaining the target mutual exclusion list corresponding to each ECU, the total data stream number, the maximum selectable system number, and the maximum selectable data stream number of each system are set based on system information and data stream information, and the bus mutual exclusion value of the ECU is determined, wherein the bus mutual exclusion value of the ECU is determined according to the number of CAN buses of the target vehicle and the mutual exclusion relationship of each CAN bus. The specific process of determining the bus mutual exclusion value can include: setting the bus mutual exclusion value of the ECU according to the number of CAN buses of the vehicle and the mutual exclusion relationship of each CAN bus. The bus mutual exclusion value of any line is allowed to have only one bit as 1, such as 0x01, if only one line is supported. If multiple lines are supported, the bus mutual exclusion value of physically independent lines has at least all line positions as 1, and more parallel physical lines have more than n positions as 1, such as pin 6 and pin 14 supporting parallel with other lines, and the value is set to 0x0F (all systems are within less than or equal to 4 lines), and if there are more independent physical CAN buses, the value is set to 0xFF (all systems are within less than or equal to 8 lines), etc. The bus mutual exclusion value set for other CAN buses is allowed to have only one position as 1, and the set 1 bit of different lines is in different positions. For example, the bus mutual exclusion value of pin 3 and pin 11 is 0x01, and the bus mutual exclusion value of pin 1 and pin 9 is 0x02.

[0085] When receiving the data stream selection instruction of the user, the mutually exclusive systems are determined according to the target data stream selected by the user, the bus mutual exclusion value of the ECU, and the target mutual exclusion list. The determined mutually exclusive systems include two types. One type is the mutually exclusive system of the CAN bus mutual exclusion determined based on the bus mutual exclusion value. The bus mutual exclusion value of this type of system and the bus mutual exclusion value of the ECU corresponding to the target data stream are both 0, that is, none of all binary bits corresponding to the positions of the two bus mutual exclusion values are 1 at the same time. The other type is the mutually exclusive system located on the same CAN bus. The system ID of this type of system can be found in the target mutual exclusion list corresponding to the system where the target data stream is located. After determining the mutually exclusive system corresponding to the target data stream, the mutually exclusive system corresponding to the target data stream is set as the first system enablement. Then, the second system enablement and the data stream enablement corresponding to the target data stream are determined according to the total data stream number, the maximum selectable system number, and the maximum selectable data stream number of each system. The current unselectable data stream is identified by the first system enablement, the second system enablement, and the data stream enablement, so that the user can determine the current selectable data stream based on the corresponding page identification and select the multi-system data stream from the current selectable data stream.

[0086] It can be seen that, when selecting multi-system data streams, the application first scans all vehicle electronic controllers on the controller area network bus of the target vehicle by using multi-threading, reads system information and data stream information corresponding to the vehicle electronic controllers, thereby determining systems controlled by each vehicle electronic controller and data streams corresponding to the systems; then it is judged whether there is mutual exclusion among vehicle electronic controllers on the same controller area network bus of the target vehicle, if there is mutual exclusion, system IDs of target systems mutually exclusive with systems corresponding to the vehicle electronic controllers on the same controller area network bus are added to a target mutual exclusion list, so as to obtain mutual exclusion relationships of systems controlled by each vehicle electronic controller on the same controller area network bus; the total number of data streams, the maximum number of selectable systems and the maximum number of selectable data streams of each system are set based on the system information and the data stream information, thereby avoiding too many data streams or systems selected by the user when selecting multi-system data streams, and then the bus mutual exclusion value of the vehicle electronic controller is determined, so that when receiving a data stream selection instruction of the user, mutual exclusion systems are determined according to the target data stream selected by the user, the bus mutual exclusion value of the vehicle electronic controller and the target mutual exclusion list, current selectable data streams are determined based on the mutual exclusion systems, the total number of data streams, the maximum number of selectable systems and the maximum number of selectable data streams of each system, so that the user selects multi-system data streams through the current selectable data streams, avoids selecting mutually exclusive systems when viewing data streams of multiple systems, and improves the experience of the user.

[0087] Referring to Figure 2 The embodiment of the application discloses a multi-system data stream selection device, which comprises:

[0088] The information reading module 11 is configured to scan all vehicle electronic controllers on the controller area network bus of the target vehicle by using multi-threading, and read system information and data stream information corresponding to the vehicle electronic controllers;

[0089] The mutual exclusion judgment module 12 is configured to judge whether there is mutual exclusion among vehicle electronic controllers on the same controller area network bus of the target vehicle, if there is mutual exclusion, system IDs of target systems mutually exclusive with systems corresponding to the vehicle electronic controllers on the same controller area network bus are added to a target mutual exclusion list;

[0090] The setting module 13 is configured to set the total number of data streams, the maximum number of selectable systems and the maximum number of selectable data streams of each system based on the system information and the data stream information, and determine the bus mutual exclusion value of the vehicle electronic controller;

[0091] The data stream selection module 14 is configured to, when receiving a data stream selection instruction of a user, determine a mutual exclusion system according to a target data stream selected by the user, a bus mutual exclusion value of the vehicle electronic controller and the target mutual exclusion list, determine a current selectable data stream based on the mutual exclusion system, a total data stream number, a maximum selectable system number and a maximum selectable data stream number of each system, so that the user selects a multi-system data stream through the current selectable data stream.

[0092] It can be seen that, in the multi-system data stream selection, the vehicle electronic controller on all controller area network buses of the target vehicle is scanned by using the multi-threading, and the system information and the data stream information corresponding to the vehicle electronic controller are read, so that the system controlled by each vehicle electronic controller and the data stream corresponding to the system are determined. Then, it is determined whether there is mutual exclusion among the vehicle electronic controllers on the same controller area network bus of the target vehicle. If there is mutual exclusion, the system ID of the target system corresponding to the system of the vehicle electronic controller which is mutually exclusive is added to the target mutual exclusion list, so that the mutual exclusion relationship of the system controlled by each vehicle electronic controller on the same controller area network bus is obtained. The total data stream number, the maximum selectable system number and the maximum selectable data stream number of each system are set based on the system information and the data stream information, so that the data stream or the system selected by the user in the multi-system data stream selection is avoided to be too much. Then, the bus mutual exclusion value of the vehicle electronic controller is determined, so that, when receiving the data stream selection instruction of the user, the mutual exclusion system is determined according to the target data stream selected by the user, the bus mutual exclusion value of the vehicle electronic controller and the target mutual exclusion list. The current selectable data stream is determined based on the mutual exclusion system, the total data stream number, the maximum selectable system number and the maximum selectable data stream number of each system, so that the user selects the multi-system data stream through the current selectable data stream, the mutually exclusive system is avoided to be selected when the data stream of the multiple systems is viewed, and the experience of the user is improved.

[0093] In a specific embodiment, the setting module 13 can specifically include:

[0094] The first mutual exclusion value determination sub-module is configured to determine the bus mutual exclusion value of the vehicle electronic controller according to the number of the controller area network buses of the target vehicle and the mutual exclusion relationship of each controller area network bus.

[0095] In a specific embodiment, the mutual exclusion value determination sub-module can specifically include:

[0096] The link support determination unit is configured to determine the number of paths supported by the communication link of the target vehicle for the mutual exclusion relationship of the controller area network buses.

[0097] A first mutual exclusion value determination unit is configured to determine a bus mutual exclusion value of the vehicle electronic controller according to the number of buses and the number of CAN buses of the target vehicle.

[0098] In a specific embodiment, the data stream selection module 14 can specifically include:

[0099] A second mutual exclusion value determination sub-module is configured to determine a user selection system corresponding to the target data stream, determine an unselected system according to the user selection system, and determine a bus mutual exclusion value of the user selection system based on the bus mutual exclusion value of the vehicle electronic controller.

[0100] A mutual exclusion value judgment sub-module is configured to judge whether the bus mutual exclusion value of the unselected system is equal to the bus mutual exclusion value of the user selection system.

[0101] A first mutual exclusion system determination sub-module is configured to, if the bus mutual exclusion value of the unselected system and the bus mutual exclusion value of the user selection system are not equal and the AND value of the bus mutual exclusion value of the unselected system and the bus mutual exclusion value of the user selection system is equal to 0, determine the unselected system as a mutual exclusion system of the user selection system.

[0102] A system ID judgment sub-module is configured to, if the bus mutual exclusion value of the unselected system is equal to the bus mutual exclusion value of the user selection system, judge whether a system ID corresponding to the unselected system exists in the target mutual exclusion list.

[0103] A second mutual exclusion system determination sub-module is configured to determine a mutual exclusion system according to a judgment result of whether the system ID corresponding to the unselected system exists in the target mutual exclusion list.

[0104] In a specific embodiment, the second mutual exclusion system determination sub-module can specifically include:

[0105] A second mutual exclusion system determination unit is configured to, if the system ID corresponding to the unselected system exists in the target mutual exclusion list, determine the unselected system as a mutual exclusion system of the user selection system.

[0106] A non-mutual exclusion system judgment unit is configured to, if the system ID corresponding to the unselected system does not exist in the target mutual exclusion list, judge that the unselected system is not a mutual exclusion system of the user selection system.

[0107] In a specific embodiment, the data stream selection module can specifically include:

[0108] A first enable setting unit is configured to set the mutual exclusion system corresponding to the target data stream as a first system enable.

[0109] The second enabling setting unit is configured to determine the second system enabling and data stream enabling corresponding to the target data stream according to the total data stream number, the maximum selectable system number and the maximum selectable data stream number of each system.

[0110] The page identifying unit is configured to perform page identification on the current unselectable data stream based on the first system enabling, the second system enabling and the data stream enabling, so that the user determines the current selectable data stream based on the corresponding page identification.

[0111] Further, the embodiment of the present application further discloses an electronic device, Figure 3 The electronic device 20 is shown in the structure diagram according to an exemplary embodiment, and the content in the diagram cannot be considered as any limitation on the use range of the present application.

[0112] Figure 3 The electronic device 20 provided by the embodiment of the present application is shown in the structure diagram. The electronic device 20 specifically can include at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26. The memory 22 is configured to store a computer program, the computer program is loaded and executed by the processor 21, so as to realize the related steps in the multi-system data stream selection method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the embodiment specifically can be an electronic computer.

[0113] In the embodiment, the power supply 23 is configured to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which is not limited specifically herein; the input / output interface 25 is configured to obtain external input data or output data to the outside, and the specific interface type can be selected according to the specific application needs, which is not limited specifically herein.

[0114] In addition, the memory 22 as a carrier for resource storage can be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage mode can be temporary storage or permanent storage.

[0115] The operating system 221 is configured to manage and control the various hardware devices on the electronic device 20, and the computer program 222 can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program capable of implementing the multi-system data flow selection method performed by the electronic device 20 disclosed in any of the above embodiments, the computer program 222 can further include computer programs capable of performing other specific tasks.

[0116] Further, the present application also discloses a computer readable storage medium for storing a computer program; wherein the computer program is executed by a processor to implement the multi-system data flow selection method disclosed above. For the specific steps of the method, please refer to the corresponding content disclosed in the above embodiments, which will not be repeated here.

[0117] The embodiments in the present specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. For the same or similar parts between the embodiments, please refer to the description of the other embodiments. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and please refer to the description of the method.

[0118] Those skilled in the art will further appreciate that the individual steps of the examples described in connection with the embodiments disclosed herein can be realized in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the examples have been described generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the particular application and design constraints imposed on the overall system. Skilled persons can implement the described functionality in varying ways for each particular application, but such implementation should not be interpreted to change the scope of the application.

[0119] The steps of the methods or algorithms described in connection with the embodiments disclosed herein can be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software module can be stored in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0120] Finally, it needs to be pointed out that in this document, relational terms such as first and second and the like can only be intended to distinguish one entity or operation from another entity or operation without necessarily requiring or implying any actual such relationship or order between such entities or operations. Moreover, the terms "comprising", "including", or any other variant thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without more limitations, an element defined by the statement "comprising a" does not exclude the existence of additional identical elements in the process, method, article, or apparatus including the stated element.

[0121] The above detailed description of the technical solutions provided by the present application has been provided, and the principles and implementation modes of the present application have been described by applying specific examples. The above description of the examples is only for the purpose of helping to understand the method of the present application and its core idea; at the same time, for those skilled in the art, according to the idea of the present application, the specific implementation mode and application range will be changed, and the above description of the content of the specification should not be understood as a limitation of the present application.

Claims

1. A multi-system data stream selection method, characterized by, The method comprises: scanning all vehicle electronic controllers on a controller area network bus of a target vehicle by using multi-threading, and reading system information and data stream information corresponding to the vehicle electronic controllers; the system information comprises system name, system abbreviation, and system ID; and the data stream information comprises data stream name and data stream unit; judging whether the vehicle electronic controllers on the same controller area network bus of the target vehicle are mutually exclusive, and if so, adding system IDs of target systems mutually exclusive with the vehicle electronic controllers to a target exclusion list; setting total data stream number, maximum selectable system number, and maximum selectable data stream number of each system based on the system information and the data stream information, and determining bus exclusion value of the vehicle electronic controllers; wherein the bus exclusion value of the vehicle electronic controllers is determined according to the number of controller area network buses of the target vehicle and the mutual exclusion relationship of each controller area network bus, and is represented by a 32-bit integer to support the mutual exclusion relationship of a maximum of 32 controller area network buses; when receiving a data stream selection instruction of a user, determining mutually exclusive systems according to the target data stream selected by the user, the bus exclusion value of the vehicle electronic controllers, and the target exclusion list, and determining currently selectable data streams based on the mutually exclusive systems, the total data stream number, the maximum selectable system number, and the maximum selectable data stream number of each system, so that the user selects multi-system data streams through the currently selectable data streams; the mutually exclusive systems comprise mutually exclusive systems of CAN buses determined based on the bus exclusion value and mutually exclusive systems located on the same CAN bus and having system IDs in the target exclusion list; the determination of the currently selectable data streams based on the mutually exclusive systems, the total data stream number, the maximum selectable system number, and the maximum selectable data stream number of each system comprises: setting the mutually exclusive systems corresponding to the target data stream as first system enables; determining second system enables and data stream enables corresponding to the target data stream according to the total data stream number, the maximum selectable system number, and the maximum selectable data stream number of each system; performing page identification on currently unselectable data streams through the first system enables, the second system enables, and the data stream enables, so that the user determines the currently selectable data streams based on the corresponding page identification.

2. The multi-system data stream selection method of claim 1, wherein, the determination of the bus exclusion value of the vehicle electronic controllers according to the number of controller area network buses of the target vehicle and the mutual exclusion relationship of each controller area network bus comprises: determining the number of paths supporting the mutual exclusion relationship of the controller area network buses by the communication link of the target vehicle; determining the bus exclusion value of the vehicle electronic controllers according to the number of paths and the number of controller area network buses of the target vehicle.

3. The multi-system data stream selection method of claim 1, wherein, the determination of mutually exclusive systems according to the target data stream selected by the user, the bus exclusion value of the vehicle electronic controllers, and the target exclusion list comprises: determining a user-selected system corresponding to the target data stream, determining an unselected system according to the user-selected system, and determining a bus exclusion value of the user-selected system based on a bus exclusion value of the vehicle electronic controller; determining whether the bus exclusion value of the unselected system is equal to the bus exclusion value of the user-selected system; if the bus exclusion value of the unselected system is not equal to the bus exclusion value of the user-selected system, and the AND value of the bus exclusion value of the unselected system and the bus exclusion value of the user-selected system is equal to 0, determining the unselected system as an exclusion system of the user-selected system; if the bus exclusion value of the unselected system is equal to the bus exclusion value of the user-selected system, determining whether a system ID corresponding to the unselected system exists in a target exclusion list; determining an exclusion system according to the result of the determination of whether the system ID corresponding to the unselected system exists in the target exclusion list.

4. The multi-system data stream selection method of claim 3, wherein, The determining of the exclusion system according to the result of the determination of whether the system ID corresponding to the unselected system exists in the target exclusion list comprises: if the system ID corresponding to the unselected system exists in the target exclusion list, determining the unselected system as the exclusion system of the user-selected system; if the system ID corresponding to the unselected system does not exist in the target exclusion list, determining that the unselected system is not the exclusion system of the user-selected system.

5. A multi-system data stream selection apparatus characterized by comprising: The method comprises: an information reading module configured to scan vehicle electronic controllers on all controller area network buses of a target vehicle by using multi-threading, and read system information and data stream information corresponding to the vehicle electronic controllers; the system information comprises a system name, a system abbreviation, and a system ID; and the data stream information comprises a name of a data stream and a unit of the data stream; an exclusion determining module configured to determine whether the vehicle electronic controllers on the same controller area network bus of the target vehicle exist in exclusion, and if the vehicle electronic controllers exist in exclusion, add system IDs of target systems corresponding to systems in exclusion to the vehicle electronic controllers to a target exclusion list; a setting module configured to set a total number of data streams, a maximum number of selectable systems, and a maximum number of selectable data streams of each system based on the system information and the data stream information, and determine a bus exclusion value of the vehicle electronic controller; wherein the bus exclusion value of the vehicle electronic controller is determined according to a number of controller area network buses of the target vehicle and an exclusion relationship of each controller area network bus, and the bus exclusion value is represented by a 32-bit integer to support the exclusion relationship of a maximum of 32 controller area network buses. The data stream selection module is configured to, when receiving a data stream selection instruction of a user, determine a mutual exclusion system according to a target data stream selected by the user, a bus mutual exclusion value of a vehicle electronic controller, and the target mutual exclusion list, determine a current selectable data stream based on the mutual exclusion system, a total data stream number, a maximum selectable system number, and a maximum selectable data stream number of each system, so that the user selects a multi-system data stream through the current selectable data stream; the mutual exclusion system includes a CAN bus mutual exclusion mutual exclusion system determined based on the bus mutual exclusion value and a mutual exclusion system located on the same CAN bus and having a system ID in the target mutual exclusion list; The data stream selection module is configured to set a first system enable of the mutual exclusion system corresponding to the target data stream, determine a second system enable and a data stream enable corresponding to the target data stream according to the total data stream number, the maximum selectable system number, and the maximum selectable data stream number of each system, and perform page identification on a current unselectable data stream through the first system enable, the second system enable, and the data stream enable, so that the user determines the current selectable data stream based on corresponding page identification.

6. An electronic device, comprising: Comprise: A memory configured to store a computer program; A processor configured to execute the computer program to implement the multi-system data stream selection method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that, A computer program is stored in a memory and executed by a processor to implement the multi-system data stream selection method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • On-board diagnostic method, device and system

    WO2023205916A1