Sensor data analysis method, device and vehicle

By receiving sensor data in the vehicle controller and transmitting its storage address to the parsing function for parsing, the problem of low sensor data parsing efficiency is solved, saving resources and improving driving safety.

CN114115189BActive Publication Date: 2024-08-27AUTOMOTIVE INTELLIGENCE & CONTROL OF CHINA CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111391438.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-23
Publication Date
2024-08-27
Estimated Expiration
2041-11-23

AI Technical Summary

Technical Problem

The parsing efficiency of sensor data in the existing technology is low and resource consumption is high, resulting in limitations in vehicle driving safety and reliability.

Method used

By receiving sensor data in the vehicle controller, copying and storing it in the CAN buffer, obtaining the storage address, and transmitting it to the parsing function in the memory for parsing, multiple copying processes are avoided, resources are saved, and efficiency is improved.

Benefits of technology

It improves the analysis efficiency of sensor data, reduces resource consumption, and enhances the driving safety and reliability of the vehicle.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114115189B
    Figure CN114115189B
Patent Text Reader

Abstract

The embodiments of the present disclosure provide a sensor data parsing method, device and vehicle, which are applied to a controller of a vehicle. The vehicle is provided with a sensor, and the sensor communicates with the controller through a CAN bus. The method comprises: receiving a CAN message transmitted by the sensor based on the CAN bus, wherein the CAN message includes current sensor data collected by the sensor, copying the current sensor data and storing it in a CAN buffer in the controller, obtaining a storage address of the current sensor data, determining a first memory storing a parsing function for parsing the current sensor data, transmitting the storage address of the current sensor data to the first memory, and parsing the current sensor data in the CAN buffer based on the storage address of the current sensor data and the parsing function in the first memory, thereby avoiding the tedious process of multiple copies of the current sensor data, saving resources and improving parsing efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of vehicle control technology, and more particularly to a sensor data analysis method, device, and vehicle. Background Art

[0002] As users pursue vehicle driving safety and reliability, vehicles are usually equipped with various sensors, such as radars, cameras, speed sensors, etc., and how to improve the vehicle's processing efficiency of data collected by sensors has become a problem that needs to be solved urgently.

[0003] In the prior art, after collecting sensor data, the sensor can transmit the sensor data to the controller based on the Controller Area Network (CAN) bus between the sensor and the vehicle's controller, and the controller completes the analysis of the sensor data based on two copies of the sensor data.

[0004] However, sampling the above-mentioned multiple copies of sensor data to implement the analysis of the sensor data may easily lead to technical problems of low analysis efficiency and high resource consumption. Summary of the invention

[0005] The embodiments of the present disclosure provide a sensor data analysis method, device and vehicle to solve the problem of low analysis efficiency.

[0006] In a first aspect, an embodiment of the present disclosure provides a method for analyzing sensor data, which is applied to a controller of a vehicle, wherein the vehicle is provided with a sensor, and the sensor communicates with the controller via a CAN bus, and the method comprises:

[0007] Receiving a CAN message transmitted by the sensor based on the CAN bus, wherein the CAN message includes current sensor data collected by the sensor;

[0008] Copying and storing the current secondary sensor data in a CAN buffer in the controller, and obtaining a storage address of the current secondary sensor data;

[0009] Determine a first memory storing a parsing function for parsing the current sub-sensor data, transfer the storage address of the current sub-sensor data to the first memory, and parse the current sub-sensor data in the CAN buffer based on the storage address of the current sub-sensor data and the parsing function in the first memory.

[0010] In some embodiments, copying and storing the current sensor data in a CAN buffer in the controller includes:

[0011] Acquire data structure information of the current sensor data;

[0012] Based on the data structure information, at least part of the valid current sensor data is copied from the current sensor data, and the at least part of the valid current sensor data is stored in the CAN buffer in the controller, wherein the at least part of the valid current sensor data refers to data that can be parsed by the parsing function.

[0013] In some embodiments, the data structure information includes a byte attribute, and the byte attribute is used to characterize the meaning of the current secondary sensor data in the byte; and copying at least part of the valid current secondary sensor data from the current secondary sensor data based on the data structure information comprises:

[0014] Determine valid bytes for storing the current secondary sensor data according to the byte attributes, the valid bytes being bytes for storing data that can be parsed by the parsing function, and obtain the at least part of the valid current secondary sensor data by copying based on the valid bytes.

[0015] In some embodiments, copying and storing the current sensor data in a CAN buffer in the controller includes:

