Vehicle data acquisition method and device, storage medium and electronic equipment

By converting and collecting CAN messages in the domain controller of the vehicle system, the problem of high demand for TBOX hardware resources is solved, efficient and flexible collection of vehicle data is achieved, and the hardware cost of remote communication terminals is reduced.

CN119094624AActive Publication Date: 2024-12-06ANHUI DEEPWAY TECHNOLOGY CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411040626.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-12-06
Estimated Expiration
2044-07-30

AI Technical Summary

Technical Problem

In the existing vehicle data acquisition methods, TBOX needs to access each CAN bus when directly collecting vehicle data, resulting in high requirements for TBOX's CAN interface resources and hardware computing power, which increases costs.

Method used

By collecting CAN messages in various domain controllers of the vehicle system, and converting multiple message frames into big data messages in SOMEIP protocol format based on network segment identification information, and forwarding them to remote communication terminals, reducing the TBOX hardware Resource requirements.

Benefits of technology

It realizes efficient and flexible collection of vehicle data, reduces the hardware cost requirements of remote communication terminals, and improves the acquisition efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094624A_ABST
    Figure CN119094624A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle data collection method and device, a storage medium and electronic equipment, and the method comprises the steps: collecting a CAN message in a vehicle CAN bus, wherein the CAN message comprises a plurality of message frames and the network segment identification information of each message frame; converting the CAN message into a big data message in an SOMEIP protocol format according to the network segment identification information of each message frame; wherein each big data message comprises N SOMEIP data items, the N SOMEIP data items are obtained by converting N first message frames with the same network segment identification information, each big data message further comprises first network segment identification information corresponding to the first message frames, and N is an integer greater than or equal to 1; and sending the big data message to a remote communication terminal. As the conversion of the message format occurs in each domain controller, the remote communication terminal only needs to receive the big data message, so that the requirements on CAN interface resources and hardware computing power of the remote communication terminal are low, the hardware cost of the remote communication terminal does not need to be increased, and the efficient and flexible acquisition of the whole vehicle data can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of vehicle-mounted communications, and in particular, relates to a method, device, storage medium and electronic device for collecting vehicle data. Background Art

[0002] The existing method for real-time data collection of the whole vehicle is mainly to directly collect the CAN (Controller Area Network) bus data in the vehicle bus through the vehicle terminal such as TBOX (Telematics BOX, remote communication terminal). However, this method of whole vehicle data collection has the following defects: when using TBOX to directly collect vehicle data, TBOX must be directly connected to each CAN bus to realize the collection of whole vehicle data. However, due to the increase in vehicle functions, the number of CAN bus transmissions in the vehicle is increasing, which puts forward higher requirements on the CAN interface resources of TBOX; at the same time, due to the large amount of data, the more CAN data TBOX receives, the higher the requirements on its MCU computing power, etc. However, it is not cost-effective to improve the MCU specifications of TBOX just to realize the collection of whole vehicle data. Summary of the invention

[0003] The present application aims to solve at least one of the technical problems existing in the related art. To this end, the present application proposes a vehicle data collection method, which can improve the flexibility and efficiency of vehicle data collection without increasing the hardware cost of TBOX.

[0004] In a first aspect, the present application provides a method for collecting vehicle data, which is applied to each domain controller of a vehicle system, and the method includes:

[0005] Collecting CAN messages in a vehicle CAN bus, wherein the CAN messages include a plurality of message frames and network segment identification information of each of the message frames;

[0006] The CAN message is converted into a large data message in a SOMEIP protocol format according to the network segment identification information of each message frame; wherein each of the large data messages includes N SOMEIP data items, and the N SOMEIP data items are converted from N first message frames with the same network segment identification information, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1;

[0007] The large data message is sent to a remote communication terminal.

[0008] According to the vehicle data collection method of the present application, each domain controller collects CAN messages in its own local area network, and converts N first message frames with the same network segment identification information in the collected multiple message frames from CAN format to N SOMEIP protocol format SOMEIP data items according to the network segment identification information, and then the N SOMEIP data items form a large data message, which is finally forwarded to the remote communication terminal. Since the message format conversion occurs in each domain controller, the requirements for the CAN interface resources and hardware computing power of the remote communication terminal are small, that is, there is no need to increase the hardware cost of the remote communication terminal, and each domain controller can simultaneously complete the collection and conversion of CAN messages of different types of vehicle data in its own local area network, thereby realizing efficient and flexible collection of vehicle data.

[0009] In a second aspect, the present application provides a method for collecting vehicle data, which is applied to a remote communication terminal of a vehicle system, and the method includes:

[0010] Receive a large data message sent by each domain controller, wherein the large data message is obtained by converting the CAN messages in the vehicle CAN bus collected by each domain controller into messages in the SOMEIP protocol format according to the network segment identification information of each message frame in the CAN message, each of the large data messages includes N SOMEIP data items, and the N SOMEIP data items are converted from N first message frames with the same network segment identification information in the CAN message, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1.

