Vehicle-mounted controller data processing method and system, storage medium and vehicle
By compressing the data of the vehicle controller and using mixed identity identification information and preset rules, the problem of high storage capacity requirements in traditional storage solutions is solved, and the efficiency of data storage and the extension of equipment service life is achieved.
Patent Information
- Application Number
- CN202510120996.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-23
AI Technical Summary
Traditional on-board controller data storage solutions require on-board storage devices to have large storage capacity, resulting in high storage requirements and short service life.
By receiving messages sent by the on-board controller, splicing the values of multiple target fields to generate mixed identity identification information, and compressing the on-board controller data according to preset rules to reduce the storage of redundant data.
On the premise of ensuring useful data storage, the storage capacity requirements for on-board storage devices are reduced, and the service life of storage devices is extended.
Smart Images

Figure CN120034587A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a method, system, storage medium and vehicle for processing vehicle-mounted controller data. Background Art
[0002] As the degree of vehicle intelligence continues to increase, the amount of vehicle data also increases. The storage of vehicle controller data in the vehicle data is of great significance to vehicle diagnosis. Vehicle controller data refers to a series of vehicle operating status information and other vehicle data records automatically recorded by the vehicle electronic equipment during the vehicle's driving process. For example, vehicle black box data or vehicle black box data; based on vehicle safety and road safety considerations, the storage of vehicle controller data is very important. In related technologies, the vehicle controller data can be directly stored in the vehicle storage device. Although this method is easy to implement, it has high requirements on the storage capacity of the vehicle storage device, and often requires the vehicle storage device to have a large storage capacity. Summary of the invention
[0003] In view of this, the present invention provides a method, system, storage medium and vehicle for processing vehicle-mounted controller data to solve the problem that the traditional vehicle-mounted controller data storage solution requires the vehicle-mounted storage device to have a large storage capacity.
[0004] In a first aspect, the present invention provides a method for processing vehicle controller data, the method comprising:
[0005] Receive messages sent by the vehicle controller in chronological order, the messages are vehicle controller data;
[0006] Concatenate the values of multiple target fields in the message to obtain first hybrid identity identification information;
[0007] Based on the first hybrid identity identification information, the vehicle controller data is compressed according to a preset rule.
[0008] The present invention generates first hybrid identity identification information by splicing the values of multiple target fields in the message received from the vehicle-mounted controller, so that the vehicle-mounted controller data can be compressed based on the first hybrid identity identification information and preset rules. The present invention avoids the situation of directly storing all the vehicle-mounted controller data, thereby reducing the storage of redundant data while ensuring the storage of useful data. The present invention realizes the compression of the vehicle-mounted controller data and reduces the requirements for the storage capacity of the vehicle-mounted storage device.
[0009] In an optional implementation, the multiple target fields include a data type field, a channel number field, and an identity identification number field; and concatenating the values of the multiple target fields in the message includes:
[0010] Two or three of the values of the data type field, the channel number field, and the identity identification number field are concatenated into the first mixed identity identification information.
[0011] Based on the method of splicing two or three of the values of the data type field, the channel number field and the identity identification number field, the present invention can clearly distinguish different vehicle controller data, thereby providing a more reliable basis for subsequent data compression.
[0012] In an optional implementation, based on the first hybrid identity identification information, the vehicle controller data is compressed according to a preset rule, including:
[0013] Determining whether the first hybrid identity identification information appears for the first time;
[0014] According to the fact that the first hybrid identity recognition information does not appear for the first time, the vehicle controller data is compressed to store one message among the multiple repeated messages that appear continuously.
[0015] By identifying the first mixed identity identification information that does not appear for the first time, the present invention can determine whether the currently received message appears for the first time, thereby providing a more reliable basis for subsequent data compression.
[0016] In an optional implementation, compressing the vehicle controller data according to the first hybrid identity identification information not appearing for the first time includes:
[0017] If the first hybrid identity identification information does not appear for the first time, comparing whether the first data segment in the message is the same as the second data segment in the cached message;
[0018] According to the first data segment being the same as the second data segment, the vehicle controller data is compressed.
[0019] By determining whether the first data segment in the message is identical to the second data segment in the cached message, the present invention can further determine whether the currently received message appears for the first time, thereby providing a more reliable basis for subsequent data compression.
[0020] In an optional implementation, according to the first data segment being the same as the second data segment, compressing the vehicle controller data includes:
[0021] Identify the number of times the message appears consecutively;
[0022] If the number of times the message appears continuously is greater than or equal to a preset number, one of the plurality of cached messages is stored in a preset memory.
[0023] The present invention stores one message among multiple repeated messages only when the number of consecutive occurrences of the message is greater than or equal to a preset number. This method avoids the storage of redundant data while ensuring that useful data can be effectively stored.
[0024] In an optional implementation, identifying the number of consecutive occurrences of the message includes:
[0025] Get the value of the repetition count field in the cached message;
[0026] The number of times the message appears consecutively is determined based on the value of the repetition count field.
[0027] The value of the repetition count field is used as a basis for determining the number of times a message appears continuously. This method improves the accuracy and reliability of identifying the number of times a message appears continuously.
[0028] In an optional implementation, comparing whether the first data segment in the message is identical to the second data segment in the cached message includes:
[0029] Determine index information corresponding to the message;
[0030] Using the index information as a query condition, query the second data segment from the local cache data;
[0031] Compare the first data segment and the second data segment to see if they are the same.
[0032] Although the on-board controller data is disordered data with a large data scale, the on-board controller data cache processing is difficult, and related technologies find it difficult to effectively process the cached on-board controller data, but the present invention realizes the function of querying the second data segment from the local cache data and judging whether the first data segment is the same as the second data segment based on the index information corresponding to the message. At the same time, the present invention is equivalent to solving the information caching problem of disordered data with minimal memory occupancy.
[0033] In a second aspect, the present invention provides a vehicle-mounted domain control system, including a domain controller, a bus communication network, an Ethernet network, a data processing device and a preset memory, the data processing device is a gateway or a central domain controller, and the data processing device includes a compression device;
[0034] The domain controller and the data processing device are connected to the bus communication network;
[0035] A domain controller is communicatively connected with the data processing device via an Ethernet network;
[0036] A data processing device receives the vehicle controller data sent by the domain controller via an Ethernet network and / or a bus communication network;
[0037] A compression device, used to execute the method for processing vehicle controller data of the first aspect or any corresponding embodiment thereof, so as to compress the vehicle controller data;
[0038] The preset memory is connected to the data processing device, and is used to store compressed vehicle controller data.
[0039] In a third aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for processing vehicle controller data of the first aspect or any corresponding embodiment thereof.
[0040] In a fourth aspect, the present invention provides a vehicle, the vehicle comprising a vehicle controller, the vehicle controller being configured to execute the method for processing vehicle controller data of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 4 is a flow chart of a method for processing vehicle controller data according to an embodiment of the present invention.
[0043] Figure 2 4 is a flow chart of another method for processing vehicle controller data according to an embodiment of the present invention.
[0044] Figure 3 is a schematic diagram of a vehicle domain control system according to an embodiment of the present invention.
[0045] Figure 4 is a schematic diagram of a local data structure according to an embodiment of the present invention.
[0046] Figure 5 4 is a flow chart of another method for processing vehicle controller data according to an embodiment of the present invention.
[0047] Figure 6 is a structural block diagram of a compression device according to an embodiment of the present invention.
[0048] Figure 7 It is a schematic diagram of the hardware structure of the electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0050] With the rapid development of vehicle technology, especially the continuous improvement of the intelligence of electric vehicles, the amount of vehicle data has also increased. The storage of driving-related data is of great significance to vehicle diagnosis; there are two mainstream data storage methods, one is to store data inside the vehicle controller through solid-state storage media, and the other is to transfer data to the cloud through mobile communication technology for storage. For the method of storing data through solid-state storage media, due to the huge amount of data, the method of storing all information on the bus without compression will quickly occupy a large amount of memory, requiring solid-state storage media to have a larger storage capacity, which reduces the length of time that data can be saved. At the same time, high-frequency repeated writing will also shorten the service life of the solid-state storage medium.
[0051] According to an embodiment of the present invention, an embodiment of a method for processing vehicle-mounted controller data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0052] In this embodiment, a method for processing vehicle controller data is provided for vehicle electronic equipment, and can be specifically used for a gateway or a central domain controller on a vehicle. Figure 1 is a flow chart of a method for processing vehicle controller data according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps S101 to S104.
[0053] Step S101, receiving messages sent by the vehicle controller in chronological order, the messages being vehicle controller data.
[0054] The vehicle controller data involved in one or more embodiments of the present invention may be vehicle black box data, specifically including but not limited to all CAN (Controller Area Network) bus data and / or LIN (Local Interconnect Network) bus data of the entire vehicle, and the data is in the form of messages (or communication messages). For example, the messages sent by the vehicle controller include but are not limited to one or more of CAN messages, CANFD messages, and LIN messages, and the gateway or central domain controller receives CAN and / or LIN bus data in chronological order.
[0055] Specifically, the gateway or central domain controller on the vehicle can continuously acquire the messages sent from the domain controllers on the bus and communicating with each other through the Ethernet network in chronological order to process the acquired vehicle controller data.
[0056] Step S102: concatenate the values of multiple target fields in the message to obtain first hybrid identity identification information.
[0057] Among them, the first hybrid identity identification information can be used to distinguish different vehicle controller data, and the multiple target fields in the message can be existing information related to the message or a combination of existing information, or can be separately configured or generated information.
[0058] Specifically, a plurality of target fields may be configured in the message, for example, including but not limited to one or more of data type, channel number, ID number, data length, data segment, number of repetitions and offset time.
[0059] For example, the value of the data type, the value of the channel number, and the value of the ID number are concatenated in a preset order, and the first mixed identity identification information is MIXID (mixed ID).
[0060] Step S103 , based on the first hybrid identity recognition information, the vehicle controller data is compressed according to a preset rule.
[0061] The embodiment of the present invention generates first hybrid identity identification information by splicing the values of multiple target fields in the message received from the vehicle-mounted controller, thereby compressing the vehicle-mounted controller data based on the first hybrid identity identification information. The embodiment of the present invention avoids the situation where all vehicle-mounted controller data is directly stored, thereby reducing the storage of redundant data while ensuring the storage of useful data. The present invention realizes the compression of vehicle-mounted controller data and reduces the requirements for the storage capacity of the vehicle-mounted storage device. The embodiment of the present invention is actually a vehicle-mounted controller data compression method or algorithm. The above method filters out necessary storage information and reduces the memory space occupied by data storage through a data compression algorithm without affecting data restoration.
[0062] In some optional implementations, after storing the message, the method can further include: clearing local records related to the message.
[0063] After storing the message, this embodiment releases the local cache by clearing the local record related to the message, providing cache space for subsequent processing of the vehicle controller data, and ensuring the continuation of the processing of the vehicle controller data.
[0064] In some optional implementations, based on the first hybrid identity identification information, the vehicle controller data is compressed according to a preset rule, including:
[0065] Step a1, determining whether the first hybrid identity recognition information appears for the first time.
[0066] Specifically, this embodiment compares the first mixed identity identification information (expressed as MIXID01) with the second mixed identity identification information (expressed as MIXID02) corresponding to the cached message, so as to determine whether the first mixed identity identification information appears for the first time.
[0067] If MIXID01 is the same as MIXID02, it is determined that the first mixed identity identification information does not appear for the first time.
[0068] Step a2: compressing the vehicle controller data according to the fact that the first hybrid identity recognition information does not appear for the first time, so as to store one message among the multiple repeated messages that appear continuously.
[0069] If MIXID01 is different from MIXID02, it is determined that the first mixed identity identification information appears for the first time, and MIXID01 is recorded locally and the currently received message can be stored.
[0070] In this embodiment, the preset rule includes that the first hybrid identity identification information does not appear for the first time.
[0071] By identifying the first mixed identity identification information that does not appear for the first time, the present invention can determine whether the currently received message appears for the first time, thereby providing a more reliable basis for subsequent data compression.
[0072] In this embodiment, new vehicle controller data that has not been cached can be directly cached to facilitate subsequent compression and storage of the data, and to ensure effective storage of useful data to avoid the occurrence of useful data being omitted.
[0073] In some optional implementations, compressing the vehicle controller data according to the first hybrid identity identification information not appearing for the first time includes:
[0074] Step b1: if the first hybrid identity identification information does not appear for the first time, compare the first data segment in the message with the second data segment in the cached message to see if they are the same.
[0075] The comparison result of the first data segment and the second data segment includes: the first data segment and the second data segment, or the first data segment and the second data segment are different. Wherein, the cached message and the received message are of the same message type.
[0076] Step b2: compressing the vehicle controller data according to the fact that the first data segment is the same as the second data segment.
[0077] In this embodiment, the preset rule includes that the first mixed identity identification information does not appear for the first time and the first data segment is the same as the second data segment.
[0078] If the first data segment is different from the second data segment, the first data segment is stored in the cached message and the received message is cached.
[0079] By determining whether the first data segment in the message is identical to the second data segment in the cached message, the present invention can further determine whether the currently received message appears for the first time, thereby providing a more reliable basis for subsequent data compression.
[0080] In some optional implementations, compressing the vehicle controller data according to the first data segment being the same as the second data segment includes:
[0081] Step c1, identifying the number of times the message appears consecutively.
[0082] If the first data segment is identical to the second data segment, it indicates that the currently received message does not appear for the first time, and this embodiment identifies the number of consecutive appearances of the message.
[0083] For example, assuming that the message has appeared twice in succession, combined with the currently acquired message once, it means that the message has appeared three times, that is, the message has appeared three times in succession.
[0084] Step c2: if the number of times the message appears continuously is greater than or equal to a preset number, one of the multiple cached messages is stored in a preset memory.
[0085] In this embodiment, the preset rules include that the first hybrid identity identification information does not appear for the first time, the first data segment is the same as the second data segment, and the number of consecutive appearances of the message is greater than or equal to a preset number of times.
[0086] In this embodiment, the preset number is an integer greater than or equal to 2, and the preset number is, for example, 10; the preset memory may be a solid-state storage medium, for example, the preset memory is an EMMC (Embedded Multi Media Card).
[0087] For example, if the number of times the currently received message appears continuously reaches 10 times, the message is stored in the EMMC.
[0088] If the number of times the message appears continuously is less than the preset number, the value of the repetition number field of the cached message is updated, and the storage of the message in the preset memory is cancelled.
[0089] For example, assuming that the number of consecutive occurrences of the currently received message is 8 times, which has not reached the preset number (10 times), this embodiment updates the value of the repetition number field from 7 to 8. At this time, the message is not stored in the EMMC but only cached.
[0090] When the number of consecutive occurrences of a message does not reach a preset number, the message is not stored temporarily, but the number of consecutive occurrences of the message is increased. This embodiment avoids the storage of redundant data and ensures that useful data can be effectively stored through the repetition number field.
[0091] The present invention stores one message among multiple repeated messages only when the number of consecutive occurrences of the message is greater than or equal to a preset number. This method avoids the storage of redundant data while ensuring that useful data can be effectively stored.
[0092] The embodiment of the present invention does not rely on specific hardware and can be used in storage solutions for various CAN bus data and / or LIN bus data; the present embodiment can compare the currently received vehicle controller data with the currently cached vehicle controller data, and according to the comparison result, the currently received vehicle controller data has been cached, and only when the number of consecutive occurrences reaches a preset number, the currently cached vehicle controller data is stored in the preset memory; it can be seen that the embodiment of the present invention avoids the situation of directly storing all vehicle controller data, thereby reducing the storage of redundant data while ensuring the storage of useful data. The embodiment of the present invention realizes the compression of vehicle controller data and reduces the storage capacity requirements of vehicle storage devices. Therefore, the present embodiment designs a universal CAN / LIN data compression algorithm, which is not limited to specific hardware, and greatly reduces the storage occupancy of the whole vehicle real-time data through the software algorithm of the application layer.
[0093] In some optional implementations, identifying the number of consecutive occurrences of a message includes:
[0094] Step d1, obtaining the value of the repetition count field in the cached message.
[0095] In this embodiment, each message is configured with a repetition number field, and the repetition number field is used to indicate the number of times the message appears continuously.
[0096] The space occupied by the repetition number field is, for example, 1 Byte, and the value of the repetition number field may be the repetition number.
[0097] Step d2, determining the number of consecutive occurrences of the message according to the value of the repetition count field.
[0098] Specifically, the value of the repetition count field indicates the number of times the message appears consecutively.
[0099] The value of the repetition count field is used as the basis for judging the number of consecutive occurrences of the message, thereby achieving accurate statistics of the number of consecutive occurrences of the message. This method significantly improves the accuracy and reliability of identifying the number of consecutive occurrences of the message, and provides an accurate basis for whether to store the message in the future.
[0100] In some optional implementations, comparing whether the first data segment in the message is identical to the second data segment in the cached message includes:
[0101] Step e1, determining index information corresponding to the message.
[0102] like Figure 4As shown, the local data structure of the cached message (i.e., the vehicle controller data) includes two parts: the first part is the mixed ID number (MIXID), the data length and the index number, that is, the first part belongs to the index information of the locally recorded message, and the index number of this embodiment is obtained by accumulating the space occupied by each message; the second part is the data segment, the number of repetitions and the offset time, that is, the second part belongs to the data information recorded locally, wherein the mixed ID number can be composed of a data type, a channel number, and an ID number. The second data segment of this embodiment is cached locally in the above manner. The second data segment, for example, includes the mixed ID number m, the data length m and the index number m, the data segment m, the number of repetitions m and the offset time m_number of repetitions m, wherein m is an integer greater than or equal to 1, Figure 4 Where n and k are both integers greater than 2.
[0103] Step e2: using the index information as a query condition, query the second data segment from the local cache data.
[0104] Specifically, this embodiment queries the data recorded in the local cache through the mixed ID (MIXID) formed by the CAN / LIN message, and then finds the second data segment through the index number corresponding to the mixed ID number.
[0105] Step e3, comparing the first data segment and the second data segment to see if they are the same.
[0106] After acquiring the second data segment, this embodiment compares the content of the first data segment with the content of the second data segment to determine whether the two are the same.
[0107] This embodiment implements a local data structure based on the identity information, index number and corresponding data segment, so that the corresponding index number can be queried through the first mixed identity information, and then the corresponding data information can be found by the index number. Although the vehicle controller data belongs to disordered data with a large data scale and the cache processing is difficult, this embodiment solves the information caching problem of disordered data with minimal memory usage. Therefore, this embodiment designs a data structure that supports the compression algorithm, which consists of two parts: index information and data information. The unique index number of the mixed ID is queried through the mixed ID (MIXID), and the corresponding data information is found by the index number, so that the information caching problem of disordered data can be solved with minimal memory usage.
[0108] In this embodiment, a method for processing vehicle controller data is provided for vehicle electronic equipment, and can be specifically used for a gateway or a central domain controller on a vehicle. Figure 2 is a flow chart of a method for processing vehicle controller data according to an embodiment of the present invention. Figure 2As shown, the process includes the following steps S201 to S204.
[0109] Step S201: Receive messages sent by the vehicle controller in chronological order. The messages are vehicle controller data. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0110] Step S202: concatenate the values of multiple target fields in the message to obtain first hybrid identity identification information.
[0111] In some optional implementations, the plurality of target fields include a data type field, a channel number field, and an identity identification number field.
[0112] In specific implementation, this embodiment can generate corresponding first hybrid identity identification information according to the characteristics or features of the message. For example, if the message is a CAN / LIN message, this embodiment can generate corresponding first hybrid identity identification information according to one or more fields in the CAN / LIN message.
[0113] Specifically, the above step S202 includes: concatenating two or three of the value of the data type field, the value of the channel number field, and the value of the identity identification number field into the first mixed identity identification information.
[0114] The message is configured with a data type field, a channel number field, and an identity identification number field.
[0115] Based on the method of splicing two or three of the values of the data type field, the channel number field and the identity identification number field, the present invention can clearly distinguish different vehicle controller data, thereby providing a more reliable basis for subsequent data compression.
[0116] Specifically, combined with the usage scenario of the vehicle controller data, the CAN bus data in the vehicle controller data of this embodiment is specifically a CAN message, and the LIN bus data in the vehicle controller data is specifically a LIN message. The CAN message and the LIN message have similar or identical message structures. Based on the message structures of the CAN message and the LIN message, it is confirmed that all CAN bus data and LIN bus data of the whole vehicle of this embodiment need to store the following information: data type, channel number, ID number, data length, data segment, number of repetitions, and offset time. The memory size occupied by each piece of information is shown in the following table:
[0117] 1 Byte 1 Byte 2Byte 1 Byte 1~64Byte 1 Byte 4~40Byte Data Types Channel Number ID Number Data length Data segment Repetitions Offset time
[0118] The data type occupies a memory size of 1 Byte (byte), and the data type indicates the bus type. In this embodiment, the data type of CAN data is 0x1, the data type of CAN FD data is 0x2, and the data type of LIN data is 0x3. Compared with CAN data, CAN FD data is specifically CAN with Flexible Data-rate data, i.e., CAN (Controller Area Network) with a variable rate. The channel number occupies a memory size of 1 Byte, which can represent the hardware channel corresponding to the CAN / LIN message and is used for channel selection of multiple CAN / LIN messages; the ID (Identity Document) number occupies a memory size of 2 Byte, which is the identifier of the data; the data length occupies a memory size of 1 Byte, which represents the data frame length in bytes. The data length of the CAN data in this embodiment is up to 8 bytes, and the data length of the CANFD data is up to 64 bytes; the data segment occupies a memory size of 1 to 64 Byte, and the data segment is used to store this frame data; the number of repetitions occupies a memory size of 1 Byte, which represents the number of consecutive occurrences of the same data segment. The maximum number of repetitions in this embodiment can be 10, which is used for the vehicle controller data compression algorithm; the offset time occupies a memory size of 4 to 40 Byte, and the length can be four times the number of repetitions, which represents the time difference of the current message based on the reference time (the time when a new message is first received), and the resolution can be 0.1 ms.
[0119] In this embodiment, the received message and the cached message have the same message structure, that is, the received message and the cached message may have a data type field, a channel number field, an ID number field, a data length field, a data segment field, a repetition number field and an offset time field.
[0120] Specifically, the value of the data type field, the value of the channel number field, and the value of the ID number field can be spliced into the first mixed identity identification information, or at least two of the value of the data type field, the value of the channel number field, and the value of the ID number field can be spliced into the first mixed identity identification information.
[0121] This embodiment is based on the result of splicing at least two of the values of the data type field, the channel number field, and the identity identification number field, so that different vehicle controller data can be clearly distinguished by two or three of the data type, channel number, and identity identification number.
[0122] like Figure 3As shown, this embodiment is based on the domain control architecture of the vehicle, and all CAN / LIN bus data of the whole vehicle is stored in EMMC through a gateway or a central domain controller; wherein the gateway or the central domain controller can be, for example, a vehicle-mounted MCU (Micro Controller Unit). The processing method of the vehicle-mounted controller data of this embodiment is a data compression algorithm, which can be understood as a vehicle-mounted controller module, which can be used to store the CAN / LIN bus data generated by the whole vehicle in a non-volatile memory (such as EMMC) in real time. Specifically, part of the data on the CAN / LIN BUS (bus) can be directly input to the data compression algorithm through a gateway or a central domain controller or a gateway, while part of the private data of the domain controller (such as domain controller A and domain controller B) is transmitted to the data compression algorithm through the vehicle Ethernet (ETH), and then the compressed data can be stored in EMMC through SDIO (Secure Digital Input and Output) based on the data compression algorithm of this embodiment. Therefore, the vehicle-mounted controller data in this embodiment may specifically include data on the CAN / LIN BUS (bus) and private data of the domain controller.
[0123] Step S203: Based on the first hybrid identity information, the vehicle controller data is compressed according to a preset rule. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0124] In this embodiment, a method for processing vehicle controller data is provided for vehicle electronic equipment, and can be specifically used for a gateway or a central domain controller on a vehicle. Figure 5 is a flow chart of a method for processing vehicle controller data according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps S501 to S509.
[0125] Step S501, the domain controller processes the received or sent CAN / LIN data in chronological order, and the acquired CAN / LIN data is the current CAN / LIN message.
[0126] Step S502, calculate MIXID; in this embodiment, the value of the data type, the value of the channel number, and the value of the ID number in the current CAN / LIN message are concatenated to obtain the MIXID (mixed ID) of the current CAN / LIN message.
[0127] Step S503, determine whether this MIXID appears for the first time: if yes, execute step S504; if not, execute step S505.
[0128] Step S504, the MIXID is recorded locally, specifically all the flag information of the current CAN / LIN message is recorded locally, that is, the current CAN / LIN message is cached.
[0129] Step S505, determine whether the data segment has changed: if yes, execute step S506, if not, execute step S507. If this MIXID is not the first time, determine whether the data segment of the current CAN / LIN message is the same as the data segment of the mixed ID message cached locally last time.
[0130] Step S506, write the stored information (ie, the current CAN / LIN message) into the EMMC, and clear the local record (the cache involved in the current CAN / LIN message).
[0131] Step S507, determine whether the data has been stored for 10 times: if yes, execute step S508, if not, execute step S509. If the data segment is the same, that is, has not changed, determine whether the local cache has cached the message of the mixed ID for 10 consecutive times.
[0132] Step S508: If the number of times is full, the stored information is written into the EMMC and the local record (the cache involved in the current CAN / LIN message) is cleared.
[0133] Step S509: If the number of repetitions is less than 10, the timestamp of the current CAN / LIN message is recorded locally, and the number of repetitions of the current CAN / LIN message is increased by one.
[0134] The method for processing vehicle controller data provided by the embodiment of the present invention only retains the time information for the redundancy of the whole vehicle message data stored in real time. Specifically, there are a large number of data whose status changes discontinuously in the whole vehicle message. Real-time storage of such data will cause a large amount of storage space to be wasted. For such redundant data, the present embodiment only needs to save its time information. Taking the ordinary CAN frame as an example, the memory space occupied by a CAN message is 1Byte (data type) + 1Byte (channel number) + 2Byte (ID number) + 1Byte (data length) + 8Byte (data segment) + 4Byte (offset time) = 17Byte. Assuming that the data segment of this message is repeated 10 times in a row, the storage capacity before compression is 170Byte, that is, the related technology requires 170Byte of storage space; after being processed by the data processing method of the embodiment of the present invention, the storage capacity after compression is 1Byte (data type) + 1Byte (channel number) +2Byte (ID number) +1Byte (data length) +8Byte (data segment) +1Byte (number of repetitions) +40Byte (offset time) = 54Byte. Compared with the real-time storage in the related art, the solution of the present invention reduces (170-54) ÷ 170 = 68.24%; under the same circumstances, for CANFD data (data segment 64Byte), the storage space can be reduced by (730-110) ÷ 730 = 84.93%. It can be seen that the present invention can greatly reduce the demand for the storage capacity of the on-board storage device for the on-board controller data storage.
[0135] Combination Figure 3 As shown, an embodiment of the present invention can also provide a vehicle-mounted domain control system, including a domain controller, a bus communication network, an Ethernet network, a data processing device and a preset memory, the data processing device is a gateway or a central domain controller, and the data processing device includes a compression device.
[0136] The domain controller and the data processing device are both connected to a bus communication network, and the bus communication network is specifically a CAN / LIN bus network.
[0137] There can be multiple domain controllers.
[0138] The domain controller is connected to the data processing device through an Ethernet network.
[0139] The data processing device receives the vehicle controller data sent by the domain controller through the Ethernet network and / or the bus communication network.
[0140] A compression device is used to execute the method for processing vehicle controller data in any embodiment of the present invention to compress the vehicle controller data, for example, compress the vehicle controller data by using the compression algorithm provided by the embodiment of the present invention.
[0141] The preset memory is connected to the data processing device. The data processing device can be connected to the preset memory via SDIO. The preset memory is used to store compressed vehicle controller data. The preset memory is, for example, EMMC.
[0142] The compression device in the present embodiment is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be described in detail. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the compression device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and contemplated.
[0143] This embodiment provides a compression device, such as Figure 6 As shown, the compression device includes a receiving module 601 , a splicing module 602 and a compression module 603 .
[0144] The receiving module 601 is used to receive the message sent by the vehicle controller in time sequence, and the message is the vehicle controller data.
[0145] The concatenation module 602 is configured to concatenate values of multiple target fields in the message to obtain first hybrid identity identification information.
[0146] The compression module 603 is used to compress the vehicle controller data according to a preset rule based on the first hybrid identity identification information.
[0147] In some optional implementations, the plurality of target fields include a data type field, a channel number field, and an identity identification number field. The concatenation module 602 is specifically configured to concatenate two or three of the values of the data type field, the channel number field, and the identity identification number field into the first mixed identity identification information.
[0148] In some optional implementations, the compression module 603 includes a judgment unit and a compression unit.
[0149] The determination unit is used to determine whether the first hybrid identity recognition information appears for the first time.
[0150] The compression unit is used to compress the vehicle controller data according to the fact that the first hybrid identity recognition information does not appear for the first time, so as to store one message among the multiple repeated messages that appear continuously.
[0151] In some optional embodiments, the compression unit includes a comparison subunit and a compression subunit.
[0152] The comparison subunit is used to compare whether the first data segment in the message is the same as the second data segment in the cached message according to the fact that the first hybrid identity identification information does not appear for the first time.
[0153] The compression subunit is used to compress the vehicle controller data according to the first data segment being the same as the second data segment.
[0154] In some optional embodiments, the compression subunit includes an identification subunit and a storage subunit.
[0155] The identification subunit is used to identify the number of times a message appears continuously.
[0156] The storage subunit is used to store one of the multiple cached messages into a preset memory according to the number of times the message appears continuously being greater than or equal to a preset number.
[0157] In some optional embodiments, the identifying subunit includes an acquiring subunit and a determining subunit.
[0158] The acquisition subunit is used to obtain the value of the repetition count field in the cached message.
[0159] The determination subunit is used to determine the number of times the message appears continuously according to the value of the repetition number field.
[0160] In some optional implementations, the comparison subunit includes an index determination subunit, a data query subunit, and a data comparison subunit.
[0161] The index determination subunit is used to determine the index information corresponding to the message.
[0162] The data query subunit is used to query the second data segment from the local cache data using the index information as a query condition.
[0163] The data comparison subunit is used to compare whether the first data segment is identical to the second data segment.
[0164] The further functional description of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0165] The compression device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0166] An embodiment of the present invention further provides a vehicle, the vehicle comprising a vehicle controller, the vehicle controller being used to execute the method for processing vehicle controller data provided in any of the above embodiments. The embodiment of the vehicle controller executing the method for processing vehicle controller data is the same as the above corresponding embodiment, and will not be described in detail here.
[0167] Among them, the vehicle controller can be, for example, a VCU (Vehicle Control Unit), that is, a central domain controller. Of course, based on the embodiment of the present invention, the vehicle controller can also be any vehicle controller that can execute the above-mentioned vehicle controller data processing method.
[0168] The embodiment of the present invention also provides an electronic device having the above Figure 6 Compression device shown.
[0169] See also Figure 7 , Figure 7 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the electronic device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 10 is taken as an example.
[0170] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0171] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0172] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0173] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0174] The electronic device further includes a communication interface 30 for the electronic device to communicate with other devices or a communication network.
[0175] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0176] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0177] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A method for processing vehicle controller data, characterized in that: The method comprises: Receive messages sent by the vehicle controller in chronological order, wherein the messages are vehicle controller data; Concatenating values of multiple target fields in the message to obtain first hybrid identity identification information; Based on the first hybrid identity identification information, the vehicle controller data is compressed according to preset rules.
2. The method according to claim 1, characterized in that The multiple target fields include a data type field, a channel number field, and an identity identification number field; the concatenating the values of the multiple target fields in the message includes: Two or three of the values of the data type field, the channel number field, and the identity identification number field are concatenated into the first mixed identity identification information.
3. The method according to claim 1 or 2, characterized in that: The method of compressing the vehicle controller data based on the first hybrid identity identification information and according to a preset rule includes: Determining whether the first hybrid identity identification information appears for the first time; According to the fact that the first hybrid identity recognition information does not appear for the first time, the vehicle controller data is compressed to store one message among a plurality of repeated messages that appear continuously.
4. The method according to claim 3, characterized in that The compressing the vehicle controller data according to the first hybrid identity identification information not appearing for the first time includes: If the first hybrid identity identification information does not appear for the first time, comparing whether the first data segment in the message is the same as the second data segment in the cached message; According to the fact that the first data segment is the same as the second data segment, the vehicle controller data is compressed.
5. The method according to claim 4, characterized in that The compressing the vehicle controller data according to the first data segment being the same as the second data segment includes: Identifying the number of consecutive occurrences of the message; If the number of consecutive occurrences of the message is greater than or equal to a preset number, one of the plurality of cached messages is stored in a preset memory.
6. The method according to claim 5, characterized in that The identifying the number of times the message appears continuously includes: Obtaining the value of the repetition count field in the cached message; The number of times the message appears continuously is determined according to the value of the repetition number field.
7. The method according to claim 4, characterized in that The comparing whether the first data segment in the message is the same as the second data segment in the cached message includes: Determine index information corresponding to the message; Using the index information as a query condition, querying the second data segment from the local cache data; Compare the first data segment and the second data segment to see if they are the same.
8. A vehicle-mounted domain control system, characterized in that: It includes a domain controller, a bus communication network, an Ethernet network, a data processing device and a preset memory, wherein the data processing device is a gateway or a central domain controller, and the data processing device includes a compression device; The domain controller and the data processing device are both connected to the bus communication network; The domain controller is communicatively connected with the data processing device via an Ethernet network; The data processing device receives the vehicle controller data sent by the domain controller through the Ethernet network and / or the bus communication network; The compression device is used to execute the method for processing vehicle controller data according to any one of claims 1 to 7 to compress the vehicle controller data; The preset memory is connected to the data processing device, and is used to store compressed vehicle controller data.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for processing vehicle controller data according to any one of claims 1 to 7.
10. A vehicle, characterized in that: The vehicle includes a vehicle controller configured to execute the method for processing vehicle controller data according to any one of claims 1 to 7.