[0016] Obtain the identifier of the CAN bus, and determine the identifier of the second memory corresponding to the identifier of the CAN bus according to a preset mapping relationship, and store the current sensor data in the second memory in the CAN buffer, wherein the mapping relationship is used to characterize the correspondence between the identifier of the CAN bus and the memory identifier.

[0017] In some embodiments, after receiving the CAN message transmitted by the sensor based on the CAN bus, the method further includes:

[0018] Acquire the remaining buffer space of the CAN buffer, and if the remaining buffer space is less than a preset space threshold, determine a parsing function for parsing the current sensor data, and determine a first memory for storing the parsing function;

[0019] The current secondary sensor data is transmitted to the first memory, so as to call the parsing function to parse the current secondary sensor data in the first memory;

[0020] And, copying and storing the current sensor data in the CAN buffer in the controller includes: if the remaining space is not less than the space threshold, copying and storing the current sensor data in the CAN buffer in the controller.

[0021] In some embodiments, after the storage address of the current secondary sensor data is transmitted to the first memory, the method further includes:

[0022] Acquire the previous sensor data, and store the sensor data that is different between the current sensor data and the previous sensor data into the first memory;

[0023] If the parsing of the sensor data that is different from the previous sensor data based on the parsing function fails, the current sensor data in the CAN buffer is parsed according to the storage address of the current sensor data.

[0024] In a second aspect, an embodiment of the present disclosure provides a sensor data analysis device, which is applied to a controller of a vehicle, wherein the vehicle is provided with a sensor, and the sensor communicates with the controller via a CAN bus, and the device comprises:

[0025] A receiving unit, configured to receive a CAN message transmitted by the sensor based on the CAN bus, wherein the CAN message includes current sensor data collected by the sensor;

[0026] A first storage unit, used for copying and storing the current sensor data in a CAN buffer in the controller;

[0027] A first acquisition unit, used to acquire the storage address of the current secondary sensor data;

[0028] A determining unit, configured to determine a first memory storing a parsing function for parsing the current sensor data;

[0029] A transmission unit, used for transmitting the storage address of the current secondary sensor data to the first memory;

[0030] The first parsing unit is used to parse the current secondary sensor data in the CAN buffer based on the storage address of the current secondary sensor data and the parsing function in the first memory.

[0031] In some embodiments, the first storage unit includes:

[0032] A first acquisition subunit, used to acquire data structure information of the current secondary sensor data;

[0033] a copy subunit, configured to copy at least a portion of the valid current secondary sensor data from the current secondary sensor data based on the data structure information;

[0034] The first storage subunit is used to store the at least part of the valid current sensor data in a CAN buffer in the controller, wherein the at least part of the valid current sensor data refers to data that can be parsed by the parsing function.

[0035] In some embodiments, the data structure information includes byte attributes, and the byte attributes are used to characterize the meaning of the current sensor data in the bytes; the replication subunit is used to determine the valid bytes used to store the current sensor data based on the byte attributes, and the valid bytes are bytes for storing data that can be parsed by the parsing function, and to obtain at least part of the valid current sensor data based on the valid bytes.

[0036] In some embodiments, the first storage unit includes:

[0037] A second acquisition subunit, used to acquire the identifier of the CAN bus;

[0038] A determination subunit, configured to determine an identifier of a second memory corresponding to an identifier of the CAN bus according to a preset mapping relationship;

[0039] The second storage subunit is used to store the current secondary sensor data in a second memory in the CAN buffer, wherein the mapping relationship is used to characterize the corresponding relationship between the identifier of the CAN bus and the memory identifier.

[0040] In some embodiments, the first acquisition unit is used to acquire the remaining buffer space of the CAN buffer;

[0041] The determining unit is used to determine, if the remaining buffer space is less than a preset space threshold, an analysis function for analyzing the current sensor data, and determine a first memory for storing the analysis function;

[0042] The transmission unit is used to transmit the current secondary sensor data to the first memory, so as to parse the current secondary sensor data in the first memory based on the first parsing unit calling the parsing function;

[0043] Furthermore, the first storage unit is used to copy and store the current sensor data in a CAN buffer in the controller if the remaining space is not less than the space threshold.

[0044] In some embodiments, the apparatus further comprises:

[0045] A second acquisition unit, used for acquiring previous sensor data;

[0046] A second storage unit, used for storing sensor data different from the current sensor data and the previous sensor data into the first memory;

[0047] The second parsing unit is configured to parse the current sensor data in the CAN buffer according to the storage address of the current sensor data if the parsing of the sensor data different from the previous sensor data based on the parsing function fails.

[0048] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a memory, a processor;

[0049] Memory; Memory for storing instructions executable by the processor;