[0011] According to the vehicle data collection method of the present application, each domain controller collects CAN messages in its own local area network, and converts N first message frames with the same network segment identification information in the collected multiple message frames from CAN format to N SOMEIP protocol format SOMEIP data items according to the network segment identification information, and then the N SOMEIP data items form a big data message, which is finally forwarded to the remote communication terminal. Since the message format conversion occurs in each domain controller, the remote communication terminal only needs to receive the big data message, so the requirements for the CAN interface resources and hardware computing power of the remote communication terminal are small, that is, there is no need to increase the hardware cost of the remote communication terminal, and each domain controller can simultaneously complete the collection and conversion of CAN messages of different types of vehicle data in its own local area network, so as to realize efficient and flexible collection of vehicle data.

[0012] In a third aspect, the present application provides a vehicle data collection device, the device comprising:

[0013] A collection module, used for collecting CAN messages in a vehicle CAN bus, wherein the CAN messages include a plurality of message frames and network segment identification information of each of the message frames;

[0014] A conversion module, used to convert the CAN message into a large data message in the SOMEIP protocol format according to the network segment identification information of each message frame; wherein each of the large data messages includes N SOMEIP data items, the N SOMEIP data items are converted from N first message frames with the same network segment identification information, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1;

[0015] The sending module is used to send the large data message to the remote communication terminal.

[0016] In a fourth aspect, the present application provides a vehicle data collection device, the device comprising:

[0017] A receiving module is used to receive a large data message sent by each domain controller, wherein the large data message is obtained by converting the CAN message in the vehicle CAN bus collected by each domain controller into a message in the SOMEIP protocol format according to the network segment identification information of each message frame in the CAN message, each of the large data messages includes N SOMEIP data items, and the N SOMEIP data items are converted from N first message frames with the same network segment identification information in the CAN message, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1.

[0018] In a fifth aspect, the present application provides a domain controller, which is communicatively connected to a remote communication terminal in a vehicle system, and the domain controller includes:

[0019] A collection module, used for collecting CAN messages in a vehicle CAN bus, wherein the CAN messages include a plurality of message frames and network segment identification information of each of the message frames;

[0020] A conversion module, used to convert the CAN message into a large data message in the SOMEIP protocol format according to the network segment identification information of each message frame; wherein each of the large data messages includes N SOMEIP data items, the N SOMEIP data items are converted from N first message frames with the same network segment identification information, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1;

[0021] A sending module is used to send the large data message to the remote communication terminal.

[0022] In a sixth aspect, the present application provides a remote communication terminal, which is communicatively connected to each domain controller in the vehicle system, and the remote communication terminal includes:

[0023] A receiving module is used to receive a large data message sent by each domain controller, wherein the large data message is obtained by converting the CAN message in the vehicle CAN bus collected by each domain controller into a message in the SOMEIP protocol format according to the network segment identification information of each message frame in the CAN message, each of the large data messages includes N SOMEIP data items, and the N SOMEIP data items are converted from N first message frames with the same network segment identification information in the CAN message, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1.

[0024] In a seventh aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for collecting vehicle data as described in the first aspect above is implemented.

[0025] In an eighth aspect, the present application provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for collecting vehicle data as described in the first aspect above is implemented.

[0026] In a ninth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method for collecting vehicle data as described in the first aspect.

[0027] In a tenth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method for collecting whole vehicle data as described in the first aspect above.

[0028] The above technical solutions in the embodiments of the present application have at least the following technical effects:

[0029] The vehicle data collection method, device, storage medium and electronic device of the embodiments of the present application, each domain controller collects CAN messages in its own local area network, and converts N first message frames with the same network segment identification information in the collected multiple message frames from CAN format to N SOMEIP protocol format SOMEIP data items according to the network segment identification information, and then the N SOMEIP data items form a large data message, which is finally forwarded to the remote communication terminal. Since the message format conversion occurs in each domain controller, the remote communication terminal only needs to receive the large data message, so the requirements for the CAN interface resources and hardware computing power of the remote communication terminal are small, that is, there is no need to increase the hardware cost of the remote communication terminal, and each domain controller can simultaneously complete the collection and conversion of CAN messages of different types of vehicle data in its own local area network, so as to realize efficient and flexible collection of vehicle data.

[0030] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0032] Figure 1 This is one of the flow charts of the vehicle data collection method provided in the embodiment of the present application;

[0033] Figure 2 It is a schematic diagram of the architecture of the domain controller vehicle network system provided in an embodiment of the present application;

[0034] Figure 3 It is a schematic diagram of the format of the SOMEIP data item after Standard CAN conversion provided in the embodiment of the present application;

[0035] Figure 4 It is a schematic diagram of the format of the SOMEIP data item after the Extended CAN conversion provided in the embodiment of the present application;

[0036] Figure 5 It is a schematic diagram of the structure of a large data message in the SOMEIP protocol format provided in an embodiment of the present application;

[0037] Figure 6 It is a schematic diagram of the structure of the message header of the large data message provided in the embodiment of the present application;

[0038] Figure 7 It is a structural diagram of the reference absolute time in the message header provided in an embodiment of the present application;

[0039] Figure 8 This is the second flow chart of the vehicle data collection method provided in the embodiment of the present application;

[0040] Fig. 9 This is one of the structural schematic diagrams of the vehicle data collection device provided in the embodiment of the present application;

[0041] Fig.10 This is the second structural diagram of the vehicle data collection device provided in the embodiment of the present application;

[0042] Fig.11 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0043] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0044] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0045] In conjunction with the accompanying drawings, the vehicle data collection method, device, electronic device and readable storage medium provided in the embodiments of the present application are described in detail through specific embodiments and their application scenarios.

