A data processing method, device, equipment and storage medium
By presetting multiple data interpretation models in the cloud and analyzing them according to the combination of communication devices and data transmission channels, the problem of inefficient analysis of vehicle data by cloud platforms is solved, achieving more efficient data analysis and better user experience.
Patent Information
- Application Number
- CN202411806630.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-08
AI Technical Summary
After receiving the data uploaded by the vehicle, the cloud platform in the prior art needs to traverse each line of code in the DBC file to interpret the data as DBC signal data, resulting in inefficient parsing and the user receives a large amount of invalid information, which reduces the user experience.
A number of data interpretation models are pre-set in the cloud, each model associated with a communication combination of at least one communication device and a data transmission channel. After receiving the RAW data, it is converted into CAN frame data, and the target CAN message in the CAN frame data is parsed according to the corresponding target data interpretation model.
It improves the parsing efficiency of CAN frame messages, reduces the waste of cloud resources, and improves the user experience, avoiding users receiving too much invalid information.
Smart Images

Figure CN119788757A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing, and in particular, to a data processing method, apparatus, device and storage medium. Background Art
[0002] At present, with the development of Internet of Vehicles technology, vehicles can already achieve network connection with cloud platforms. After collecting raw data, vehicles compress and report it to the cloud. After receiving the data, the cloud decompresses the data and then converts the data into the vehicle's DBC signal data. In this way, operators can also view the vehicle's operating status in real time through the cloud, and engineers can also determine the cause of the vehicle's failure through the data on the cloud.
[0003] However, currently, after receiving the data uploaded by the vehicle, the cloud needs to traverse each line of code in the DBC file to interpret the data as DBC (Database CAN) signal data, which results in low data parsing efficiency. In addition, the cloud is for different users, and different users pay attention to different vehicle signal data. Currently, the cloud will treat all the received data as DBC signal data, and users will receive more invalid information, which wastes cloud resources and reduces the user experience. Summary of the invention
[0004] The embodiments of the present invention provide a data processing method, device, equipment and storage medium, which solve the technical problem of low parsing efficiency when a cloud platform parses data uploaded by a vehicle in the prior art.
[0005] In a first aspect, an embodiment of the present invention provides a data processing method, the method comprising the following steps:
[0006] Receive RAW data uploaded by different communication devices through corresponding data transmission channels, and convert the RAW data into CAN frame data;
[0007] Determine a target data interpretation model corresponding to the communication device and the data transmission channel in a model library, wherein the model library includes a plurality of data interpretation models, each of the data interpretation models is pre-associated with at least one communication combination, each of the data interpretation models includes a data interpretation rule corresponding to at least one CAN message, and the CAN messages parsed by each of the data interpretation models are different, and each of the communication combinations includes one of the data transmission channels and a corresponding communication device;
[0008] The target CAN message in the corresponding CAN frame data is parsed based on the target data interpretation model to obtain a data parsing result corresponding to the target CAN message.
[0009] Wherein, determining the target data interpretation model corresponding to the communication device and the data transmission channel in the model library includes:
[0010] Determine a target sub-device model corresponding to the communication device and the data transmission channel among a plurality of sub-device models, each of the sub-device models being pre-associated with a communication combination;
[0011] Among the data interpretation models in the model library, a target data interpretation model corresponding to the target sub-device model is determined, and each of the data interpretation models is pre-associated with at least one of the sub-device models.
[0012] The data interpretation model is obtained in advance in the following way:
[0013] Obtaining a DBC file and parsing the DBC file to obtain a message ID and a data interpretation rule corresponding to each CAN message in the DBC file, wherein the DBC file includes a plurality of the CAN messages;
[0014] In response to a message selection instruction, determining at least one first CAN message in the CAN message;
[0015] Generate a data interpretation model corresponding to the DBC file according to the message ID corresponding to each of the first CAN messages and the data interpretation rule;
[0016] In response to a model binding instruction, the data interpretation model is associated with at least one of the communication combinations.
[0017] Wherein, in response to the message selection instruction, determining at least one first CAN message in the CAN message includes:
[0018] Convert the message ID and data interpretation rule corresponding to each CAN message in the DBC file into list data of a list structure, generate a list according to the list data and send the list to the front end for display;
[0019] In response to the message selection instruction sent by the front end, determining at least one target list data in the list;
[0020] Among the CAN messages, a CAN message corresponding to the target list data is determined as a first CAN message.
[0021] Among them, it also includes:
[0022] In response to the model modification instruction, determining a second data interpretation model that needs to be modified in the data interpretation model;
[0023] In response to the message modification instruction, the message ID in the second data interpretation model is modified, and the data interpretation rule corresponding to the second data interpretation model is updated according to the modified message ID.
[0024] The CAN frame data includes a first parameter group number of the target CAN message, the target data interpretation model includes a second parameter group number of at least one corresponding message ID, and the target CAN message in the CAN frame data is parsed based on the target data interpretation model to obtain a data parsing result corresponding to the target CAN message, including:
[0025] Determine a first parameter group number in the CAN frame data, and determine a second parameter group number in the target data interpretation model;
[0026] In the case that the first parameter group number matches a target second parameter group number in the second parameter group number, the target CAN message in the CAN frame data is parsed based on the data interpretation rule corresponding to the target second parameter group number in the target data interpretation model to obtain a data parsing result corresponding to the target CAN message.
[0027] The target CAN message includes multiple data, and the target CAN message in the CAN frame data is parsed based on the data interpretation rule corresponding to the target second parameter group number in the target data interpretation model to obtain a data parsing result corresponding to the target CAN message, including:
[0028] Determine, based on a target data interpretation rule corresponding to the target second parameter group number in the target data interpretation model, sub-data corresponding to different information fields in a plurality of data of the target CAN message;
[0029] The sub-data corresponding to different information fields are parsed based on the target data interpretation rule to obtain information names and data values corresponding to different information fields.
[0030] In a second aspect, an embodiment of the present invention provides a data processing device, the device comprising:
[0031] A data conversion module is used to receive RAW data uploaded by different communication devices through corresponding data transmission channels, and convert the RAW data into CAN frame data;
[0032] A model determination module, used to determine a target data interpretation model corresponding to the communication device and the data transmission channel in a model library, wherein the model library includes a plurality of data interpretation models, each of which is pre-associated with at least one communication combination, each of which includes a data interpretation rule corresponding to at least one CAN message, and each of which parses a different CAN message, and each of which includes a data transmission channel and a corresponding communication device;
[0033] The data parsing module is used to parse the target CAN message in the corresponding CAN frame data based on the target data interpretation model to obtain a data parsing result corresponding to the target CAN message.
[0034] In a third aspect, an embodiment of the present invention provides a data processing device, the data processing device comprising a processor and a memory;
[0035] The memory is used to store a computer program and transmit the computer program to the processor;
[0036] The processor is used to execute a data processing method as described in the first aspect according to instructions in the computer program.
[0037] In a fourth aspect, an embodiment of the present invention provides a storage medium storing computer executable instructions, wherein the computer executable instructions, when executed by a computer processor, are used to execute a data processing method as described in the first aspect.
[0038] As described above, the embodiment of the present invention provides a data processing method, device, equipment and storage medium. In the embodiment of the present invention, multiple data interpretation models are pre-set in the cloud, and each data interpretation model is pre-associated with a communication combination of at least one data transmission channel and a communication device. After receiving the RAW data uploaded by the communication device through the data transmission channel and converting it into CAN frame data, the cloud obtains the corresponding target data interpretation model to parse the target CAN message in the CAN frame data through the target data interpretation model to obtain the data parsing result corresponding to the target CAN message. In the embodiment of the present invention, multiple data interpretation models are pre-set in the cloud, and the CAN frame data uploaded by different communication devices through different data transmission channels are parsed by the data interpretation model. When parsing the CAN frame message, it is not necessary to traverse every line of code in the DBC file, thereby improving the efficiency of parsing the CAN frame message. In addition, the user can set the data interpretation model in the cloud according to the CAN message to be viewed, so that the cloud only parses the CAN message that the user needs to view, thereby avoiding the user from receiving too much invalid information, reducing the waste of cloud resources, and also improving the user's experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 A flowchart of a data processing method provided by an embodiment of the present invention.
[0040] Figure 2 A schematic diagram of the principle of a data processing method provided by an embodiment of the present invention.
[0041] Figure 3 A flowchart of another data processing method provided by an embodiment of the present invention.
[0042] Figure 4 A schematic diagram of the principles of another data processing method provided by an embodiment of the present invention.
[0043] Figure 5 A schematic diagram of the structure of a data processing device provided by an embodiment of the present invention.
[0044] Figure 6 A structural schematic diagram of a data processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0045] The following description and accompanying drawings fully illustrate the specific embodiments of the present application so that those skilled in the art can practice them. The examples represent possible variations only. Unless explicitly required, separate components and functions are optional, and the order of operation can vary. The parts and features of some embodiments may be included in or replace the parts and features of other embodiments. The scope of the embodiments of the present application includes the entire scope of the claims, and all available equivalents of the claims. In this article, each embodiment may be represented individually or generally by the term "invention", which is only for convenience, and if more than one invention is disclosed in fact, it is not intended to automatically limit the scope of the application to any single invention or inventive concept. In this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, without requiring or implying any actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed. The various embodiments are described in a progressive manner herein, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. As for the structures, products, etc. disclosed in the embodiments, since they correspond to the parts disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method part.
[0046] like Figure 1As shown, Figure 1 A flowchart of a data processing method provided in an embodiment of the present invention. The data processing method provided in an embodiment of the present invention can be executed by a data processing device, and the data processing device can be implemented by software and / or hardware. The data processing device can be composed of two or more physical entities, or can be composed of one physical entity. For example, the data processing device can be a computer, a host computer, or a server. In the embodiment of the present invention, the data processing device is taken as a server in the cloud for example. The data processing method provided in the embodiment of the present invention includes the following steps:
[0047] Step 101: Receive RAW data uploaded by different communication devices through corresponding data transmission channels, and convert the RAW data into CAN frame data.
[0048] In this embodiment, different communication devices can upload RAW (raw) data to the cloud through corresponding data transmission channels. The communication devices can be CANDTU devices or 5G communication devices on different vehicles, etc., where the CANDTU devices are used to realize the functions of recording, uploading, analyzing and managing CAN data. Different communication devices upload RAW data through different data transmission channels. A communication device can upload RAW data through multiple data transmission channels, and the RAW data from the same CAN bus in the vehicle is uploaded through the same data transmission channel. For example, the RAW data collected by the CANDTU device on a vehicle includes the battery power consumption data, battery temperature data, engine speed data and engine temperature data of the vehicle, wherein the CANDTU device collects the battery power consumption data and battery temperature data during operation from the battery management module through a CAN bus, and collects the engine speed data and engine temperature data during operation from the engine detection module through another CAN bus. When uploading data to the cloud, the CANDTU device needs to upload the battery power consumption data and battery temperature data to the cloud through one data transmission channel, and transmit the engine speed data and engine temperature data to the cloud through another data transmission channel.
[0049] After receiving the RAW data, the cloud parses the RAW data and converts the RAW data into CAN frame data. In one embodiment, when the communication device is a CANDTU device, since the device type of the CANDTU device is fixed and the data structure of the RAW data is also fixed, a CAN frame conversion model can be pre-set in the cloud. The CAN frame conversion model includes conversion rules for converting RAW data into CAN frame data. The CAN frame conversion model is used to convert RAW data into CAN frame data according to the built-in conversion rules. The CAN frame conversion model can be used by all users in the cloud.
[0050] Step 102: determine in the model library a target data interpretation model corresponding to the communication device and the data transmission channel, the model library includes a plurality of data interpretation models, each data interpretation model is pre-associated with at least one communication combination, each data interpretation model includes a data interpretation rule corresponding to at least one CAN message, and the CAN messages parsed by each data interpretation model are different, and each communication combination includes a data transmission channel and a corresponding communication device.
[0051] After converting the RAW data into CAN frame data, it is necessary to further determine the target data interpretation model corresponding to the communication combination of the communication device and the data transmission channel in the model library. It should be noted that the model library includes multiple data interpretation models, each of which includes a data interpretation rule corresponding to at least one CAN message, and the data interpretation rule is used to interpret the data and information carried in the CAN message. In addition, the CAN messages parsed by each data interpretation model are different. Specifically, each data interpretation model can be generated based on a DBC file. The DBC file is a text file used to define and describe data communication on a controller area network (CAN) bus. The DBC file includes multiple CAN messages and their corresponding data interpretation rules. The user can determine the CAN message that needs to be parsed in the DBC file according to actual needs, and generate a data interpretation model corresponding to the DBC file according to the CAN message that needs to be parsed and the corresponding data interpretation rule, so that the data interpretation model can interpret the CAN message corresponding to the DBC file.
[0052] In addition, in this embodiment, the data interpretation model needs to be pre-associated with at least one data transmission channel and the communication combination of the corresponding communication device, so that after different communication devices upload RAW data through different data transmission channels, the cloud can call the corresponding data interpretation model. It can be understood that when the data interpretation model is associated with the communication combination, the CAN message interpreted by the data interpretation model needs to correspond to the CAN message contained in the RAW data uploaded by the communication combination, so that the data interpretation rules in the data interpretation model can interpret the CAN message uploaded by the communication combination. Exemplarily, after the user generates the corresponding data interpretation model according to the DBC file corresponding to the battery management module in advance, the data interpretation model needs to be associated with the communication combination corresponding to the RAW data uploaded to the battery management module, so that the data interpretation model can subsequently parse out the CAN message carried by the CAN frame data, which is related to the battery management module. In one embodiment, each communication device has a corresponding device ID, each data transmission channel has a corresponding channel ID, and each data interpretation model has a corresponding model ID. The user can bind the device ID, channel ID, and model ID to associate the data interpretation model with the communication combination of the data transmission channel and the communication device. Subsequently, the corresponding model ID can be determined based on the device ID and channel ID, thereby determining the corresponding target data interpretation model. In addition, the data interpretation model can be reused, that is, each data interpretation model can be associated with at least one communication combination of a data transmission channel and a communication device.
[0053] Step 103: parse the target CAN message in the corresponding CAN frame data based on the target data interpretation model to obtain a data parsing result corresponding to the target CAN message.
[0054] After determining the target data interpretation model, the target CAN message carried by the corresponding CAN frame data can be parsed according to the target data interpretation model to obtain a data parsing result corresponding to the target CAN message. Exemplarily, the data parsing result includes field names and field values, such as battery power consumption kWh, battery temperature 40°C, etc. In one embodiment, Figure 2 As shown, Figure 2 A schematic diagram of the principle of a data processing method provided in an embodiment of the present invention. After the cloud obtains the data analysis result, the user can view the data analysis result on the cloud.
[0055] As described above, an embodiment of the present invention provides a data processing method. In the embodiment of the present invention, multiple data interpretation models are pre-set in the cloud, and each data interpretation model is pre-associated with at least one data transmission channel and a communication combination of a communication device. After receiving the RAW data uploaded by the communication device through the data transmission channel and converting it into CAN frame data, the cloud obtains the corresponding target data interpretation model to parse the target CAN message in the CAN frame data through the target data interpretation model to obtain a data parsing result corresponding to the target CAN message. In the embodiment of the present invention, multiple data interpretation models are pre-set in the cloud, and the CAN frame data uploaded by different communication devices through different data transmission channels are parsed by the data interpretation model. When parsing the CAN frame message, it is not necessary to traverse every line of code in the DBC file, thereby improving the efficiency of parsing the CAN frame message. In addition, the user can set the data interpretation model in the cloud according to the CAN message to be viewed, so that the cloud only parses the CAN message that the user needs to view, thereby avoiding the user from receiving too much invalid information, reducing the waste of cloud resources, and also improving the user's experience.
[0056] In one embodiment, the data interpretation model is obtained in advance by:
[0057] Step 201: Obtain a DBC file and parse the DBC file to obtain a message ID and a data interpretation rule corresponding to each CAN message in the DBC file, wherein the DBC file includes multiple CAN messages.
[0058] In this embodiment, when building a data interpretation model, the user first needs to upload the DBC file to the cloud, and the cloud obtains and parses the DBC file to obtain the message ID and data interpretation rules corresponding to each CAN message in the DBC file. The DBC file includes multiple CAN messages. Exemplarily, in the DBC file, each CAN message consists of: message (BO_), signal (SG_), signal value description (VAL_), and comment (CM_). Taking the message ID of the CAN message = 2633934846 as an example, the content of the CAN message is described in the DBC file as follows:
[0059] BO 2633934846 AT:8Vector_XXX
[0060] SG_EngAltWinding3Temp:32|8@1+(1,-40)[-40|210]"degc"Vector_XXX
[0061] SG_EngAltWinding2Temp:248@1+(1,-40)[-40|210]"deg C"Vector_XXX
[0062] SGEngAltWindinglTemp:16|8@1+(1,-40)[-40|210]"deg c"Vector_XXX
[0063] EngAltBearing2Temp:88@1+(1,-40)[-40|210]"deg C"Vector XxXS
[0064] GEngAltBearinglTemp:08@1+(1,-40)[-40|210]"deg C"Vector XxX
[0065] Among them, the message (BO_) includes message ID, message name, length, sender, and signal.
[0066] Signal (SG_) contains data interpretation rules, which include signal name, start bit, bit length, byte order, range and other information. The meaning of data interpretation rules are as follows: a|b: a (start bit), b (length); byte order: 0 (Intel, little endian), 1 (Motorola, big endian); (a, b): conversion ratio and offset, actual value = original value * a + b; [a|b]: [min, max].
[0067] According to the description of CAN message in the above DBC file, the cloud will split the data interpretation rules of the CAN message into signal interpretation rules corresponding to each signal and save them to the database. Each signal interpretation rule records nine fields: signal ID, signal name, signal start bit, bit length, byte order, conversion ratio, minimum value, maximum value and unit.
[0068] Step 202: In response to the message selection instruction, determine at least one first CAN message in the CAN message.
[0069] After parsing the message ID and data interpretation rules corresponding to each CAN message in the DBC file, the user can select the first CAN message that needs to be interpreted in the DBC file by sending a message selection instruction to the cloud. Exemplarily, the cloud can send the message ID and data interpretation rules to the front end (such as a web page) for display, so that the user can select the first CAN message that needs to be interpreted on the front end. Specifically, in response to the message selection instruction in step 202, at least one first CAN message is determined in the CAN message, including:
[0070] Step 2021: Convert the message ID and data interpretation rules corresponding to each CAN message in the DBC file into list data of a list structure, generate a list based on the list data, and send the list to the front end for display.
[0071] In one embodiment, the cloud can convert the text content corresponding to each CAN message in the DBC file into list data of a list structure, generate a list based on the list data, and send the list to the front-end page for display for the user to view, where the message ID corresponding to a CAN message and the data interpretation rule conversion correspond to a list data.
[0072] Step 2022: In response to the message selection instruction sent by the front end, determine at least one target list data in the list.
[0073] After the cloud displays the list in the front-end page, the user can further interact with the front-end page and send a message selection instruction to the front-end page to select the CAN message that needs to be parsed in the DBC file by selecting the target list data in the list. After receiving the message selection instruction, the front-end will further send the message selection instruction to the cloud, and the cloud will determine at least one target list data selected by the user in the list according to the message selection instruction. It can be understood that the number of target list data is determined according to the user's selection.
[0074] Step 2023: In the CAN message, determine the CAN message corresponding to the target list data as the first CAN message.
[0075] After determining the target list data, the cloud further determines a CAN message corresponding to the target list data in the CAN message corresponding to the DBC file, and determines the corresponding CAN message as the first CAN message.
[0076] Step 203: Generate a data interpretation model corresponding to the DBC file according to the message ID corresponding to each first CAN message and the data interpretation rule.
[0077] After determining the first CAN message, the cloud further generates model attributes corresponding to the message ID based on the message ID corresponding to each first CAN message, and binds the data interpretation rules describing the first CAN message in the DBC file to the interpretation rules of the model attributes, and finally generates a data interpretation model corresponding to the DBC file based on the model attributes.
[0078] Step 204: In response to the model binding instruction, associate the data interpretation model with at least one communication combination.
[0079] After generating a data interpretation model corresponding to the DBC file, the user can further send a model binding instruction to the cloud to bind the data interpretation model to at least one communication combination. Specifically, after generating the data interpretation model, the cloud can further display a device ID input box and a channel ID input box in the front-end page. After the user enters the device ID and channel ID in the device ID input box and the channel ID input box respectively, the cloud can bind the data interpretation model to the communication device corresponding to the device ID and the data transmission channel corresponding to the channel ID. Later, when it is necessary to parse the CAN frame data uploaded by the data transmission channel, the corresponding data interpretation model can be found according to the communication combination, and the corresponding data interpretation rules can be found according to the data interpretation model, avoiding reading the DBC file every time the data is interpreted, greatly speeding up the data parsing speed.
[0080] As described above, in the cloud in the embodiment of the present invention, when constructing a data interpretation model, the user only needs to select the CAN message to be parsed in the DBC file in the front-end page, and the cloud can construct a data interpretation model corresponding to the DBC file according to the CAN message selected by the user. In this process, the user does not need to manually construct the data interpretation model, which greatly simplifies the user operation, and different users can set different data interpretation models according to different needs, which greatly improves the flexibility of different users in viewing messages.
[0081] Based on the above embodiment, it also includes:
[0082] Step 104: In response to the model modification instruction, determine the second data interpretation model that needs to be modified in the data interpretation model.
[0083] Step 105: In response to the message modification instruction, modify the message ID in the second data interpretation model, and update the data interpretation rules corresponding to the second data interpretation model according to the modified message ID.
[0084] In one embodiment, after the cloud constructs the data interpretation model, the user can modify the data interpretation model according to actual needs. Specifically, when the data interpretation model needs to be modified, the user can send a model modification instruction to the cloud through the front-end page to select the second data interpretation model that needs to be modified. After the cloud determines the second data interpretation model, it can convert the message ID and data interpretation rules corresponding to the second data interpretation model into a list, and then display the list on the front-end page for the user to edit. The user edits the message ID in the list in the front end (for example, replace or delete operations), and after the editing is completed, the user can send a message modification instruction to the cloud through the front-end page. The cloud modifies the message ID corresponding to the second data interpretation model according to the message modification instruction, and then further updates the data interpretation rules corresponding to the second data interpretation model according to the modified message ID to complete the update of the second data interpretation model.
[0085] As described above, in the embodiment of the present invention, after the cloud constructs the data interpretation model, the user can modify the data interpretation model according to actual needs, which improves the user's flexibility in viewing CAN messages, and in the process of modifying the data interpretation model, the user does not need to modify the code of the data interpretation model, which greatly simplifies the user's operation and reduces the user's difficulty of use.
[0086] The embodiment of the present invention also provides another data processing method, such as Figure 3 As shown, Figure 3 The present invention provides another data processing method according to an embodiment of the present invention. The data processing method according to an embodiment of the present invention is a specific embodiment of the above data processing method. The data processing method includes the following steps:
[0087] Step 301: Receive RAW data uploaded by different communication devices through corresponding data transmission channels, and convert the RAW data into CAN frame data.
[0088] Step 302: Determine a target sub-device model corresponding to a communication device and a data transmission channel among multiple sub-device models, each sub-device model is pre-associated with a communication combination, and each communication combination includes a data transmission channel and a corresponding communication device.
[0089] Step 303: Determine a target data interpretation model corresponding to a target sub-device model in the data interpretation model of the model library, wherein each data interpretation model is pre-associated with at least one sub-device model. The model library includes a plurality of data interpretation models, each data interpretation model includes a data interpretation rule corresponding to at least one CAN message, and each data interpretation model parses a different CAN message.
[0090] In this embodiment, a plurality of sub-device models are also provided in the cloud, wherein the sub-device model is pre-associated with a communication combination and a data interpretation model. Specifically, after the cloud constructs the data interpretation model, the cloud will establish a sub-device model according to the data interpretation model, and at the same time create a MySQL table (the table structure: device ID-channel ID-sub-device model ID) to store the binding relationship. When the target data interpretation model corresponding to the communication device and the data transmission channel is subsequently determined, the corresponding sub-device model can be found according to the communication combination of the communication device and the data transmission channel, and the corresponding data interpretation model can be determined according to the sub-device model.
[0091] Step 304, determine the first parameter group number in the CAN frame data, and determine the second parameter group number in the target data interpretation model; the CAN frame data includes the first parameter group number of the target CAN message, and the target data interpretation model includes the second parameter group number of the corresponding at least one message ID.
[0092] In this embodiment, the CAN frame data includes the first parameter group number of the target CAN message, wherein the first parameter group number is PGN, Parameter Group Number, and PGN is included in the message ID of the target CAN message. In addition, the message ID corresponding to each CAN message in the data interpretation model also includes the parameter group number. After determining the target data interpretation model corresponding to the target sub-device model, the cloud needs to further parse out the first parameter group number of the target CAN message in the CAN frame data, and the second parameter group number of each message ID in the target data interpretation model. It can be understood that since the target data interpretation model may include multiple CAN messages, the target data interpretation model may include second parameter group numbers corresponding to multiple message IDs.
[0093] Step 305: When the first parameter group number matches a target second parameter group number in the second parameter group number, the target CAN message in the CAN frame data is parsed based on the data interpretation rule corresponding to the target second parameter group number in the target data interpretation model to obtain a data parsing result corresponding to the target CAN message.
[0094] After determining the first parameter group number and the second parameter group number, it is necessary to further match the first parameter group number and the second parameter group number. In the case where the first parameter group number matches a target second parameter group number in the second parameter group number, the target CAN message can be parsed based on the target data interpretation model. Specifically, based on the data interpretation rule of the message ID corresponding to the target second parameter group number in the target data interpretation model, the target CAN message in the CAN frame data is parsed to obtain a data parsing result corresponding to the target CAN message.
[0095] On the basis of the above embodiment, the target CAN message includes multiple data. In step 305, based on the data interpretation rule corresponding to the target second parameter group number in the target data interpretation model, the target CAN message in the CAN frame data is parsed to obtain a data parsing result corresponding to the target CAN message, including:
[0096] Step 3051: Determine sub-data corresponding to different information fields in multiple data of the target CAN message based on the target data interpretation rule corresponding to the target second parameter group number in the target data interpretation model.
[0097] In this embodiment, the target CAN message in the CAN frame data includes multiple data. When parsing the target CAN message, firstly, based on the target data interpretation rule corresponding to the target second parameter group number in the target data interpretation model, the sub-data corresponding to different information fields in the multiple data of the target CAN message are determined. Exemplarily, the data included in the target CAN message is AA 00 85 01 00 0055 62, and the target data interpretation rule stipulates that bits 0 to 7 in the data are sub-data corresponding to one information field, and bits 8 to 15 are sub-data corresponding to another information field.
[0098] Step 3052: parse the sub-data corresponding to different information fields based on the target data interpretation rule to obtain information names and data values corresponding to different information fields.
[0099] After determining the sub-data corresponding to different information fields, the sub-data corresponding to different information fields are parsed based on the target data interpretation rules to obtain the information names and data values corresponding to different information fields. Exemplarily, the target data interpretation rules stipulate that the information name of the information field from 0 to 7 is EngAltBearing1Temp, and the calculation rule of the data value is "actual value = original value × a + b", and the information name of the information field from 8 to 15 is EngAltBearing2Temp, and the calculation rule of the data value is "actual value = original value × a + b". According to the calculation rules, the data value corresponding to the information name EngAltBearing1Temp and the data value corresponding to the information name EngAltBearing2Temp can be determined respectively. In addition, after parsing the information name and data value in the target CAN message, the information name and data value can be saved in the corresponding device sub-model. When the user needs to view the data parsing results, the data stored in the corresponding sub-device model can be queried by selecting the CANDTU device and then selecting the data transmission channel. Exemplarily, such as Figure 4 As shown, Figure 4 A schematic diagram of another data processing method provided by an embodiment of the present invention. Figure 4 In the CANDTU device model, users can also create a CANDTU device model corresponding to each CANDTU device in the cloud, store the CAN frame data corresponding to the CANDTU device in the CANDTU device model, and associate the CANDTU device model with the device sub-model according to the data transmission channel. When users need to view the data interpretation results later, they can select different data transmission channels in the CANDTU device model to view the data analysis results corresponding to different data transmission channels. When users view the data analysis results, they are unaware of the data interpretation model and the device sub-model, and all can be completed by the cloud.
[0100] As described above, an embodiment of the present invention provides a data processing method. The embodiment of the present invention pre-binds the communication combination of the communication device and the data transmission channel with the device sub-model, and binds the device sub-model with the data interpretation model. When the CAN frame data needs to be parsed later, the corresponding device sub-model can be determined according to the communication combination, and the corresponding data interpretation model can be determined according to the device sub-model, so as to use the data model to parse the CAN message in the CAN frame data. In the embodiment of the present invention, by pre-setting multiple data interpretation models in the cloud, the CAN frame data uploaded by different communication devices through different data transmission channels are parsed by the data interpretation model. When parsing the CAN frame message, it is not necessary to traverse every line of code in the DBC file, thereby improving the efficiency of parsing the data. In addition, the user can set the data interpretation model in the cloud according to the CAN message to be viewed, so that the cloud only parses the CAN message that the user needs to view, thereby avoiding the user from receiving too much invalid information, reducing the waste of cloud resources, and also improving the user's experience.
[0101] The embodiment of the present invention also provides a data processing device, such as Figure 5 As shown, Figure 5 A schematic diagram of the structure of a data processing device provided in an embodiment of the present invention. The data processing device provided in an embodiment of the present invention includes:
[0102] The data conversion module 401 is used to receive RAW data uploaded by different communication devices through corresponding data transmission channels, and convert the RAW data into CAN frame data.
[0103] The model determination module 402 is used to determine the target data interpretation model corresponding to the communication device and the data transmission channel in the model library. The model library includes multiple data interpretation models, each data interpretation model is pre-associated with at least one communication combination, each data interpretation model includes a data interpretation rule corresponding to at least one CAN message, and the CAN messages parsed by each data interpretation model are different. Each communication combination includes a data transmission channel and a corresponding communication device.
[0104] The data analysis module 403 is used to analyze the target CAN message in the corresponding CAN frame data based on the target data interpretation model to obtain a data analysis result corresponding to the target CAN message.
[0105] Wherein, the model determination module 402 includes:
[0106] The device model determination submodule is used to determine a target sub-device model corresponding to a communication device and a data transmission channel among multiple sub-device models, and each sub-device model is pre-associated with a communication combination.
[0107] The interpretation model determination submodule is used to determine a target data interpretation model corresponding to a target sub-device model in the data interpretation models of the model library, and each data interpretation model is pre-associated with at least one sub-device model.
[0108] Among them, it also includes:
[0109] A file parsing module, used to obtain and parse a DBC file to obtain a message ID and a data interpretation rule corresponding to each CAN message in the DBC file, wherein the DBC file includes multiple CAN messages;
[0110] A message selection module, configured to determine at least one first CAN message in the CAN message in response to a message selection instruction;
[0111] A model generation module, used to generate a data interpretation model corresponding to the DBC file according to a message ID corresponding to each first CAN message and a data interpretation rule;
[0112] The model association module is used to associate the data interpretation model with at least one communication combination in response to the model binding instruction.
[0113] Among them, the message selection module includes:
[0114] The list display submodule is used to convert the message ID and data interpretation rules corresponding to each CAN message in the DBC file into list data of list structure, generate a list according to the list data and send the list to the front end for display;
[0115] A list data determination submodule, for determining at least one target list data in the list in response to the message selection instruction sent by the front end;
[0116] The first message determination submodule is used to determine, in the CAN message, a CAN message corresponding to the target list data as a first CAN message.
[0117] Among them, it also includes:
[0118] A modified model determination module, used to determine a second data interpretation model to be modified in the data interpretation model in response to a model modification instruction;
[0119] The model modification module is used to modify the message ID in the second data interpretation model in response to the message modification instruction, and update the data interpretation rules corresponding to the second data interpretation model according to the modified message ID.
[0120] The CAN frame data includes a first parameter group number of a target CAN message, and the target data interpretation model includes a second parameter group number of at least one corresponding message ID;
[0121] The data analysis module 403 includes:
[0122] A parameter group number determination submodule, used to determine a first parameter group number in the CAN frame data, and determine a second parameter group number in the target data interpretation model;
[0123] The data parsing submodule is used to parse the target CAN message in the CAN frame data based on the data interpretation rule corresponding to the target second parameter group number in the target data interpretation model when the first parameter group number matches a target second parameter group number in the second parameter group number, so as to obtain a data parsing result corresponding to the target CAN message.
[0124] Among them, the target CAN message includes multiple data, and the data parsing submodule includes:
[0125] a field data determination unit, configured to determine sub-data corresponding to different information fields in a plurality of data of a target CAN message based on a target data interpretation rule corresponding to a target second parameter group number in a target data interpretation model;
[0126] The field data parsing unit is used to parse the sub-data corresponding to different information fields based on the target data interpretation rule to obtain the information names and data values corresponding to the different information fields.
[0127] The data processing apparatus provided in the embodiment of the present invention is included in a data processing device and can be used to execute the data processing method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0128] It is worth noting that in the embodiment of the above-mentioned data processing device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0129] This embodiment also provides a data processing device, such as Figure 6 As shown, Figure 6 A schematic diagram of the structure of a data processing device provided in an embodiment of the present invention, wherein the data processing device 50 includes a processor 500 and a memory 501;
[0130] The memory 501 is used to store the computer program 502 and transmit the computer program 502 to the processor 500;
[0131] The processor 500 is used to execute the steps in the above-mentioned data processing method embodiment according to the instructions in the computer program 502.
[0132] Exemplarily, the computer program 502 may be divided into one or more modules / units, one or more modules / units are stored in the memory 501, and are executed by the processor 500 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program 502 in the data processing device 50.
[0133] The data processing device 50 may include, but is not limited to, a processor 500 and a memory 501. Those skilled in the art will appreciate that Figure 6 It is only an example of the data processing device 50 and does not constitute a limitation of the data processing device 50. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the data processing device 50 may also include input and output devices, network access devices, buses, etc.
[0134] The processor 500 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0135] The memory 501 may be an internal storage unit of the data processing device 50, such as a hard disk or memory of the data processing device 50. The memory 501 may also be an external storage device of the data processing device 50, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the data processing device 50. Further, the memory 501 may also include both an internal storage unit of the data processing device 50 and an external storage device. The memory 501 is used to store computer programs and other programs and data required by the data processing device 50. The memory 501 may also be used to temporarily store data that has been output or is to be output.
[0136] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0137] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0138] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0139] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0140] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store computer programs.
[0141] An embodiment of the present invention further provides a storage medium containing computer executable instructions, which are used to execute a data processing method when executed by a computer processor. The method includes the following steps:
[0142] Receive RAW data uploaded by different communication devices through corresponding data transmission channels, and convert the RAW data into CAN frame data;
[0143] Determine a target data interpretation model corresponding to a communication device and a data transmission channel in a model library, wherein the model library includes a plurality of data interpretation models, each data interpretation model is pre-associated with at least one communication combination, each data interpretation model includes a data interpretation rule corresponding to at least one CAN message, and the CAN messages parsed by each data interpretation model are different, and each communication combination includes a data transmission channel and a corresponding communication device;
[0144] The target CAN message in the corresponding CAN frame data is parsed based on the target data interpretation model to obtain a data parsing result corresponding to the target CAN message.
[0145] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the embodiments of the present invention are not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the embodiments of the present invention. Therefore, although the embodiments of the present invention are described in more detail through the above embodiments, the embodiments of the present invention are not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the embodiments of the present invention, and the scope of the embodiments of the present invention is determined by the scope of the appended claims.
Claims
1. A data processing method, characterized in that: The method comprises the following steps: Receive RAW data uploaded by different communication devices through corresponding data transmission channels, and convert the RAW data into CAN frame data; Determine a target data interpretation model corresponding to the communication device and the data transmission channel in a model library, wherein the model library includes a plurality of data interpretation models, each of the data interpretation models is pre-associated with at least one communication combination, each of the data interpretation models includes a data interpretation rule corresponding to at least one CAN message, and the CAN messages parsed by each of the data interpretation models are different, and each of the communication combinations includes one of the data transmission channels and a corresponding communication device; The target CAN message in the corresponding CAN frame data is parsed based on the target data interpretation model to obtain a data parsing result corresponding to the target CAN message.
2. The data processing method according to claim 1, characterized in that: The determining in the model library a target data interpretation model corresponding to the communication device and the data transmission channel comprises: Determine a target sub-device model corresponding to the communication device and the data transmission channel among a plurality of sub-device models, each of the sub-device models being pre-associated with a communication combination; Among the data interpretation models in the model library, a target data interpretation model corresponding to the target sub-device model is determined, and each of the data interpretation models is pre-associated with at least one of the sub-device models.
3. The data processing method according to claim 1, characterized in that: The data interpretation model is obtained in advance by: Obtaining a DBC file and parsing the DBC file to obtain a message ID and a data interpretation rule corresponding to each CAN message in the DBC file, wherein the DBC file includes a plurality of the CAN messages; In response to a message selection instruction, determining at least one first CAN message in the CAN message; Generate a data interpretation model corresponding to the DBC file according to the message ID corresponding to each of the first CAN messages and the data interpretation rule; In response to a model binding instruction, the data interpretation model is associated with at least one of the communication combinations.
4. A data processing method according to claim 3, characterized in that: The step of determining at least one first CAN message in the CAN message in response to the message selection instruction comprises: Convert the message ID and data interpretation rule corresponding to each CAN message in the DBC file into list data of a list structure, generate a list according to the list data and send the list to the front end for display; In response to the message selection instruction sent by the front end, determining at least one target list data in the list; Among the CAN messages, a CAN message corresponding to the target list data is determined as a first CAN message.
5. The data processing method according to claim 3, characterized in that: Also includes: In response to the model modification instruction, determining a second data interpretation model that needs to be modified in the data interpretation model; In response to the message modification instruction, the message ID in the second data interpretation model is modified, and the data interpretation rule corresponding to the second data interpretation model is updated according to the modified message ID.
6. The data processing method according to claim 3, characterized in that: The CAN frame data includes a first parameter group number of the target CAN message, the target data interpretation model includes a second parameter group number of at least one corresponding message ID, and the target CAN message in the CAN frame data is parsed based on the target data interpretation model to obtain a data parsing result corresponding to the target CAN message, including: Determine a first parameter group number in the CAN frame data, and determine a second parameter group number in the target data interpretation model; In the case that the first parameter group number matches a target second parameter group number in the second parameter group number, the target CAN message in the CAN frame data is parsed based on the data interpretation rule corresponding to the target second parameter group number in the target data interpretation model to obtain a data parsing result corresponding to the target CAN message.
7. A data processing method according to any one of claim 6, characterized in that: The target CAN message includes a plurality of data, and the target CAN message in the CAN frame data is parsed based on the data interpretation rule corresponding to the target second parameter group number in the target data interpretation model to obtain a data parsing result corresponding to the target CAN message, including: Determine, based on a target data interpretation rule corresponding to the target second parameter group number in the target data interpretation model, sub-data corresponding to different information fields in a plurality of data of the target CAN message; The sub-data corresponding to different information fields are parsed based on the target data interpretation rule to obtain information names and data values corresponding to different information fields.
8. A data processing device, characterized in that: The device comprises: A data conversion module is used to receive RAW data uploaded by different communication devices through corresponding data transmission channels, and convert the RAW data into CAN frame data; A model determination module, used to determine a target data interpretation model corresponding to the communication device and the data transmission channel in a model library, wherein the model library includes a plurality of data interpretation models, each of which is pre-associated with at least one communication combination, each of which includes a data interpretation rule corresponding to at least one CAN message, and each of which parses a different CAN message, and each of which includes a data transmission channel and a corresponding communication device; The data parsing module is used to parse the target CAN message in the corresponding CAN frame data based on the target data interpretation model to obtain a data parsing result corresponding to the target CAN message.
9. A data processing device, characterized in that: The data processing device includes a processor and a memory; The memory is used to store a computer program and transmit the computer program to the processor; The processor is used to execute a data processing method according to any one of claims 1 to 7 according to the instructions in the computer program.
10. A storage medium storing computer executable instructions, characterized in that: The computer executable instructions are used to execute a data processing method according to any one of claims 1 to 7 when executed by a computer processor.