[0050] The processor is configured to execute the method as described in the first aspect.

[0051] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the method described in the first aspect.

[0052] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which implements the method according to the first aspect when executed by a processor.

[0053] In a sixth aspect, an embodiment of the present disclosure provides a vehicle, on which a sensor and a controller are provided, wherein the sensor communicates with the controller via a CAN bus, and the controller includes the device as described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0055] Figure 1 is a schematic diagram of a method for analyzing sensor data according to an embodiment of the present disclosure;

[0056] Figure 2 A schematic diagram of a sensor data parsing method according to another embodiment of the present disclosure;

[0057] Figure 3 A schematic diagram of a sensor data parsing method according to another embodiment of the present disclosure;

[0058] Figure 4 It is a schematic diagram of the principle of sensor data transmission according to an embodiment of the present disclosure;

[0059] Figure 5 is a schematic diagram of a sensor data parsing device according to an embodiment of the present disclosure;

[0060] Figure 6 A schematic diagram of a sensor data analysis device according to another embodiment of the present disclosure;

[0061] Figure 7 The present invention is a block diagram of an electronic device for implementing a sensor data parsing method according to an embodiment of the present disclosure.

[0062] The above drawings show clear embodiments of the present disclosure, which will be described in more detail below. These drawings and text descriptions are not intended to limit the scope of the present disclosure in any way, but to illustrate the concepts of the present disclosure to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0063] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.

[0064] In order to improve the safety and reliability of vehicle driving, the performance of the vehicle can generally be improved from two different dimensions. One dimension is the hardware performance dimension of the vehicle, such as improvements to the vehicle's braking system, and the other dimension is the software performance dimension of the vehicle, such as strengthening the vehicle's information processing capabilities. Of course, there is a certain correlation between the two.

[0065] In some embodiments, sensors may be provided on the vehicle to collect data related to vehicle driving, obtain sensor data, and combine the sensor data to improve the safety and reliability of the vehicle driving.

[0066] For example, the sensor may be a radar, a camera, a speed sensor, a displacement sensor, a positioning system, etc. Among them, the radar can collect environmental data related to the driving environment of the vehicle; the camera can collect images of the driving environment of the vehicle so as to identify obstacles based on the images (such as traffic lights, etc.); the speed sensor can collect the speed of the vehicle; the displacement sensor can collect the driving distance of the vehicle; the positioning system can determine the current location information of the vehicle, etc., which are not listed here one by one.

[0067] Typically, a controller is provided in the vehicle, and the controller communicates with the sensor via the CAN bus. The sensor transmits the sensor data it collects to the controller via the CAN bus. The controller analyzes the sensor data, obtains the analysis result, and controls the vehicle's driving according to the analysis result.

[0068] For example, radar (a type of sensor) collects environment-related data (i.e., sensor data) in the vehicle's driving environment. The radar transmits the environment-related data to the controller through the CAN bus. The controller parses the environment-related data to obtain parsing results, such as obstacle information (such as other vehicles, pedestrians, signs, etc.), and controls the vehicle's driving according to the obstacle information, such as changing the vehicle's driving strategy. For example, when it is determined based on the obstacle information that there are other vehicles ahead, the vehicle is controlled to slow down. When it is determined based on the obstacle information that the section of the vehicle is a speed limit section, the vehicle is controlled to drive based on the speed limit information, and so on. They are not listed one by one here.

[0069] In the related art, in order to parse the sensor data, the controller usually needs to copy the sensor twice, such as first copying the sensor data from the CAN buffer to the CAN data conversion area, and then copying the sensor data to the cache area of ​​the parsing function used to parse the sensor data.

[0070] However, the analysis method in the above-mentioned related technology requires multiple replications, resulting in a long analysis time and low efficiency.

[0071] In order to avoid at least one of the above-mentioned technical problems, the inventors of the present disclosure, through creative work, obtained the inventive concept of the present disclosure: the sensor data is copied once, and the address of the sensor data stored in the copy is transmitted to the memory storing the parsing function, so that the parsing function parses the stored sensor data based on the address.

[0072] The technical solution of the present invention and how the technical solution of the present invention solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0073] See also Figure 1 , Figure 1 It is a schematic diagram of a method for analyzing sensor data according to an embodiment of the present disclosure.

[0074] The method is applied to a vehicle controller, the vehicle is provided with a sensor, and the sensor communicates with the controller via a CAN bus, such as Figure 1 As shown, the method includes:

[0075] S101: receiving a CAN message transmitted by a sensor based on a CAN bus, wherein the CAN message includes current sensor data collected by the sensor.