[0046] Among them, the method for collecting vehicle data can be applied to a terminal, and can be specifically executed by hardware or software in the terminal.

[0047] The method for collecting whole vehicle data provided in the embodiments of the present application may be executed by an electronic device or a functional module or functional entity in the electronic device that can implement the method for collecting whole vehicle data. The electronic devices mentioned in the embodiments of the present application include but are not limited to mobile phones, tablet computers, computers, cameras, and wearable devices. The method for collecting whole vehicle data provided in the embodiments of the present application is described below using an electronic device as an example of an execution subject.

[0048] like Figure 1 As shown, the vehicle data collection method is applied to each domain controller of the vehicle system, including:

[0049] Step S100, collecting CAN messages in the vehicle CAN bus, wherein the CAN messages include multiple message frames and network segment identification information of each message frame.

[0050] S200, converting the CAN message into a large data message in the SOMEIP protocol format according to the network segment identification information of each of the message frames; wherein each of the large data messages includes N SOMEIP data items, and the N SOMEIP data items are obtained by converting N first message frames with the same network segment identification information, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1.

[0051] S300, sending the large data message to the remote communication terminal TBOX.

[0052] The vehicle data collection method provided in the embodiment of the present application matches the current mainstream domain controller vehicle network system (i.e., vehicle system), including multiple data communication modules (DCM, Data Communication Module) - i.e., domain controller, gateway module (GW, Gateway) with Ethernet switching function, and remote communication terminal (TBOX). Each DCM is connected to the corresponding collection node through its own private CAN network, and is connected to the GW for communication. The GW is connected to the TBOX for communication, and the TBOX realizes remote communication with the TSP (cloud) through the 4G / 5G network. Figure 2 The whole vehicle system shown includes two DCMs, one GW, and one TBOX. Each DCM is connected to multiple acquisition nodes through a CAN bus, and the GW is also connected to multiple acquisition nodes through the CAN bus. The two DCMs are connected to the GW through Ethernet, and the GW is connected to the TBOX through Ethernet and CAN bus. The TBOX realizes remote communication with the TSP (cloud) through a 4G / 5G network.

[0053] The method for collecting vehicle data provided in the embodiment of the present application can be executed by each domain controller in the vehicle system. Each domain controller will collect CAN messages from each communication node connected to its CAN bus. It can be understood that the CAN messages collected by each domain controller include multiple message frames and network segment identification information of each message frame, that is, each domain controller can collect multiple message frames from different network segments, and the multiple message frames are aggregated into CAN messages at the domain controller. In order to solve the problem in the prior art that TBOX needs to connect to CAN messages of different formats and process CAN messages of different formats when forwarding CAN messages, which leads to increased TBOX hardware cost, the CAN messages are converted into big data messages in the SOMEIP (Scalabeservice-Oriented MiddlewarE over IP protocol, a communication protocol based on Ethernet that can perform service-oriented interaction) protocol format in the domain controller. Since the big data messages are messages with remote interaction, when the big data messages are forwarded to the remote communication terminal, the remote communication terminal does not need to convert and analyze the big data messages, thereby saving the possible increased hardware cost. In addition, each domain controller converts the collected CAN message frames separately without the need to centralize them for processing in the TBOX, and the collection efficiency is high and flexible. Specifically, N first message frames with the same network segment identification information in the collected multiple message frames can be converted from CAN format into N SOMEIP protocol format SOMEIP data items, and then the N SOMEIP data items form a big data message. It can be understood that message frames from the same network segment are usually data with the same or similar characteristics, such as the temperature, humidity, air outlet direction and other control parameters of the vehicle air conditioner, and the vehicle's forward, backward, left turn, right turn and other direction control parameters are from the same network segment. Therefore, the big data message formed after the N first message frames with the same network segment identification are converted into N SOMEIP data items is usually communication data that can reflect certain driving characteristics of the vehicle, which is convenient for subsequent analysis after vehicle data collection.

[0054] In addition, it is worth noting that in the vehicle data collection method provided in the embodiment of the present application, a CAN message can be converted into multiple big data messages. For example, if a CAN message includes multiple CAN message frames with m network segment identification information, then m big data messages can be formed, and each big data message can include at least one first message frame. Thus, each domain controller collects CAN messages in its own local area network, and converts its own big data message according to the network segment identification information, and then sends its own converted big data message to the remote communication terminal, thereby realizing efficient collection of vehicle data.

[0055] In the method for collecting whole vehicle data provided by the embodiment of the present application, each domain controller collects CAN messages in its own local area network, and converts N first message frames with the same network segment identification information in the collected multiple message frames from CAN format to N SOMEIP protocol format SOMEIP data items according to the network segment identification information, and then the N SOMEIP data items form a large data message, which is finally forwarded to the remote communication terminal. Since the message format conversion occurs in each domain controller, the requirements for the CAN interface resources and hardware computing power of the remote communication terminal are small, that is, there is no need to increase the hardware cost of the remote communication terminal, and each domain controller can simultaneously complete the collection and conversion of CAN messages of different types of vehicle data in its own local area network, so as to realize efficient and flexible collection of whole vehicle data.

