Commercial vehicle data acquisition method and system and storage medium
Through the management platform, the data acquisition element items and templates of commercial vehicles are configured to generate data acquisition strategies, which solves the problem of updating software and modifying the signal matrix in the existing technology, and improves the flexibility of data acquisition.
Patent Information
- Application Number
- CN202411324109.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-02-18
AI Technical Summary
The existing commercial vehicle data acquisition methods require updating software to modify the signal matrix, resulting in poor flexibility in data acquisition.
Through the management platform, configure element items for each data that needs to be collected, including CAN identification and mask, and create data acquisition templates, associate element items and commercial vehicles, generate data acquisition strategies, and send them to commercial vehicles to configure message filters. Achieve flexible data collection.
The types of data that need to be reported can be modified without updating the software, which improves the flexibility of data collection.
Smart Images

Figure CN119484561A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the automotive field, and in particular to a data collection method, system and storage medium for commercial vehicles. Background Art
[0002] Current commercial vehicles collect and report data through Internet of Vehicles terminals, which collect data through a signal matrix prefabricated in the software. They can only collect relevant data defined in the signal matrix, and cannot collect data outside the definition of the signal matrix.
[0003] If more data needs to be collected in commercial vehicles, the software of the Internet of Vehicles terminal needs to be updated to modify the signal matrix, resulting in poor flexibility in data collection. Summary of the invention
[0004] The present application provides a data collection method, system and storage medium for commercial vehicles, which are used to solve the problem that when the type of data collected by commercial vehicles needs to be modified, the signal matrix needs to be modified by updating the software, resulting in poor flexibility of data collection. The technical solution is as follows:
[0005] According to a first aspect of the present application, a data collection method for a commercial vehicle is provided, the method comprising:
[0006] The management platform configures element items for each data to be collected, wherein the element items at least include a controller area network CAN identifier and a mask, wherein the CAN identifier is determined according to a message identifier predefined for the data, a channel number of a CAN channel, and a frame type, and the mask is determined according to the channel number and the frame type, wherein the frame type includes a standard frame and an extended frame;
[0007] The management platform creates a data collection template, and the data collection template at least includes a reporting method and a reporting period;
[0008] The management platform associates the data collection template with at least one element item and at least one commercial vehicle to obtain a data collection strategy;
[0009] The management platform sends the data collection strategy to the at least one commercial vehicle;
[0010] The commercial vehicle configures a message filter according to the element items in the data collection strategy;
[0011] For each type of data, the commercial vehicle sends the data to the message filter for filtering, and sends the filtered message to the management platform from the corresponding CAN channel according to the reporting cycle and in the reporting mode.
[0012] In a possible implementation, the management platform configures element items for each type of data that needs to be collected, including:
[0013] The management platform obtains a predefined message identifier for the data to be collected, and obtains the channel number and frame type of the CAN channel;
[0014] The management platform sets the first two bits of the CAN identifier according to the upper two bits of the channel number, sets the identifier extension IDE bit in the CAN identifier according to the frame type, fills the message identifier into the message bit in the CAN identifier, and fills the remaining bits with a predetermined value to obtain the CAN identifier;
[0015] The management platform sets the first two bits of the mask according to the lower two bits of the channel number, sets the IDE bit in the mask according to the frame type, and fills the remaining bits with a predetermined value to obtain the mask;
[0016] The management platform combines the CAN identifier and the mask into element items.
[0017] In a possible implementation, the commercial vehicle configures a message filter according to the element items in the data collection strategy, including:
[0018] The commercial vehicle reads the CAN identification and mask from the element item;
[0019] The commercial vehicle uses the first two digits in the CAN identifier as the upper two digits in the channel number, and uses the first two digits in the mask as the lower two digits in the channel number to obtain the channel number of the CAN channel;
[0020] The commercial vehicle determines the frame type according to the IDE bit in the CAN identifier, determines the message bit in the CAN identifier according to the frame type, and obtains the message identifier from the message bit;
[0021] The commercial vehicle determines the frame type according to the IDE bit in the mask, determines the corresponding mask bit in the mask according to the frame type, and obtains the mask corresponding to the message identifier from the mask bit;
[0022] The commercial vehicle configures a message filter according to the channel number, the message identifier and the mask.
[0023] In a possible implementation, the commercial vehicle sends the data to the message filter for filtering, including:
[0024] The commercial vehicle encapsulates the data into a message and sends it to the message filter;
[0025] The message filter verifies the channel number, message identifier and mask corresponding to the message;
[0026] If the channel number, message identifier and mask corresponding to the message are the same as the channel number, message identifier and mask configured by the message filter, the message filter retains the message;
[0027] If the channel number, message identifier and mask corresponding to the message are different from or the same as the channel number, message identifier and mask configured by the message filter, the message filter discards the message.
[0028] In a possible implementation, sending the filtered messages to the management platform from the corresponding CAN channel according to the reporting period and in the reporting manner includes:
[0029] The commercial vehicle caches the filtered messages into a message data queue;
[0030] When the reporting cycle is reached, the commercial vehicle reads the message from the message data queue according to the reporting method, and the reporting method includes reporting the last frame of valid message or reporting all messages;
[0031] The commercial vehicle sends the message to the management platform through the corresponding CAN channel.
[0032] In a possible implementation, the management platform associates the data collection template with at least one element item and at least one commercial vehicle to obtain a data collection strategy, including:
[0033] The management platform displays a plurality of element items in the first association interface of the data collection template, and selects at least one element item from the plurality of element items to be associated with the data collection template according to a user operation;
[0034] The management platform displays a plurality of commercial vehicles in the second association interface of the data collection template, and selects at least one commercial vehicle from the plurality of commercial vehicles to be associated with the data collection template according to a user operation;
[0035] The management platform combines the data collection template, the at least one element item and the at least one commercial vehicle into a data collection strategy.
[0036] In a possible implementation manner, the management platform sends the data collection strategy to the at least one commercial vehicle, including:
[0037] The management platform displays the vehicle information of each commercial vehicle, the currently associated data collection strategy, the currently used data collection strategy and the delivery status in the data collection strategy delivery interface, and the delivery status includes success and failure;
[0038] The management platform selects at least one commercial vehicle whose currently associated data collection strategy is different from the currently used data collection strategy, and / or selects at least one commercial vehicle whose sending status is failed, and sends the data collection strategy to the at least one commercial vehicle.
[0039] In a possible implementation, the method further includes:
[0040] The management platform displays the message data of each message sent by the commercial vehicle in the data analysis interface.
[0041] According to a second aspect of the present application, a data collection system for a commercial vehicle is provided, the data collection system comprising: a management platform and a commercial vehicle;
[0042] The management platform is used to configure element items for each type of data to be collected, wherein the element items at least include a controller area network CAN identifier and a mask, wherein the CAN identifier is determined according to a message identifier predefined for the data, a channel number of a CAN channel, and a frame type, and the mask is determined according to the channel number and the frame type, wherein the frame type includes a standard frame and an extended frame;
[0043] The management platform is further used to create a data collection template, wherein the data collection template at least includes a reporting method and a reporting period;
[0044] The management platform is further used to associate the data collection template with at least one element item and at least one commercial vehicle to obtain a data collection strategy;
[0045] The management platform is further used to send the data collection strategy to the at least one commercial vehicle;
[0046] The commercial vehicle is used to configure a message filter according to the element items in the data collection strategy;
[0047] For each type of data, the commercial vehicle is further used to send the data to the message filter for filtering, and send the filtered message to the management platform from the corresponding CAN channel according to the reporting period and in the reporting mode.
[0048] According to a third aspect of the present application, a computer-readable storage medium is provided, wherein at least one instruction is stored in the storage medium, and the at least one instruction is loaded and executed by a processor to implement the commercial vehicle data collection method as described above.
[0049] The beneficial effects of the technical solution provided by this application include at least:
[0050] The management platform can configure element items for the data that needs to be collected, and then associate the created data collection template with at least one element item and at least one commercial vehicle to obtain a data collection strategy; finally, the data collection strategy is sent to the commercial vehicle so that the commercial vehicle can collect the data set in the data collection strategy, thereby realizing flexible data collection. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0052] Figure 1 It is a schematic diagram of the structure of a management platform and a commercial vehicle provided by an embodiment of the present application;
[0053] Figure 2 is a flow chart of a data collection method for a commercial vehicle provided by an embodiment of the present application;
[0054] Figure 3 is a flow chart of a data collection method for a commercial vehicle provided by an embodiment of the present application;
[0055] Figure 4 is a schematic diagram of an element item configuration interface provided by an embodiment of the present application;
[0056] Figure 5 is a schematic diagram of a template configuration interface provided by an embodiment of the present application;
[0057] Figure 6 is a schematic diagram of a first association interface provided by an embodiment of the present application;
[0058] Figure 7 is a schematic diagram of a second association interface provided by an embodiment of the present application;
[0059] Figure 8 This is a schematic diagram of an interface of a data collection template provided by an embodiment of the present application;
[0060] Fig. 9 This is a schematic diagram of issuing a data collection template provided by an embodiment of the present application;
[0061] Fig.10 is a schematic diagram of a data cache provided by an embodiment of the present application;
[0062] Fig.11 It is a schematic diagram of message data provided by an embodiment of the present application;
[0063] Fig.12 It is a structural block diagram of a data acquisition device for a commercial vehicle provided by an embodiment of the present application. DETAILED DESCRIPTION
[0064] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0065] There are multiple components installed in commercial vehicles. These components will sample data at a predetermined sampling period and send the data to the commercial vehicle. The commercial vehicle will report the data to the management platform (also known as the Internet of Vehicles platform) through the controller area network (CAN) channel at a predetermined reporting period. The management platform can determine the status of the commercial vehicle by analyzing the data.
[0066] In the related art, the software of commercial vehicles includes a signal matrix, in which the types of data to be reported are set. When the management platform needs to expand the types of data reported by commercial vehicles, the software needs to be updated to modify the signal matrix, that is, the commercial vehicle needs to update the software to modify the types of data to be reported.
[0067] like Figure 1 As shown, the management platform in this application sends data collection strategies to commercial vehicles, and commercial vehicles determine the types of data that need to be reported based on the data collection strategies. When the management platform needs to expand the types of data reported by commercial vehicles, it only needs to send new data collection strategies to commercial vehicles, without the need to update the software of commercial vehicles, thus realizing flexible data collection.
[0068] like Figure 2 As shown, it shows a method flow chart of a commercial vehicle data collection method provided by an embodiment of the present application. The commercial vehicle data collection method may include:
[0069] Step 201, the management platform configures element items for each type of data that needs to be collected, and the element items include at least a CAN identifier and a mask. The CAN identifier is determined based on the predefined message identifier for the data, the channel number of the CAN channel, and the frame type. The mask is determined based on the channel number and the frame type. The frame type includes a standard frame and an extended frame.
[0070] Each type of data corresponds to an element item. For example, acceleration corresponds to an element item, steering angle corresponds to an element item, fault status corresponds to an element item, version information corresponds to an element item, and so on.
[0071] The management platform displays an element configuration interface, which includes at least an input box for the message identifier, an input box for the channel number of the CAN channel, a selection box for the frame type, and may also include input boxes for other information, such as the data collection cycle, etc. Among them, the message identifier is pre-defined in the commercial vehicle.
[0072] After the user enters the corresponding information in the element configuration interface, the management platform generates a CAN identifier based on the message identifier, the channel number of the CAN channel, and the frame type, and generates a mask based on the channel number and frame type. The specific generation method is described below and will not be repeated here.
[0073] The mask is used to filter the packets encapsulated by the data. In simple terms, the value of each bit in the mask is 0 or 1. 1 means that the corresponding bit in the message identifier must be matched exactly, while 0 means that the corresponding bit in the message identifier can be ignored, that is, no matter what the value of the corresponding bit in the message identifier is, it can be matched.
[0074] Step 202: The management platform creates a data collection template, which at least includes a reporting method and a reporting cycle.
[0075] The management platform displays a template configuration interface, which includes at least a reporting mode selection box and a reporting cycle input box, and may also include input boxes for other information. The reporting mode includes reporting the last frame of valid messages or reporting all messages.
[0076] In step 203, the management platform associates the data collection template with at least one element item and at least one commercial vehicle to obtain a data collection strategy.
[0077] The management platform is pre-configured with vehicle information of each commercial vehicle, which includes the vehicle group to which the commercial vehicle belongs, the vehicle identification number (VIN), the license plate, etc.
[0078] The management platform may associate the data collection template with the element item, and associate the data collection template with the commercial vehicle. In this embodiment, the order of association is not limited.
[0079] Step 204: The management platform sends the data collection strategy to at least one commercial vehicle.
[0080] Step 205: The commercial vehicle configures a message filter according to the elements in the data collection strategy.
[0081] Each element item corresponds to a message filter.
[0082] Commercial vehicles can generate the channel number, message identifier and mask of the CAN channel based on an element item, and configure a message filter based on this information.
[0083] Step 206, for each type of data, the commercial vehicle sends the data to the message filter for filtering, and sends the filtered message to the management platform from the corresponding CAN channel according to the reporting cycle and the reporting method.
[0084] For each type of data, the commercial vehicle encapsulates the data into a message, sends the message to the message filter for filtering, and caches the filtered message. When the reporting cycle is reached, the commercial vehicle sends part or all of the cached message to the management platform from the corresponding CAN channel.
[0085] To sum up, in the data collection method for commercial vehicles provided in the embodiment of the present application, the management platform can configure element items for the data to be collected, and then associate the created data collection template with at least one element item and at least one commercial vehicle to obtain a data collection strategy; finally, the data collection strategy is sent to the commercial vehicle so that the commercial vehicle can collect the data set in the data collection strategy, thereby realizing flexible data collection.
[0086] like Figure 3 As shown, it shows a flow chart of a data collection method for a commercial vehicle provided by an embodiment of the present application. The data collection method for a commercial vehicle may include:
[0087] Step 301, the management platform configures element items for each type of data that needs to be collected, and the element items include at least a CAN identifier and a mask. The CAN identifier is determined based on the predefined message identifier for the data, the channel number of the CAN channel, and the frame type. The mask is determined based on the channel number and the frame type. The frame type includes a standard frame and an extended frame.
[0088] like Figure 4 As shown, the management platform displays an element item configuration interface, which includes at least an input box for a message identifier, an input box for a channel number of a CAN channel, a selection box for a frame type, and may also include input boxes for other information, such as a data collection cycle, etc. Among them, the message identifier is pre-defined in the commercial vehicle.
[0089] When the user enters the corresponding information in the element configuration interface, the management platform generates a CAN identifier based on the message identifier, the channel number of the CAN channel and the frame type, and generates a mask based on the channel number and frame type.
[0090] Specifically, the management platform configures element items for each type of data that needs to be collected, which may include:
[0091] (1) The management platform obtains the predefined message identifier for the data to be collected, and obtains the channel number and frame type of the CAN channel.
[0092] The number of CAN channels can be set according to actual needs. In this embodiment, 16 CAN channels are used as an example, and the channel numbers are 0000-1111.
[0093] Frame types include standard frames and extended frames. The message identifier in a standard frame is 11 bits, and the message identifier in an extended frame is 29 bits.
[0094] (2) The management platform sets the first two bits of the CAN identifier according to the upper two bits of the channel number, sets the identifier extension (IDE) bit in the CAN identifier according to the frame type, fills the message identifier into the message bit in the CAN identifier, and fills the remaining bits with a predetermined value to obtain the CAN identifier.
[0095] The channel number is represented by a 4-bit binary number, which can be split into the upper two bits and the lower two bits. For example, when the channel number is 0011, the upper two bits are 00 and the lower two bits are 11.
[0096] The frame type is represented by a 1-bit binary number, 0 represents a standard frame and 1 represents an extended frame.
[0097] The CAN identifier is represented by a 32-bit binary number, in which the upper two bits of the channel number are filled into the 30th and 31st bits of the CAN identifier, and the frame type is filled into the 29th bit of the CAN identifier. When the frame type is a standard frame, the 11-bit message identifier is filled into the 18th to 28th bits of the CAN identifier, and the remaining low bits are filled with 0; when the frame type is an extended frame, the 29-bit message identifier is filled into the 0th to 28th bits of the CAN identifier.
[0098] (3) The management platform sets the first two bits of the mask according to the lower two bits in the channel number, sets the IDE bit in the mask according to the frame type, and fills the remaining bits with a predetermined value to obtain a mask.
[0099] The mask is represented by a 32-bit binary number, where the lower two bits of the channel number are filled into the 30th and 31st bits of the mask, and the frame type is filled into the 29th bit of the mask. The remaining bits can be filled as required. For example, when all bits in the message identifier need to be matched exactly, the remaining bits can be filled with 1.
[0100] (4) The management platform combines the CAN identifier and mask into element items.
[0101] Step 302: The management platform creates a data collection template, which at least includes a reporting method and a reporting cycle.
[0102] like Figure 5As shown, the management platform displays a template configuration interface, which includes at least an input box for the template name, a selection box for the reporting method, and an input box for the reporting period, and may also include input boxes for other information. The reporting method includes reporting the last valid message frame or reporting all messages.
[0103] Step 303: The management platform associates the data collection template with at least one element item and at least one commercial vehicle to obtain a data collection strategy.
[0104] The management platform is pre-configured with vehicle information for each commercial vehicle, including the vehicle group, VIN, license plate, etc.
[0105] The management platform may associate the data collection template with the element item, and associate the data collection template with the commercial vehicle. In this embodiment, the order of association is not limited.
[0106] Specifically, the management platform associates the data collection template with at least one element item and at least one commercial vehicle to obtain a data collection strategy, which may include:
[0107] (1) The management platform displays multiple element items in the first association interface of the data collection template, and selects at least one element item from the multiple element items to be associated with the data collection template according to user operations.
[0108] like Figure 6 As shown, the left side of the first association interface displays all the currently configured element items, and the right side displays the element items currently associated with the data collection template.
[0109] The user can check the element items that need to be associated on the left, and then click the arrow button in the middle of the page to move the checked element items to the right for display, thereby associating the element items with the data collection template.
[0110] There is a delete button corresponding to each element item displayed on the right. When the user clicks the delete button, the element item can be disassociated from the data collection template.
[0111] (2) The management platform displays multiple commercial vehicles in the second association interface of the data collection template, and selects at least one commercial vehicle from the multiple commercial vehicles to be associated with the data collection template according to user operations.
[0112] like Figure 7 As shown, the left side of the second association interface displays all currently configured commercial vehicles, and the right side displays the commercial vehicles currently associated with the data collection template.
[0113] Users can check the commercial vehicles that need to be associated on the left, and then click the arrow button in the middle of the page to move the checked commercial vehicles to the right for display, thereby associating the commercial vehicles with the data collection template.
[0114] There is a delete button corresponding to each commercial vehicle displayed on the right. When the user clicks the delete button, the association between the commercial vehicle and the data collection template can be released.
[0115] (3) The management platform combines a data collection template, at least one element item, and at least one commercial vehicle into a data collection strategy.
[0116] like Figure 8 As shown, the data collection strategy includes the template name, the number of associated element items, the number of associated commercial vehicles, status, remarks, and some operation items. For example, the operation items include modification, disabling, copying, links to associated element items, links to associated commercial vehicles, and the like.
[0117] Step 304: The management platform sends the data collection strategy to at least one commercial vehicle.
[0118] Specifically, the management platform sends the data collection strategy to at least one commercial vehicle, which may include:
[0119] (1) The management platform displays the vehicle information of each commercial vehicle, the currently associated data collection strategy, the currently used data collection strategy and the delivery status in the data collection strategy delivery interface. The delivery status includes success and failure.
[0120] like Fig. 9 As shown, the vehicle information at least includes the vehicle group, VIN, license plate information, etc. If the currently associated data collection strategy is the same as the currently used data collection strategy, it means that the data collection strategy does not need to be updated; if the currently associated data collection strategy is different from the currently used data collection strategy, and / or the sending status is failed, it means that the data collection strategy needs to be updated.
[0121] (2) The management platform selects at least one commercial vehicle whose currently associated data collection strategy is different from the currently used data collection strategy, and / or selects at least one commercial vehicle whose sending status is failed, and sends the data collection strategy to the at least one commercial vehicle.
[0122] like Fig. 9 As shown, users can check the data collection strategies that need to be issued, click the batch issue button, and then send the data collection strategies to commercial vehicles in batches.
[0123] Step 305: The commercial vehicle configures a message filter according to the elements in the data collection strategy.
[0124] Each element item corresponds to a message filter.
[0125] Commercial vehicles can generate the channel number, message identifier and mask of the CAN channel based on an element item, and configure a message filter based on this information.
[0126] Specifically, the commercial vehicle configures the message filter according to the elements in the data collection strategy, which may include:
[0127] (1) The commercial vehicle reads the CAN identifier and mask from the element item.
[0128] (2) For commercial vehicles, the first two digits in the CAN identifier are used as the upper two digits in the channel number, and the first two digits in the mask are used as the lower two digits in the channel number to obtain the channel number of the CAN channel.
[0129] The commercial vehicle reads the 30th and 31st bits in the CAN identifier as the upper two bits in the channel number; reads the 30th and 31st bits in the mask as the lower two bits in the channel number; and combines the upper two bits and the lower two bits into a four-bit channel number.
[0130] (3) The commercial vehicle determines the frame type according to the IDE bit in the CAN identifier, determines the message bit in the CAN identifier according to the frame type, and obtains the message identifier from the message bit.
[0131] The commercial vehicle reads the 29th bit in the CAN identifier. If the value is 0, it is determined that the frame type is a standard frame, and the 18th to 28th bits in the CAN identifier are read as the message identifier; if the value is 1, it is determined that the frame type is an extended frame, and the 0th to 28th bits in the CAN identifier are read as the message identifier.
[0132] (4) The commercial vehicle determines the frame type according to the IDE bit in the mask, determines the corresponding mask bit in the mask according to the frame type, and obtains the mask corresponding to the message identifier from the mask bit.
[0133] The commercial vehicle reads the 29th bit in the mask. If the value is 0, it determines that the frame type is a standard frame, and reads bits 18 to 28 in the mask to determine the message identifier that needs to be checked; if the value is 1, it determines that the frame type is an extended frame, and reads bits 0 to 28 in the mask to determine the message identifier that needs to be checked.
[0134] (5) Commercial vehicles configure message filters based on channel number, message ID, and mask.
[0135] The parameters of the message filter include the channel number of the CAN channel, the message identifier and the mask.
[0136] Step 306: For each type of data, the commercial vehicle sends the data to the message filter for filtering, and sends the filtered message to the management platform from the corresponding CAN channel according to the reporting cycle and the reporting method.
[0137] Specifically, the commercial vehicle sends data to the message filter for filtering, which may include: the commercial vehicle encapsulates the data into a message and sends it to the message filter; the message filter verifies the channel number, message identifier and mask corresponding to the message; if the channel number, message identifier and mask corresponding to the message are the same as the channel number, message identifier and mask configured by the message filter, the message filter retains the message; if the channel number, message identifier and mask corresponding to the message are different from the channel number, message identifier and mask configured by the message filter, the message filter discards the message.
[0138] like Fig.10 As shown, each filter corresponds to a message data queue with a limited length (first in, first out). The filter caches the retained messages in a corresponding message data queue. All message data queues correspond to the same reporting cycle. When the reporting cycle is reached, the commercial vehicle sends part or all of the cached messages in all message data queues to the management platform from the corresponding CAN channel.
[0139] Specifically, sending the filtered message from the corresponding CAN channel to the management platform according to the reporting cycle and the reporting method may include: the commercial vehicle caches the filtered message in the message data queue; when the reporting cycle is reached, the commercial vehicle reads the message from the message data queue according to the reporting method, and the reporting method includes reporting the last frame of valid message or reporting all messages; the commercial vehicle sends the message from the corresponding CAN channel to the management platform.
[0140] Step 307: The management platform displays the message data of each message sent by the commercial vehicle in the data analysis interface.
[0141] like Fig.11 As shown, the data analysis interface displays all messages received by the commercial vehicle each time according to the receiving time. Each message includes a CAN identifier, a signal name, and raw data. The raw data can be analyzed to determine the status of the commercial vehicle.
[0142] To sum up, in the data collection method for commercial vehicles provided in the embodiment of the present application, the management platform can configure element items for the data to be collected, and then associate the created data collection template with at least one element item and at least one commercial vehicle to obtain a data collection strategy; finally, the data collection strategy is sent to the commercial vehicle so that the commercial vehicle can collect the data set in the data collection strategy, thereby realizing flexible data collection.
[0143] like Fig.12 As shown, it shows a structural block diagram of a commercial vehicle data collection system provided by an embodiment of the present application, and the commercial vehicle data collection system may include: a management platform 1210 and a commercial vehicle 1220;
[0144] The management platform 1210 is used to configure element items for each data to be collected, where the element items at least include a CAN identifier and a mask, where the CAN identifier is determined based on a predefined message identifier for the data, a channel number of a CAN channel, and a frame type, and the mask is determined based on the channel number and the frame type, where the frame type includes a standard frame and an extended frame;
[0145] The management platform 1210 is also used to create a data collection template, which at least includes a reporting method and a reporting period;
[0146] The management platform 1210 is further used to associate the data collection template with at least one element item and at least one commercial vehicle 1220 to obtain a data collection strategy;
[0147] The management platform 1210 is also used to send the data collection strategy to at least one commercial vehicle 1220;
[0148] Commercial vehicle 1220, used to configure a message filter according to the element items in the data collection strategy;
[0149] For each type of data, the commercial vehicle 1220 is also used to send the data to the message filter for filtering, and send the filtered message from the corresponding CAN channel to the management platform 1210 according to the reporting cycle and the reporting method.
[0150] In an optional embodiment, the management platform 1210 is further configured to:
[0151] Obtain the predefined message identifier for the data to be collected, and obtain the channel number and frame type of the CAN channel;
[0152] The first two bits of the CAN identifier are set according to the upper two bits of the channel number, the identifier extension IDE bit in the CAN identifier is set according to the frame type, the message identifier is filled into the message bit in the CAN identifier, and the remaining bits are filled with a predetermined value to obtain the CAN identifier;
[0153] The first two bits of the mask are set according to the lower two bits in the channel number, the IDE bit in the mask is set according to the frame type, and the remaining bits are filled with a predetermined value to obtain a mask;
[0154] The CAN identifier and mask are combined into element items.
[0155] In an optional embodiment, the commercial vehicle 1220 is further used for:
[0156] Read the CAN flag and mask from the element item;
[0157] The first two digits in the CAN identifier are used as the upper two digits in the channel number, and the first two digits in the mask are used as the lower two digits in the channel number to obtain the channel number of the CAN channel;
[0158] Determine the frame type according to the IDE bit in the CAN identifier, determine the message bit in the CAN identifier according to the frame type, and obtain the message identifier from the message bit;
[0159] Determine the frame type according to the IDE bit in the mask, determine the corresponding mask bit in the mask according to the frame type, and obtain the mask corresponding to the message identifier from the mask bit;
[0160] Configure the message filter based on the channel number, message ID, and mask.
[0161] In an optional embodiment, the commercial vehicle 1220 is further used to encapsulate the data into a message and send it to the message filter;
[0162] Message filters are used to:
[0163] Verify the channel number, message identifier and mask corresponding to the message;
[0164] If the channel number, message identifier and mask corresponding to the message are the same as those configured in the message filter, the message is retained;
[0165] If the channel number, message identifier and mask corresponding to the message are different from or the same as the channel number, message identifier and mask configured in the message filter, the message is discarded.
[0166] In an optional embodiment, the commercial vehicle 1220 is further used for:
[0167] Cache the filtered messages into the message data queue;
[0168] When the reporting cycle is reached, the message is read from the message data queue according to the reporting method, and the reporting method includes reporting the last frame of valid messages or reporting all messages;
[0169] The message is sent to the management platform 1210 from the corresponding CAN channel.
[0170] In an optional embodiment, the management platform 1210 is further configured to:
[0171] Displaying multiple element items in the first association interface of the data collection template, and selecting at least one element item from the multiple element items to associate with the data collection template according to a user operation;
[0172] A plurality of commercial vehicles 1220 are displayed in a second association interface of the data collection template, and at least one commercial vehicle 1220 is selected from the plurality of commercial vehicles 1220 to be associated with the data collection template according to a user operation;
[0173] The data collection template, at least one element item and at least one commercial vehicle 1220 form a data collection strategy.
[0174] In an optional embodiment, the management platform 1210 is further configured to:
[0175] The data collection strategy delivery interface displays vehicle information of each commercial vehicle 1220, the currently associated data collection strategy, the currently used data collection strategy and the delivery status, where the delivery status includes success and failure;
[0176] Select at least one commercial vehicle 1220 whose currently associated data collection strategy is different from the currently used data collection strategy, and / or select at least one commercial vehicle 1220 whose sending status is failed, and send the data collection strategy to at least one commercial vehicle 1220 .
[0177] In an optional embodiment, the management platform 1210 is further configured to:
[0178] The management platform 1210 displays the message data of each message sent by the commercial vehicle 1220 in the data analysis interface.
[0179] To summarize, in the data collection system for commercial vehicles provided in the embodiment of the present application, the management platform can configure element items for the data to be collected, and then associate the created data collection template with at least one element item and at least one commercial vehicle to obtain a data collection strategy; finally, the data collection strategy is sent to the commercial vehicle so that the commercial vehicle can collect the data set in the data collection strategy, thereby realizing flexible data collection.
[0180] An embodiment of the present application provides a computer-readable storage medium, wherein the storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement the commercial vehicle data collection method as described above.
[0181] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0182] The above description is not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the embodiments of the present application.
Claims
1. A data collection method for a commercial vehicle, characterized in that: The method comprises: The management platform configures element items for each data to be collected, wherein the element items at least include a controller area network CAN identifier and a mask, wherein the CAN identifier is determined according to a message identifier predefined for the data, a channel number of a CAN channel, and a frame type, and the mask is determined according to the channel number and the frame type, wherein the frame type includes a standard frame and an extended frame; The management platform creates a data collection template, and the data collection template at least includes a reporting method and a reporting period; The management platform associates the data collection template with at least one element item and at least one commercial vehicle to obtain a data collection strategy; The management platform sends the data collection strategy to the at least one commercial vehicle; The commercial vehicle configures a message filter according to the element items in the data collection strategy; For each type of data, the commercial vehicle sends the data to the message filter for filtering, and sends the filtered message to the management platform from the corresponding CAN channel according to the reporting cycle and in the reporting mode.
2. The commercial vehicle data collection method according to claim 1, characterized in that: The management platform configures element items for each type of data that needs to be collected, including: The management platform obtains a predefined message identifier for the data to be collected, and obtains the channel number and frame type of the CAN channel; The management platform sets the first two bits of the CAN identifier according to the upper two bits of the channel number, sets the identifier extension IDE bit in the CAN identifier according to the frame type, fills the message identifier into the message bit in the CAN identifier, and fills the remaining bits with a predetermined value to obtain the CAN identifier; The management platform sets the first two bits of the mask according to the lower two bits of the channel number, sets the IDE bit in the mask according to the frame type, and fills the remaining bits with a predetermined value to obtain the mask; The management platform combines the CAN identifier and the mask into element items.
3. The commercial vehicle data collection method according to claim 2, characterized in that: The commercial vehicle configures a message filter according to the element items in the data collection strategy, including: The commercial vehicle reads the CAN identification and mask from the element item; The commercial vehicle uses the first two digits in the CAN identifier as the upper two digits in the channel number, and uses the first two digits in the mask as the lower two digits in the channel number to obtain the channel number of the CAN channel; The commercial vehicle determines the frame type according to the IDE bit in the CAN identifier, determines the message bit in the CAN identifier according to the frame type, and obtains the message identifier from the message bit; The commercial vehicle determines the frame type according to the IDE bit in the mask, determines the corresponding mask bit in the mask according to the frame type, and obtains the mask corresponding to the message identifier from the mask bit; The commercial vehicle configures a message filter according to the channel number, the message identifier and the mask.
4. The commercial vehicle data collection method according to claim 3, characterized in that: The commercial vehicle sends the data to the message filter for filtering, including: The commercial vehicle encapsulates the data into a message and sends it to the message filter; The message filter verifies the channel number, message identifier and mask corresponding to the message; If the channel number, message identifier and mask corresponding to the message are the same as the channel number, message identifier and mask configured by the message filter, the message filter retains the message; If the channel number, message identifier and mask corresponding to the message are different from or the same as the channel number, message identifier and mask configured by the message filter, the message filter discards the message.
5. The commercial vehicle data collection method according to claim 1, characterized in that: The step of sending the filtered messages to the management platform from the corresponding CAN channel according to the reporting period and in the reporting mode includes: The commercial vehicle caches the filtered messages into a message data queue; When the reporting cycle is reached, the commercial vehicle reads the message from the message data queue according to the reporting method, and the reporting method includes reporting the last frame of valid message or reporting all messages; The commercial vehicle sends the message to the management platform through the corresponding CAN channel.
6. The commercial vehicle data collection method according to claim 1, characterized in that: The management platform associates the data collection template with at least one element item and at least one commercial vehicle to obtain a data collection strategy, including: The management platform displays a plurality of element items in the first association interface of the data collection template, and selects at least one element item from the plurality of element items to be associated with the data collection template according to a user operation; The management platform displays a plurality of commercial vehicles in the second association interface of the data collection template, and selects at least one commercial vehicle from the plurality of commercial vehicles to be associated with the data collection template according to a user operation; The management platform combines the data collection template, the at least one element item and the at least one commercial vehicle into a data collection strategy.
7. The commercial vehicle data collection method according to claim 1, characterized in that: The management platform sends the data collection strategy to the at least one commercial vehicle, including: The management platform displays the vehicle information of each commercial vehicle, the currently associated data collection strategy, the currently used data collection strategy and the delivery status in the data collection strategy delivery interface, and the delivery status includes success and failure; The management platform selects at least one commercial vehicle whose currently associated data collection strategy is different from the currently used data collection strategy, and / or selects at least one commercial vehicle whose sending status is failed, and sends the data collection strategy to the at least one commercial vehicle.
8. The commercial vehicle data collection method according to claim 1, characterized in that: The method further comprises: The management platform displays the message data of each message sent by the commercial vehicle in the data analysis interface.
9. A data collection system for a commercial vehicle, characterized in that: The data collection system includes: a management platform and a commercial vehicle; The management platform is used to configure element items for each type of data to be collected, wherein the element items at least include a controller area network CAN identifier and a mask, wherein the CAN identifier is determined according to a message identifier predefined for the data, a channel number of a CAN channel, and a frame type, and the mask is determined according to the channel number and the frame type, wherein the frame type includes a standard frame and an extended frame; The management platform is further used to create a data collection template, wherein the data collection template at least includes a reporting method and a reporting period; The management platform is further used to associate the data collection template with at least one element item and at least one commercial vehicle to obtain a data collection strategy; The management platform is further used to send the data collection strategy to the at least one commercial vehicle; The commercial vehicle is used to configure a message filter according to the element items in the data collection strategy; For each type of data, the commercial vehicle is further used to send the data to the message filter for filtering, and send the filtered message to the management platform from the corresponding CAN channel according to the reporting period and in the reporting mode.
10. A computer-readable storage medium, characterized in that: The storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the data collection method for a commercial vehicle according to any one of claims 1 to 8.