[0076] It is understood that the collection, transmission and acquisition of sensor data are real-time or performed at intervals so as to reliably acquire and utilize information related to the driving environment during the vehicle's driving process. Therefore, the "current time" in the current sensor data in this embodiment is used to distinguish it from the previous sensor data in the following text, and cannot be understood as a limitation on the sensor data.

[0077] Based on the above analysis, it can be seen that the data collected by different sensors are different. For example, if the sensor is a radar, the sensor data is the data collected by the radar; if the sensor is a camera, the sensor data is the data collected by the camera, and so on.

[0078] Correspondingly, in this embodiment, if the sensor is a radar, the radar can generate a CAN message based on the data currently collected by the radar, and the CAN message carries the data currently collected by the radar, so as to transmit the data currently collected by the radar to the controller based on the CAN message.

[0079] S102: copy and store the current secondary sensor data in the CAN buffer in the controller, and obtain the storage address of the current secondary sensor data.

[0080] For example, the CAN buffer includes multiple storage spaces (i.e., memories), and different storage spaces have different storage addresses. In this embodiment, the controller can copy and store the current sensor data in any memory of the CAN buffer, and obtain the storage address of the memory used to store the current sensor data.

[0081] S103: Determine a first memory storing a parsing function for parsing current sensor data, and transmit a storage address of the current sensor data to the first memory.

[0082] In this embodiment, the controller does not need to copy the current sensor data to the first memory, but can transmit the storage address of the current sensor data to the first memory to avoid the disadvantage of wasting resources due to re-copying, save resources and improve efficiency.

[0083] S104: parsing the current secondary sensor data in the CAN buffer based on the storage address of the current secondary sensor data and the parsing function in the first memory.

[0084] For example, based on the storage address of the current sensor data, the current sensor data is retrieved, and the current sensor data is parsed based on the parsing function.

[0085] Based on the above analysis, it can be known that an embodiment of the present disclosure provides a method for parsing sensor data, which is applied to a controller of a vehicle. A sensor is provided on the vehicle, and the sensor communicates with the controller through a CAN bus. The method includes: receiving a CAN message transmitted by the sensor based on the CAN bus, the CAN message including current sensor data collected by the sensor, copying and storing the current sensor data in a CAN buffer in the controller, and obtaining a storage address of the current sensor data, determining a first memory storing a parsing function for parsing the current sensor data, transmitting the storage address of the current sensor data to the first memory, and parsing the current sensor data in the CAN buffer based on the storage address of the current sensor data and the parsing function in the first memory. In this embodiment, the following is introduced: copying and storing the current sensor data in the CAN buffer in the controller, and obtaining the storage address of the current sensor data, so as to parse the current sensor data based on the storage address of the current sensor data, thereby avoiding the tedious process of multiple copies of the current sensor data and achieving the technical effect of saving resources and improving efficiency.

[0086] See also Figure 2 , Figure 2 It is a schematic diagram of a sensor data parsing method according to another embodiment of the present disclosure.

[0087] The method is applied to a vehicle controller, the vehicle is provided with a sensor, and the sensor communicates with the controller via a CAN bus, such as Figure 2 As shown, the method includes:

[0088] S201: receiving a CAN message transmitted by a sensor based on a CAN bus, wherein the CAN message includes current sensor data collected by the sensor.

[0089] It should be noted that the technical features and technical principles in this embodiment that are the same as those in the above embodiments are not repeated in this embodiment.

[0090] S202: Acquire data structure information of current sensor data.

[0091] S203: copy at least part of the valid current sensor data from the current sensor data based on the data structure information, and store at least part of the valid current sensor data in the CAN buffer of the controller, wherein at least part of the valid current sensor data refers to data that can be parsed by the parsing function.

[0092] The data structure information refers to the relevant information of the storage structure of the current sensor data in the CAN message, such as the storage field of the current sensor data, the byte of the current sensor data, etc.

[0093] Exemplarily, the current sensor data has a total of sixteen bytes, and the valid bytes are fourteen or twelve. The fourteen-byte or twelve-byte sensor data are stored in the CAN buffer to reduce the storage space used to store the current sensor data. Since the stored portion of the current sensor data is data that can be parsed by the parsing function, the reliability and effectiveness of the data parsing can be ensured, and the invalid parts are filtered out, thereby improving the efficiency and accuracy of the parsing.

[0094] In some embodiments, the data structure information includes byte attributes, and the node attributes are used to characterize the meaning of the previous sensor data in the bytes; S203 may include: determining the valid bytes used to store the current sensor data according to the byte attributes, the valid bytes are bytes for storing data that can be parsed by the parsing function, and obtaining at least part of the valid current sensor data based on the valid bytes.