[0056] It should be noted that since the message frames of CAN messages include Standard CAN (standard CAN frame) and Extended CAN (extended CAN frame), and the lengths of the two are different, the format of the SOMEIP data item after Standard CAN conversion is as follows: Figure 3 As shown in the figure, the format of the SOMEIP data item after Extended CAN conversion is as follows Figure 4 As shown in the figure. To adapt to different types of CAN frames.

[0057] In some embodiments, the CAN message also includes a collection timestamp of each message frame. Step S200 includes: sorting the N SOMEIP data items according to the collection timestamp, and combining each SOMEIP data item with the collection timestamp of the corresponding first message frame to obtain a message data segment (Data); recording the first network identification information and the reference absolute time (Time Stamp) in the message header (Header), and the reference absolute time corresponds to one of the N collection timestamps, which is used to determine the absolute collection time of each SOMEIP data item; and obtaining the large data message from the message data segment (Data) and the message header (Header).

[0058] By introducing the acquisition timestamp of the message frame and the reference absolute time to determine the absolute acquisition time of each message frame / SOMEIP data item, it is convenient for the subsequent analysis of the whole vehicle data collected in a certain time period or the time domain analysis of the whole vehicle data. Specifically, the N SOMEIP data items are sorted according to the acquisition timestamp, and each of the SOMEIP data items is combined with the acquisition timestamp of the corresponding first message frame to obtain a message data segment, and the first network identification information and the reference absolute time are recorded in the message header, and the large data message is obtained from the message data segment and the message header. That is, the large data message in the embodiment of the present application at least includes a message data segment and a message header, and the structure of the large data message in the SOMEIP protocol format is as follows: Figure 5 shown.

[0059] It can be understood that when the N SOMEIP data items are sorted according to the collection timestamps, they can be sorted in ascending order or descending order according to the order of the collection timestamps. Correspondingly, the N corresponding timestamps are also sorted in ascending order or descending order, and the N SOMEIP data items sorted in ascending order and the N corresponding timestamps sorted in ascending order are combined in a combination form such as: [Data1, Data2, Data3...DataN; T1, T2, T3...TN], or the N SOMEIP data items sorted in descending order and the N corresponding timestamps sorted in descending order are combined in a combination form such as: [DataN, DataN-1, DataN-2,...Data2, Data1; TN, TN-1, TN-2...T2, T1], or the N SOMEIP data items sorted in ascending order and the N corresponding timestamps sorted in descending order are combined in a combination form such as: [Data1, Data2, Data3...DataN; TN, TN-1, TN-2...T2, T1], thereby obtaining the message data segment. It should be noted that the combination of N SOMEIP data items and N corresponding timestamps is not limited to the combination in the above examples. Any combination that can match N SOMEIP data items and N corresponding timestamps should be within the protection scope of this technical solution.

[0060] Preferably, the N SOMEIP data items are sequentially sorted in the order of the acquisition time, and the acquisition timestamps of the N first message frames are sequentially combined with the SOMEIP data items in the order of the acquisition time to obtain the message data segment. That is, the SOMEIP data items are combined in a one-to-one correspondence with the acquisition timestamps, such as [Data1, T1, Data2, T2, Data3, T3 ... DataN, TN] or [T1, Data1, T2, Data2, T3, Data3 ... TN, DataN], etc. The recording method of the message data segment facilitates the subsequent calculation of the absolute acquisition time of each SOMEIP data item.

[0061] At the same time, the reference absolute time is also recorded in the message header of the large data message to determine the absolute time of collection of the CAN message frame / SOMEIP data item.

[0062] In some embodiments, the reference absolute time preferably corresponds to the first or last acquisition timestamp after sorting the N acquisition timestamps in chronological order, or may correspond to a certain acquisition timestamp in the middle. When calculating the acquisition absolute time, the reference absolute time is added or subtracted from each acquisition timestamp to obtain the acquisition absolute time. For example, in case 1, if the reference absolute time corresponds to the first acquisition timestamp, and the N SOMEIP data items are sorted in positive order according to the acquisition time, then the acquisition absolute time T of the i-th CAN message frame / SOMEIP data item is i =TimeStamp+(LocalTimeStamp i -LocalTimeStamp1), where TimeStamp is the reference absolute timestamp, LocalTimeStamp i is the acquisition timestamp of the i-th CAN message frame / SOMEIP data item, LocalTimeStamp1 is the acquisition timestamp of the first CAN message frame / SOMEIP data item; For example, in case 2: if the reference absolute time corresponds to the unacquired timestamp, and the N SOMEIP data items are sorted in reverse order of acquisition time, then the acquisition absolute time T of the i-th CAN message frame / SOMEIP data item is i =TimeStamp-(LocalTimeStamp N -LocalTimeStamp N-i+1 ), where LocalTimeStamp N The last collection timestamp, LocalTimeStamp N-i+1is the acquisition timestamp of the i-th CAN message frame / SOMEIP data item; for example: if the reference absolute time corresponds to a certain acquisition timestamp (target acquisition timestamp) in the middle, and the N SOMEIP data items are sorted in positive order according to the acquisition time, then the acquisition absolute time of each SOMEIP data item before the target acquisition timestamp is calculated according to the calculation method in the above case 2, and the acquisition absolute time of each SOMEIP data item after the target acquisition timestamp is calculated according to the calculation method in the above case 1.

[0063] In some embodiments, the reference absolute time recorded in the message header is in the form of a timestamp format in NTPv3, representing the time from 0:00 UTC on January 1, 1990 to the present. The length of the reference absolute time is 8 bytes, such as Figure 7 As shown, the upper 4 bytes are in seconds, and the lower 4 bytes are in 1 / 2 to the power of 32 seconds, both using the MSB (Most Significant Bit) byte.

[0064] In some embodiments, Figure 6 As shown, the message header (Header) of the large data message also includes a reserved field (Resreved) and a protocol version field (Version). Among them, the reserved field is used for subsequent expansion, which can improve the continuity of the scheme adaptation. In some embodiments, the length of the reserved field is 2 bytes; the protocol version of the large data message is recorded in the protocol version field to facilitate the conversion method between the CAN message frame and the SOMEIP data item. In some embodiments, the length of the protocol version field is 1 byte, the high 4 bits are the main version, and the low 4 bits are the minor version. If the current version is V1.0, Version = 0x10. In some embodiments, the encoding format of the protocol version field is BCD (Binary Coded Decimal). In some embodiments, the network segment identification field (Nw ID) of the message header is used to record the network segment identification information, and the network segment identification information is used to identify the identifier of the network segment where the CAN message frame / SOMEIP data item is located. The length of the network segment identification field is 1 byte, and only one network segment identification information is recorded in a large data message.

[0065] In some embodiments, step S300 includes: sending the large data message to the remote communication terminal according to a preset sending period / set length data segment.

[0066] When sending a large data message to a remote communication terminal, the sending method can be based on a preset sending cycle to ensure that the large data message can be sent to the remote communication terminal in time, or the large data message can be sent to the remote communication terminal in a set length data segment, that is, when it is determined that the length of the message data segment in the large data message reaches the set length, the large data message is sent to the remote communication terminal to ensure that the large data message will not be segmented due to being too long. Of course, it can also be a combination of the two, sending the large data message when the preset sending cycle or the set length data segment meets any value. For example, if the preset sending cycle has not arrived, but the length of the message data segment in the large data message has reached the set length, the large data message is immediately sent to the remote communication terminal, and the next SOMEIP data item is written into the new large data message when it is generated. Among them, the set length data can be 1400 bytes.

[0067] In some embodiments, before step S100, it includes: receiving a time synchronization message sent by the remote communication terminal according to a set period, and performing time synchronization between each collection node under its jurisdiction and the remote communication terminal according to the time synchronization message. If after receiving the time synchronization message sent by the remote communication terminal for the first time, the time synchronization message sent by the remote communication terminal is not received within the set period, local clock synchronization is started until the time synchronization message is received again.

[0068] Before collecting vehicle data, the time synchronization message sent by the remote communication terminal is used to synchronize the collection nodes in the vehicle system to ensure the time accuracy of the collected data. At the same time, if the remote communication terminal fails to send the time synchronization message in time during time synchronization, the local clock synchronization is started to ensure the time accuracy of the vehicle system, so that the cloud can completely restore the collected data of the vehicle for a certain period of time.

[0069] like Figure 8 As shown, the vehicle data collection method provided in the embodiment of the present application is applied to the remote communication terminal of the vehicle system, including:

[0070] S100', receiving a large data message sent by each domain controller, wherein the large data message is obtained by converting the CAN messages in the vehicle CAN bus collected by each domain controller into messages in the SOMEIP protocol format according to the network segment identification information of each message frame in the CAN message, each of the large data messages includes N SOMEIP data items, and the N SOMEIP data items are converted from N first message frames with the same network segment identification information in the CAN message, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1.

[0071] According to the vehicle data collection method provided in the embodiment of the present application, CAN messages in their respective local area networks are collected by each domain controller, and N first message frames with the same network segment identification information in the collected multiple message frames are converted from CAN format to N SOMEIP protocol format SOMEIP data items according to the network segment identification information, and then a large data message is composed of the N SOMEIP data items, which is finally forwarded to the remote communication terminal. Since the message format conversion occurs in each domain controller, the remote communication terminal only needs to receive the large data message, so the requirements for the CAN interface resources and hardware computing power of the remote communication terminal are small, that is, there is no need to increase the hardware cost of the remote communication terminal, and each domain controller can simultaneously complete the collection and conversion of CAN messages of different types of vehicle data in its respective local area network, so as to realize efficient and flexible collection of vehicle data.

[0072] In some embodiments, the large data message includes a message data segment and a message header, the message data segment is obtained by sorting the N SOMEIP data items according to the acquisition timestamps of each of the first message frames and combining the N SOMEIP data items with the corresponding N first message frames. The message header records the reference absolute time for determining the absolute acquisition time of each of the SOMEIP data items and the first network segment identification information, and the reference absolute time corresponds to one of the N acquisition timestamps.

[0073] In some embodiments, the message data segment is obtained by sorting the N SOMEIP data items in chronological order according to the acquisition time of each of the first message frames and combining each of the SOMEIP data items with the corresponding acquisition timestamp of the first message frame in sequence, and the reference absolute time in the message header corresponds to the first or last acquisition timestamp.