[0095] Combined with the above analysis, for each byte, there is a corresponding byte attribute to determine the meaning of the previous sensor data in the byte, and based on the meaning, determine whether the byte is a valid byte, and then determine whether the current sensor data in the byte is valid data, thereby achieving effective replication and improving the reliability of analysis and targeted technical effects.

[0096] S204: Obtain storage addresses of at least part of the valid current sensor data.

[0097] S205: Determine a first memory storing a parsing function for parsing at least a portion of the valid current sensor data, and transmit a storage address of at least a portion of the valid current sensor data to the first memory.

[0098] S104: Parse at least a portion of the valid current sensor data in the CAN buffer based on the storage address of at least a portion of the valid current sensor data and the parsing function in the first memory.

[0099] See also Figure 3 , Figure 3 It is a schematic diagram of a sensor data parsing method according to another embodiment of the present disclosure.

[0100] The method is applied to a vehicle controller, the vehicle is provided with a sensor, and the sensor communicates with the controller via a CAN bus, such as Figure 3 As shown, the method includes:

[0101] S301: receiving a CAN message transmitted by a sensor based on a CAN bus, wherein the CAN message includes current sensor data collected by the sensor.

[0102] Similarly, regarding the technical features and technical principles in this embodiment that are the same as those in the above embodiments, this embodiment will not be repeated.

[0103] S302: copy and store the current secondary sensor data in the CAN buffer in the controller, and obtain the storage address of the current secondary sensor data.

[0104] In some embodiments, copying and storing the current sensor data in a CAN buffer in the controller may include the following steps:

[0105] The first step: Get the CAN bus identifier.

[0106] The second step: determining the identifier of the second memory corresponding to the identifier of the CAN bus according to a preset mapping relationship, wherein the mapping relationship is used to characterize the corresponding relationship between the identifier of the CAN bus and the identifier of the memory.

[0107] The third step: storing the current sensor data in the second memory in the CAN buffer.

[0108] Based on the above analysis, it can be seen that different sensors can be installed on the vehicle, such as radar, camera, speed sensor, etc., and each sensor collects corresponding sensor data.

[0109] In this embodiment, sensor data collected by different sensors are transmitted through different CAN buses, and different memories are allocated to different sensors in the CAN buffer to store different sensor data.

[0110] For example, Figure 4 As shown:

[0111] The sensors include sensor 1 to sensor N (N is a positive integer greater than or equal to 1). Each sensor communicates with the controller through its corresponding CAN bus, such as sensor 1 communicates with the controller through CAN bus 1, until sensor N communicates with the controller through CAN bus N. The CAN buffer includes N memories to store different sensor data.

[0112] For example, when sensor 1 transmits sensor data 1 to the controller through CAN bus 1, the controller can obtain the identifier of CAN bus 1 (assuming it is identifier 1), and the controller determines that the identifier 1 corresponds to the identifier of the memory in the CAN buffer as identifier a (it can also be marked with the same identifier, which is not limited in this embodiment) based on the mapping relationship, and copies the sensor data 1 and stores it in the memory identified as a.

[0113] By analogy, when sensor N transmits sensor data N to the controller through CAN bus N, the controller can obtain the identifier of CAN bus N (assuming it is identifier N), and the controller determines that the identifier N corresponds to the identifier of the memory in the CAN buffer as identifier x (it can also be marked with the same identifier, which is not limited in this embodiment) based on the mapping relationship, and copies the sensor data N to store it in the memory identified as x.

[0114] Based on the above analysis, the sensor 1 can be a radar, or a camera, etc.

[0115] It is worth noting that, in this embodiment, by distinguishing the memory in the CAN bus and the CAN buffer by combining the identifier to store different types of sensor data separately, mutual interference between the sensor data can be avoided, thereby improving the technical effect of the effectiveness and reliability of the analysis.

[0116] S303: Determine a first memory storing a parsing function for parsing current sensor data.

[0117] S304: Acquire the previous sensor data, and store the sensor data that is different between the current sensor data and the previous sensor data into the first memory.

[0118] For example, the CAN buffer can retain multiple sensor data, such as retaining the previous sensor data, that is, when the sensor data at the current moment (such as the current sensor data in the present embodiment) is acquired, the CAN buffer also stores the sensor data at the moment before the current moment (such as the previous sensor data in the present embodiment), and then the sensor data at the current moment can be compared with the sensor data at the previous moment to obtain different data of the sensor data at the current moment relative to the sensor data at the previous moment, that is, the current sensor data is compared with the previous sensor data to obtain sensor data that is different from the current sensor data and the previous sensor data.