[0074] In the above embodiment, the acquisition timestamp of the message frame and the reference absolute time are introduced to determine the acquisition absolute time of each message frame / SOMEIP data item, so as to facilitate the subsequent analysis of the whole vehicle data collected in a certain time period or the time domain analysis of the whole vehicle data. The ordering and combination of each SOMEIP data item and each acquisition timestamp refer to the description in the above embodiment, which will not be repeated here.

[0075] In some embodiments, before step S100', it includes: performing external time synchronization with the cloud, and after completing the external time synchronization, sending a time synchronization message to each of the domain controllers according to a set period.

[0076] Before synchronizing time with each domain controller, the remote communication terminal first synchronizes with the external network or GPS to ensure the time accuracy of the entire vehicle system.

[0077] Specifically, the Master (remote communication terminal) should complete synchronization with the network or GPS time within 30 seconds after network awakening; after external synchronization is completed, it should start periodic broadcast time synchronization messages and have the ability to respond to large data messages; the domain controller should have the ability to receive broadcast time synchronization messages within 30 seconds after awakening, and start creating and sending large data messages within 100ms of receiving the first frame of broadcast time synchronization message. At the same time, the domain controller should be able to fill in the correct acquisition timestamp and record the correct reference absolute time in the large data message; at the same time, after receiving the Master's broadcast time synchronization message, if it cannot receive the broadcast time synchronization message after a period of time, the domain controller should use the local crystal oscillator to maintain time until the Master resumes sending broadcast time synchronization messages.

[0078] In some embodiments, after step S100', it includes: uploading the big data message to the cloud according to a preset rule and / or calculating the collection absolute time of each SOMEIP data item according to the reference absolute time and each collection timestamp.

[0079] In this embodiment, the absolute collection time of each SOMEIP data item can be calculated according to the reference absolute time and each collection timestamp, and the calculation method in the above embodiment can be referred to, which will not be repeated here. It is worth noting that uploading the big data message to the cloud and calculating the absolute collection time of each SOMEIP data item can be performed in parallel, and only one of the two can be performed as needed.

[0080] In this embodiment, uploading the big data message to the cloud according to the preset rules includes at least the following methods:

[0081] First, cache the received big data message, and upload the cached big data message to the cloud when the cache time reaches the preset cache time or the cache quantity reaches the preset cache quantity. This upload method can be applied in scenarios where real-time requirements are not high, which can not only save data traffic but also ensure the accuracy of uploaded data. The preset cache time can be 1 minute.

[0082] Second, determine whether the transmission link is communicating well (such as whether it is less than the set communication load). If it is determined that the transmission link is communicating well (the communication load of the transmission link is less than the set communication load), upload the received big data message to the cloud. This upload method can ensure that the big data message is uploaded accurately, and there will be no upload failure due to network problems.

[0083] Third, determine whether a predefined event occurs, such as an emergency braking event, a sharp turn event, etc. When a predefined event is determined to occur, upload the large data message within a specific time before and after the event (such as 15 seconds before and after). This upload method can save data traffic and reduce the transmission of unnecessary data.

[0084] Fourth, configure the upload enable of the remote communication terminal. In response to the user's enable selection, when the upload enable is turned on, the big data message is uploaded, and when the upload enable is turned off, the big data message is not uploaded. Specifically, the 2E service (TBD) can be used to write DID 0x0908, write 0x1 to enable big data upload, and write 0x0 to disable big data upload. This method can meet the user's flexibility and personalized needs.

[0085] In addition, it should be noted that when uploading large data packets to the cloud, a flexible upload protocol can be used, such as MQTTT (Message Queuing Telemetry Transport), HTTP (Hyper Text Transfer Protocol), etc. The large data packet upload protocol should use a separate port number, such as 30500 for Agent and 30550 for Master.

[0086] The vehicle data collection method provided in the embodiment of the present application can be executed by a vehicle data collection device. In the embodiment of the present application, the vehicle data collection method is executed by a vehicle data collection device as an example to illustrate the vehicle data collection device provided in the embodiment of the present application.

[0087] The present application also provides a vehicle data collection device, such as Fig. 9 As shown, the whole vehicle data collection device includes: a collection module 100, used to collect CAN messages in the vehicle CAN bus, wherein the CAN messages contain multiple message frames and the network segment identification information of each message frame. A conversion module 200, used to convert the CAN messages into a large data message in the SOMEIP protocol format according to the network segment identification information of each message frame; wherein each of the large data messages includes N SOMEIP data items, and the N SOMEIP data items are obtained by converting N first message frames with the same network segment identification information, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1. A sending module 200, used to send the large data message to a remote communication terminal.

[0088] According to the vehicle data collection device provided in the embodiment of the present application, CAN messages in the respective local area networks are collected through each domain controller, and N first message frames with the same network segment identification information in the collected multiple message frames are converted from CAN format to N SOMEIP protocol format SOMEIP data items according to the network segment identification information, and then a large data message is composed of the N SOMEIP data items, which is finally forwarded to the remote communication terminal. Since the message format conversion occurs in each domain controller, the remote communication terminal only needs to receive the large data message, so the requirements for the CAN interface resources and hardware computing power of the remote communication terminal are small, that is, there is no need to increase the hardware cost of the remote communication terminal, and each domain controller can simultaneously complete the collection and conversion of CAN messages of different types of vehicle data in its respective local area network, so as to realize efficient and flexible collection of vehicle data.

[0089] The present application also provides a vehicle data collection device, such as Fig.10 As shown, it includes: a receiving module, which is used to receive the big data message sent by each domain controller, wherein the big data message is obtained by converting the CAN message in the vehicle CAN bus collected by each domain controller into a message in the SOMEIP protocol format according to the network segment identification information of each message frame in the CAN message, each of the big data message includes N SOMEIP data items, and the N SOMEIP data items are converted from N first message frames with the same network segment identification information in the CAN message, and each of the big data message also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1.

[0090] According to the vehicle data collection device provided in the embodiment of the present application, CAN messages in the respective local area networks are collected through each domain controller, and N first message frames with the same network segment identification information in the collected multiple message frames are converted from CAN format to N SOMEIP protocol format SOMEIP data items according to the network segment identification information, and then a large data message is composed of the N SOMEIP data items, which is finally forwarded to the remote communication terminal. Since the message format conversion occurs in each domain controller, the remote communication terminal only needs to receive the large data message, so the requirements for the CAN interface resources and hardware computing power of the remote communication terminal are small, that is, there is no need to increase the hardware cost of the remote communication terminal, and each domain controller can simultaneously complete the collection and conversion of CAN messages of different types of vehicle data in its respective local area network, so as to realize efficient and flexible collection of vehicle data.

[0091] The vehicle data collection device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than the terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., and the embodiment of the present application is not specifically limited.

[0092] The vehicle data collection device in the embodiment of the present application may be a device having an operating system. The operating system may be a Microsoft (Windows) operating system, an Android (Android) operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0093] The vehicle data collection device provided in the embodiment of the present application can implement each process implemented in the aforementioned method embodiment, and will not be described again here to avoid repetition.

[0094] The embodiment of the present application further provides a domain controller, which is communicatively connected to a remote communication terminal in a vehicle system, including:

[0095] A collection module is used to collect CAN messages in a vehicle CAN bus, wherein the CAN messages include multiple message frames and network segment identification information of each message frame; a conversion module is used to convert the CAN messages into a large data message in a SOMEIP protocol format according to the network segment identification information of each message frame; wherein each of the large data messages includes N SOMEIP data items, and the N SOMEIP data items are obtained by converting N first message frames with the same network segment identification information, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1; a sending module is used to send the large data message to the remote communication terminal.

[0096] An embodiment of the present application also provides a remote communication terminal, which is communicatively connected to each domain controller in the whole vehicle system, and includes: a receiving module, which is used to receive a large data message sent by each domain controller, wherein the large data message is obtained by converting the CAN message in the vehicle CAN bus collected by each domain controller into a message in the SOMEIP protocol format according to the network segment identification information of each message frame in the CAN message, each of the large data messages includes N SOMEIP data items, and the N SOMEIP data items are converted from N first message frames with the same network segment identification information in the CAN message, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1.

[0097] The domain controller and the remote communication terminal provided in the embodiments of the present application can implement the various processes implemented in the aforementioned method embodiments, and will not be described again here to avoid repetition.

[0098] In some embodiments, Fig.11 As shown, an embodiment of the present application further provides an electronic device 800, including a processor 801, a memory 802, and a computer program stored in the memory 802 and executable on the processor 801. When the program is executed by the processor 801, each process of the above-mentioned vehicle data collection method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0099] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0100] An embodiment of the present application also provides a non-transitory computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the various processes of the above-mentioned vehicle data collection method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0101] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0102] An embodiment of the present application also provides a computer program product, including a computer program, which implements the above-mentioned vehicle data collection method when executed by a processor.

[0103] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0104] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned vehicle data collection method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0105] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0106] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0107] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0108] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

[0109] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0110] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.

Claims

1. A method for collecting vehicle data, characterized in that: Applied to various domain controllers of the vehicle system, including: Collecting CAN messages in a vehicle CAN bus, wherein the CAN messages include a plurality of message frames and network segment identification information of each of the message frames; The CAN message is converted into a large data message in a SOMEIP protocol format according to the network segment identification information of each message frame; wherein each of the large data messages includes N SOMEIP data items, and the N SOMEIP data items are converted from N first message frames with the same network segment identification information, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1; The large data message is sent to a remote communication terminal.

2. The method according to claim 1, characterized in that The CAN message also includes a collection timestamp of each message frame; The converting of the CAN message into a large data message in a SOMEIP protocol format according to the network segment identification information of each message frame includes: Sort the N SOMEIP data items according to the acquisition timestamp, and combine each of the SOMEIP data items with the acquisition timestamp of the corresponding first message frame to obtain a message data segment; Recording the first network identification information and a reference absolute time in the message header, wherein the reference absolute time corresponds to one of the N acquisition timestamps and is used to determine the absolute acquisition time of each of the SOMEIP data items; The large data message is obtained from the message data segment and the message header.

3. The method according to claim 2, characterized in that The step of sorting the N SOMEIP data items according to the acquisition timestamp and merging each of the SOMEIP data items with the acquisition timestamp of the corresponding first message frame to obtain a message data segment includes: The N SOMEIP data items are sorted in sequence according to the chronological order of collection time, and the collection timestamps of the N first message frames are combined in sequence with each of the SOMEIP data items to obtain the message data segment.

4. The method according to claim 3, characterized in that The reference absolute time recorded in the message header corresponds to the first or last acquisition timestamp.