[0119] S305: If the analysis of the sensor data that is different from the previous sensor data based on the analysis function fails, the current sensor data in the CAN buffer is analyzed according to the storage address of the current sensor data.

[0120] When the sensor data is parsed based on the parsing function, there may be two results, one result is a successful parsing, and the other result is a parsing failure.

[0121] In this embodiment, the parsing function does not need to parse the entire amount of sensor data (current sensor data), which can save parsing resources and improve parsing efficiency. When the parsing fails, the current sensor data can be parsed based on the storage address of the current sensor data, so that the parsing is flexible and secure, thereby improving the technical effect of the reliability of the parsing.

[0122] In other embodiments, after receiving a CAN message transmitted by the sensor based on the CAN bus, the remaining buffer space of the CAN buffer can be obtained. If the remaining buffer space is less than a preset space threshold, a parsing function for parsing the current sensor data is determined, and a first memory for storing the parsing function is determined. The current sensor data is transmitted to the first memory to call the parsing function to parse the current sensor data in the first memory, and if the remaining space is not less than the space threshold, the current sensor data is copied and stored in the CAN buffer in the controller.

[0123] The space threshold may be determined based on demand, historical records, and experiments, and is not limited in this embodiment.

[0124] That is to say, in some embodiments, the transmission and storage of the current sensor data can be flexibly determined in combination with the remaining buffer space of the CAN buffer. For example, when the remaining buffer space of the CAN buffer is small (i.e., the remaining buffer space is less than the space threshold), the current sensor data is copied and stored in the first memory to avoid the loss of the current sensor data, improve the rational use and allocation of resources, and thus improve the technical effect of improving the accuracy and reliability of the analysis.

[0125] According to another aspect of an embodiment of the present disclosure, an embodiment of the present disclosure provides a sensor data analysis device, which is applied to a controller of a vehicle, wherein the vehicle is provided with a sensor, and the sensor communicates with the controller via a CAN bus.

[0126] like Figure 5 As shown, the device 500 includes:

[0127] The receiving unit 501 is configured to receive a CAN message transmitted by the sensor based on the CAN bus, wherein the CAN message includes current sensor data collected by the sensor.

[0128] The first storage unit 502 is used to copy and store the current sensor data in a CAN buffer in the controller.

[0129] The first acquisition unit 503 is used to acquire the storage address of the current sensor data.

[0130] The determining unit 504 is configured to determine a first memory storing a parsing function for parsing the current sensor data.

[0131] The transmission unit 505 is used to transmit the storage address of the current sensor data to the first memory.

[0132] The first parsing unit 506 is configured to parse the current secondary sensor data in the CAN buffer based on the storage address of the current secondary sensor data and the parsing function in the first memory.

[0133] Figure 6 This is a schematic diagram of a sensor data analysis device according to another embodiment of the present disclosure, wherein the sensor data analysis device is applied to a controller of a vehicle, the vehicle is provided with a sensor, and the sensor communicates with the controller via a CAN bus.

[0134] like Figure 6 As shown, the device 600 includes:

[0135] The receiving unit 601 is configured to receive a CAN message transmitted by the sensor based on the CAN bus, wherein the CAN message includes current sensor data collected by the sensor.

[0136] The first storage unit 602 is used to copy and store the current sensor data in a CAN buffer in the controller.

[0137] Combination Figure 6 It can be seen that, in some embodiments, the first storage unit 602 includes:

[0138] The first acquisition subunit 6021 is used to acquire data structure information of the current sensor data.

[0139] The copy subunit 6022 is used to copy at least part of the valid current secondary sensor data from the current secondary sensor data based on the data structure information.

[0140] In some embodiments, the data structure information includes byte attributes, and the byte attributes are used to characterize the meaning of the current sensor data in the bytes; the replication subunit 6022 is used to determine the valid bytes used to store the current sensor data based on the byte attributes, and the valid bytes are bytes for storing data that can be parsed by the parsing function, and to obtain at least part of the valid current sensor data based on the valid bytes.

[0141] The first storage subunit 6023 is used to store the at least part of the valid current sensor data in a CAN buffer in the controller, wherein the at least part of the valid current sensor data refers to data that can be parsed by the parsing function.

[0142] Combination Figure 6 It can be seen that in some other embodiments, the first storage subunit 602 includes:

[0143] The second acquisition subunit 6024 is used to acquire the identifier of the CAN bus.