5. The method according to claim 2, characterized in that: The message header also includes a reserved field and a protocol version field.

6. The method according to any one of claims 1 to 5, characterized in that: The sending of the large data message to the remote communication terminal includes: The large data message is sent to the remote communication terminal according to a preset sending cycle / set length data segment.

7. The method according to claim 6, characterized in that Before collecting CAN messages in the vehicle CAN bus, the method further includes: Receiving a time synchronization message sent by the remote communication terminal according to a set period, and performing time synchronization between each collection node under its jurisdiction and the remote communication terminal according to the time synchronization message; If the time synchronization message sent by the remote communication terminal is not received within the set period after the time synchronization message sent by the remote communication terminal is received for the first time, local clock synchronization is started until the time synchronization message is received again.

8. A method for collecting vehicle data, characterized in that: Remote communication terminals used in vehicle systems include: Receive a large data message sent by each domain controller, wherein the large data message is obtained by converting the CAN messages in the vehicle CAN bus collected by each domain controller into messages in the SOMEIP protocol format according to the network segment identification information of each message frame in the CAN message, each of the large data messages includes N SOMEIP data items, and the N SOMEIP data items are converted from N first message frames with the same network segment identification information in the CAN message, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1.

9. The method according to claim 8, characterized in that The large data message includes a message data segment and a message header, the message data segment is obtained by sorting the N SOMEIP data items according to the collection timestamps of each of the first message frames and combining the N SOMEIP data items with the corresponding collection timestamps of the N first message frames, the message header records the reference absolute time used to determine the absolute collection time of each of the SOMEIP data items and the first network segment identification information, the reference absolute time corresponds to one of the N collection timestamps.

10. The method according to claim 9, characterized in that The message data segment is obtained by sorting the N SOMEIP data items in chronological order according to the acquisition time of each of the first message frames and combining each of the SOMEIP data items with the acquisition timestamp of the corresponding first message frame in sequence, and the reference absolute time in the message header corresponds to the first or last acquisition timestamp.

11. The method according to any one of claims 8 to 10, characterized in that: Before receiving the large data packets sent by each domain controller, it also includes: Perform external time synchronization with the cloud, and after completing the external time synchronization, send a time synchronization message to each domain controller according to a set period; and After receiving the large data packets sent by each domain controller, it also includes: The big data message is uploaded to the cloud according to a preset rule and / or the collection absolute time of each SOMEIP data item is calculated according to the reference absolute time and each collection timestamp.

12. A vehicle data collection device, characterized in that: include: A collection module, used for collecting CAN messages in a vehicle CAN bus, wherein the CAN messages include a plurality of message frames and network segment identification information of each of the message frames; A conversion module, used to convert the CAN message into a large data message in the SOMEIP protocol format according to the network segment identification information of each message frame; wherein each of the large data messages includes N SOMEIP data items, the N SOMEIP data items are converted from N first message frames with the same network segment identification information, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1; The sending module is used to send the large data message to the remote communication terminal.

13. A vehicle data collection device, characterized in that: include: A receiving module is used to receive a large data message sent by each domain controller, wherein the large data message is obtained by converting the CAN message in the vehicle CAN bus collected by each domain controller into a message in the SOMEIP protocol format according to the network segment identification information of each message frame in the CAN message, each of the large data messages includes N SOMEIP data items, and the N SOMEIP data items are converted from N first message frames with the same network segment identification information in the CAN message, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1.

14. A domain controller is connected to a remote communication terminal in a vehicle system, characterized in that: include: A collection module, used for collecting CAN messages in a vehicle CAN bus, wherein the CAN messages include a plurality of message frames and network segment identification information of each of the message frames; A conversion module, used to convert the CAN message into a large data message in the SOMEIP protocol format according to the network segment identification information of each message frame; wherein each of the large data messages includes N SOMEIP data items, the N SOMEIP data items are converted from N first message frames with the same network segment identification information, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1; A sending module is used to send the large data message to the remote communication terminal.

15. A remote communication terminal, connected to each domain controller in the vehicle system, characterized in that: include: A receiving module is used to receive a large data message sent by each domain controller, wherein the large data message is obtained by converting the CAN message in the vehicle CAN bus collected by each domain controller into a message in the SOMEIP protocol format according to the network segment identification information of each message frame in the CAN message, each of the large data messages includes N SOMEIP data items, and the N SOMEIP data items are converted from N first message frames with the same network segment identification information in the CAN message, and each of the large data messages also includes the first network segment identification information corresponding to the first message frame, wherein N is an integer greater than or equal to 1.

16. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, it implements the method for collecting vehicle data as described in any one of claims 1-7 or 8-11.

17. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for collecting vehicle data as described in any one of claims 1-7 or 8-11 is implemented.

Citation Information

Patent Citations

  • Ethernet bus and CAN bus data conversion method and system based on SOME / IP protocol

    CN110460621A

  • Vehicle-mounted network ECU communication method based on SOME / IP protocol

    CN112291124A

  • Gateway system design method for converting CAN bus into vehicle-mounted Ethernet bus

    CN113900429A

  • SOA-based vehicle body domain and cabin domain communication architecture and fusion method

    CN114051040A

  • Data uploading method and system, computer equipment and storage medium

    CN115695533A