[0144] The determination subunit 6025 is used to determine the identifier of the second memory corresponding to the identifier of the CAN bus according to a preset mapping relationship.

[0145] The second storage subunit 6026 is used to store the current secondary sensor data in the second memory in the CAN buffer, wherein the mapping relationship is used to characterize the corresponding relationship between the identifier of the CAN bus and the memory identifier.

[0146] The first acquisition unit 603 is used to acquire the storage address of the current sensor data.

[0147] The determining unit 604 is configured to determine a first memory storing a parsing function for parsing the current sensor data.

[0148] The transmission unit 605 is used to transmit the storage address of the current sensor data to the first memory.

[0149] The first parsing unit 606 is configured to parse the current secondary sensor data in the CAN buffer based on the storage address of the current secondary sensor data and the parsing function in the first memory.

[0150] In some other embodiments, the first acquisition unit 603 is used to acquire the remaining buffer space of the CAN buffer;

[0151] The determining unit 604 is configured to, if the remaining buffer space is less than a preset space threshold, determine an analysis function for analyzing the current sensor data, and determine a first memory for storing the analysis function;

[0152] The transmission unit 605 is used to transmit the current secondary sensor data to the first memory, so as to parse the current secondary sensor data in the first memory based on the first parsing unit calling the parsing function;

[0153] Furthermore, the first storage unit 602 is used to copy and store the current sensor data in the CAN buffer in the controller if the remaining space is not less than the space threshold.

[0154] Combination Figure 6 It can be seen that in some other embodiments, the device further includes:

[0155] The second acquisition unit 607 is used to acquire the previous sensor data.

[0156] The second storage unit 608 is used to store the sensor data that is different from the previous sensor data into the first memory.

[0157] The second parsing unit 609 is configured to parse the current sensor data in the CAN buffer according to the storage address of the current sensor data if the parsing of the sensor data different from the previous sensor data based on the parsing function fails.

[0158] According to another aspect of the embodiment of the present disclosure, the embodiment of the present disclosure further provides a vehicle, wherein a sensor and a controller are provided on the vehicle, wherein the sensor communicates with the controller via a CAN bus, wherein:

[0159] The sensor is used to collect current sensor data and transmit the current sensor data to the controller according to the CAN bus;

[0160] The controller includes the device as described in any of the above embodiments.

[0161] In some embodiments, the controller analyzes the current sensor data to obtain an analysis result, and controls the driving of the vehicle according to the analysis result.

[0162] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device and a readable storage medium.

[0163] According to an embodiment of the present disclosure, the present disclosure also provides a computer program product, which includes: a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, and at least one processor executes the computer program so that the electronic device executes the solution provided by any of the above embodiments.

[0164] like Figure 7, is a block diagram of an electronic device according to a method for parsing sensor data of an embodiment of the present disclosure. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0165] like Figure 7 As shown, the electronic device includes: one or more processors 701, a memory 702, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the electronic device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In other embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple electronic devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 7 A processor 701 is taken as an example.

[0166] The memory 702 is a non-transitory computer-readable storage medium provided by the present disclosure. The memory stores instructions executable by at least one processor to enable the at least one processor to perform the sensor data parsing method provided by the present disclosure. The non-transitory computer-readable storage medium of the present disclosure stores computer instructions, which are used to enable a computer to perform the sensor data parsing method provided by the present disclosure.

[0167] The memory 702 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the sensor data parsing method in the embodiment of the present disclosure. The processor 701 executes various functional applications and data processing of the server by running the non-transient software programs, instructions and modules stored in the memory 702, that is, implements the sensor data parsing method in the above method embodiment.

[0168] The memory 702 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of an electronic device according to the sensor data parsing method, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory 702 may optionally include a memory remotely arranged relative to the processor 701, and these remote memories may be connected to the electronic device of the sensor data parsing method via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0169] The electronic device of the sensor data analysis method may further include: an input device 703 and an output device 704. The processor 701, the memory 702, the input device 703 and the output device 704 may be connected via a bus or other means. Figure 7 The example of connecting through bus is taken in the following.

[0170] The input device 703 can receive input digital or character information, and generate key signal input related to user settings and function control of the electronic device of the sensor data analysis method, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator rod, one or more mouse buttons, a trackball, a joystick and other input devices. The output device 704 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The display device may include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display and a plasma display. In some embodiments, the display device may be a touch screen.

[0171] Various implementations of the systems and techniques described herein can be realized in digital electronic circuit systems, integrated circuit systems, dedicated ASICs (application specific integrated circuits), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0172] These computer programs (also referred to as programs, software, software applications, or code) include machine instructions for programmable processors and can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or means (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0173] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0174] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0175] A computer system may include clients and servers. Clients and servers are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship to each other.

[0176] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0177] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A sensor data analysis method, applied to a vehicle controller, wherein the vehicle is provided with a sensor, and the sensor communicates with the controller via a CAN bus, the method comprising: Receiving a CAN message transmitted by the sensor based on the CAN bus, wherein the CAN message includes current sensor data collected by the sensor; wherein the collection, transmission, and acquisition of the sensor data are performed in real time or at intervals; Copying and storing the current secondary sensor data in a CAN buffer in the controller, and obtaining a storage address of the current secondary sensor data; Determine a first memory storing a parsing function for parsing the current sub-sensor data, transmit the storage address of the current sub-sensor data to the first memory, and parse the current sub-sensor data in the CAN buffer based on the storage address of the current sub-sensor data and the parsing function in the first memory.

2. The method according to claim 1, wherein: The current secondary sensor data is copied and stored in a CAN buffer in the controller, including: Acquire data structure information of the current sensor data; Based on the data structure information, at least part of the valid current sensor data is copied from the current sensor data, and the at least part of the valid current sensor data is stored in the CAN buffer in the controller, wherein the at least part of the valid current sensor data refers to data that can be parsed by the parsing function.

3. The method according to claim 2, wherein: The data structure information includes byte attributes, and the byte attributes are used to represent the meaning of the current sensor data in the byte; Copying at least part of the valid current secondary sensor data from the current secondary sensor data based on the data structure information includes: Determine valid bytes for storing the current secondary sensor data according to the byte attributes, the valid bytes being bytes for storing data that can be parsed by the parsing function, and obtain the at least part of the valid current secondary sensor data by copying based on the valid bytes.

4. The method according to claim 1, wherein: The current secondary sensor data is copied and stored in a CAN buffer in the controller, including: Obtain the identifier of the CAN bus, and determine the identifier of the second memory corresponding to the identifier of the CAN bus according to a preset mapping relationship, and store the current sensor data in the second memory in the CAN buffer, wherein the mapping relationship is used to characterize the correspondence between the identifier of the CAN bus and the memory identifier.

5. The method according to any one of claims 1 to 4, after receiving the CAN message transmitted by the sensor based on the CAN bus, further comprising: Acquire the remaining buffer space of the CAN buffer, and if the remaining buffer space is less than a preset space threshold, determine a parsing function for parsing the current sensor data, and determine a first memory for storing the parsing function; The current secondary sensor data is transmitted to the first memory, so as to call the parsing function to parse the current secondary sensor data in the first memory; And, copying and storing the current sensor data in the CAN buffer in the controller includes: if the remaining buffer space is not less than the space threshold, copying and storing the current sensor data in the CAN buffer in the controller.

6. The method according to any one of claims 1 to 4, after transmitting the storage address of the current sensor data to the first memory, further comprising: Acquire the previous sensor data, and store the sensor data that is different between the current sensor data and the previous sensor data into the first memory; If the parsing of the sensor data that is different from the previous sensor data based on the parsing function fails, the current sensor data in the CAN buffer is parsed according to the storage address of the current sensor data.

7. A sensor data analysis device, applied to a vehicle controller, wherein the vehicle is provided with a sensor, the sensor communicates with the controller via a CAN bus, and the device comprises: A receiving unit, configured to receive a CAN message transmitted by the sensor based on the CAN bus, wherein the CAN message includes the current sensor data collected by the sensor; wherein the collection, transmission and acquisition of the sensor data are performed in real time or at intervals; A first storage unit, used for copying and storing the current sensor data in a CAN buffer in the controller; A first acquisition unit, used to acquire the storage address of the current secondary sensor data; A determining unit, configured to determine a first memory storing a parsing function for parsing the current sensor data; A transmission unit, used for transmitting the storage address of the current secondary sensor data to the first memory; The first parsing unit is used to parse the current secondary sensor data in the CAN buffer based on the storage address of the current secondary sensor data and the parsing function in the first memory.

8. An electronic device comprising: Memory, processor; A memory, configured to store instructions executable by the processor; The processor is configured to execute the method as claimed in any one of claims 1 to 6.

9. A computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, wherein the computer-executable instructions are used to implement the method according to any one of claims 1 to 6 when executed by a processor.

10. A vehicle, wherein a sensor and a controller are provided on the vehicle, wherein the sensor communicates with the controller via a CAN bus, and the controller comprises the device according to claim 7.

11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method described in any one of claims 1 to 6 is implemented.