CN114844741A - CAN bus data storage method and device, electronic equipment and computer readable medium - Google Patents

CAN bus data storage method and device, electronic equipment and computer readable medium Download PDF

Info

Publication number
CN114844741A
CN114844741A CN202210763425.2A CN202210763425A CN114844741A CN 114844741 A CN114844741 A CN 114844741A CN 202210763425 A CN202210763425 A CN 202210763425A CN 114844741 A CN114844741 A CN 114844741A
Authority
CN
China
Prior art keywords
data
bus
target
distributed database
text information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210763425.2A
Other languages
Chinese (zh)
Inventor
刘辉宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhidi Automotive Technology Beijing Co ltd
Original Assignee
Zhidi Automotive Technology Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhidi Automotive Technology Beijing Co ltd filed Critical Zhidi Automotive Technology Beijing Co ltd
Priority to CN202210763425.2A priority Critical patent/CN114844741A/en
Publication of CN114844741A publication Critical patent/CN114844741A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/13File access structures, e.g. distributed indices
    • G06F16/134Distributed indices
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Human Computer Interaction (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the disclosure discloses a CAN bus data storage method, a CAN bus data storage device, an electronic device and a computer readable medium. The method comprises the following steps: acquiring an original bus file, wherein the original bus file comprises bus data and text information corresponding to the bus data; uploading an original bus file to a distributed database; in a distributed database, bus data is analyzed according to text information to obtain at least one target data; for each of the at least one target data, the target data is written to a target table in the distributed database. The embodiment solves the problem of mass CAN bus data storage of users, and the mode of storing data by using the table also enables the users to save time and labor during data query, thereby improving user experience and working efficiency.

Description

CAN bus data storage method and device, electronic equipment and computer readable medium
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a CAN bus data storage method, a CAN bus data storage device, electronic equipment and a computer readable medium.
Background
With the arrival of automobile intelligentization and networking wave, the technologies of automobiles, smart phones, clouds and big data are continuously improved, and the explosive growth of the requirement of vehicle-mounted network data transmission capacity is promoted.
The CAN bus technology in the vehicle network data is still the vehicle bus technology which is most widely applied. Therefore, a large amount of automobile CAN bus data are continuously generated and recorded every day, the CAN bus data are generally directly stored in an ASC or BLF file, the ASC or BLF file occupies a large disk space, and the files need to be read in sequence during data query, so that the data query speed is low; in addition, if CAN bus data needs to be analyzed, the data needs to be manually imported into CAN bus analysis software (such as CANoe), and the importing mode is low in flexibility, slow in importing speed, time-consuming and labor-consuming.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose CAN bus data storage apparatus methods, apparatuses, electronic devices, and computer readable media to solve the technical problems mentioned in the background section above.
In a first aspect, some embodiments of the present disclosure provide a CAN bus data storage method, the method comprising: acquiring an original bus file, wherein the original bus file comprises bus data and text information corresponding to the bus data; uploading the original bus file to a distributed database; in the distributed database, analyzing the bus data according to the text information to obtain at least one target data; for each target data in the at least one target data, writing the target data into a target table in the distributed database.
In a second aspect, some embodiments of the present disclosure provide a CAN bus data storage device, the device comprising: the bus data acquisition unit is configured to acquire an original bus file, wherein the bus data comprises target data and text information corresponding to the bus data; the uploading unit is configured to upload the original bus file to a distributed database; the analysis unit is configured to analyze the bus data according to the text information in the distributed database to obtain at least one target data; and the writing unit is configured to write the target data into a target table in a distributed database for each target data in the at least one target data.
In a third aspect, an embodiment of the present application provides an electronic device, where the network device includes: one or more processors; storage means for storing one or more programs; when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method as described in any implementation of the first aspect.
In a fourth aspect, the present application provides a computer-readable medium, on which a computer program is stored, which, when executed by a processor, implements the method as described in any implementation manner of the first aspect.
One of the above-described various embodiments of the present disclosure has the following advantageous effects: firstly, obtaining an original bus file, then uploading the original bus file to a distributed database, analyzing the bus data in the distributed database according to the text information, and finally writing each target data obtained by analysis into a target table in the distributed database. The storage and analysis of the bus data are completed in the database, so that the problem of mass CAN bus data storage of a user is solved, the user is more time-saving and labor-saving in data query by using a form data storage mode, and the user experience and the working efficiency are improved.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and elements are not necessarily drawn to scale.
FIG. 1 is a schematic diagram of one application scenario of a CAN bus data storage method according to some embodiments of the present disclosure;
fig. 2 is a flow diagram of some embodiments of a CAN bus data storage method according to the present disclosure;
FIG. 3 is a schematic block diagram of some embodiments of a CAN bus data storage device according to the present disclosure;
FIG. 4 is a schematic block diagram of an electronic device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the related invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 is a schematic diagram of one application scenario of a CAN bus data storage method according to some embodiments of the present disclosure.
As shown in fig. 1, first, an execution subject server 101 of the CAN bus data storage method may obtain an original bus file 102, and upload the original bus file 102 to a distributed database. The bus data 104 is then parsed from the text information 103 in the original bus file 102 to obtain the target data 105. Finally, the target data 105 is written into the target table 106.
It is understood that the CAN bus data storage method may be executed by a terminal device, or may also be executed by the server 101, and the execution subject of the method may also include a device formed by integrating the terminal device and the server 101 through a network, or may also be executed by various software programs. The terminal device may be various electronic devices with information processing capability, including but not limited to a smart phone, a tablet computer, an e-book reader, a laptop portable computer, a desktop computer, and the like. The execution body may also be embodied as the server 101, software, or the like. When the execution subject is software, it can be installed in the electronic devices listed above. It may be implemented, for example, as multiple software or software modules to provide distributed services, or as a single software or software module. And is not particularly limited herein.
It should be understood that the number of servers in fig. 1 is merely illustrative. There may be any number of servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of some embodiments of a CAN bus data storage method according to the present disclosure is shown. The CAN bus data storage method comprises the following steps:
step 201, obtaining an original bus file.
In some embodiments, an executing agent (e.g., the server shown in fig. 1) of the CAN bus data storage method may acquire the original bus file through a wired connection manner or a wireless connection manner. It should be noted that the wireless connection means may include, but is not limited to, a 3G/4G connection, a WiFi connection, a bluetooth connection, a WiMAX connection, a Zigbee connection, a uwb (ultra wideband) connection, and other wireless connection means now known or developed in the future.
Here, the original bus file generally refers to a file containing bus data and text information corresponding to the bus data. Here, the bus data generally means data composed of at least one CAN message. The text message corresponding to the bus data generally refers to a message composed of at least one dbc (CAN bus databases) file corresponding to the CAN message. Here, the DBC file is a text file containing information for decoding the original CAN-bus data.
In some optional implementations of some embodiments, the text information may include ID information of the bus data, location information of the bus data, byte information of the bus data, conversion information of the bus data, bus protocol information of the bus data, and/or unit information of the bus data. Specifically, the ID information generally refers to a CAN ID of the current signal packet. The location information generally refers to a location where a CAN signal appears in a CAN message. The byte information generally refers to the byte order of the CAN signal. The conversion information generally refers to the conversion details of the CAN signal. The unit information generally refers to a unit of the CAN signal.
Step 202, uploading the original bus file to a distributed database.
In some embodiments, based on the original bus file obtained in step 201, the execution subject (e.g., the server shown in fig. 1) may upload the original bus file to a distributed database. Here, the Distributed database may be various, and the Distributed database may be, for example, a Distributed File System (HDFS).
Step 203, in the distributed database, analyzing the bus data according to the text information to obtain at least one target data.
In some embodiments, the executing entity may parse the bus data in the distributed database according to the text information to obtain at least one target data. Here, the execution body may parse the bus data using the text information to obtain at least one target data.
In some optional implementations of some embodiments, the execution main body may perform data cleansing on the bus data to obtain cleansing data. Here, the above-mentioned data cleansing generally refers to an operation of deleting duplicated data or unnecessary data. Here, the above-mentioned redundant data is generally defined by a user. As an example, a user may define a timestamp in the bus data as the excess data. Here, the definition of the redundant data is not limited to the above-mentioned one, and is not described herein again.
And converting the cleaning data into target format data according to the bus protocol information. Here, the above target format is generally referred to as a hexadecimal format.
And reading the target format data according to the text information to obtain at least one target data. Here, the target format data includes at least one can information. As an example, the execution agent may read the CAN information in the target format data through a DBC file corresponding to the CAN information.
Step 204, for each target data in the at least one target data, writing the target data into a target table in the distributed database.
In some embodiments, the execution agent may write each target data into a corresponding target table in the distributed database. Here, the target table generally refers to a table of the same data type as the target data. As an example, the type of the target data may be a vehicle speed at a specific time, and the target table may be a correspondence table of time and a vehicle speed.
In some optional implementation manners of some embodiments, the execution subject may determine a data type of the target data according to text information corresponding to the target data. As an example, the execution subject may determine a data type of the target data according to a DBC file corresponding to the target data in the text information.
And determining a target table in the distributed database according to the data type. As an example, the execution main body may search the same table as the target data unit as a target table.
And writing the target data and the text information of the target data into the target table in response to the existence of the target table in the distributed database.
In some optional implementation manners of some embodiments, the execution subject may determine a data type of the target data according to text information corresponding to the target data. And determining a target table in the distributed database according to the data type.
And generating a target table according to the data type of the target data in response to the target table not existing in the distributed database. As an example, when the target data type may be a vehicle speed at a specific time, the execution subject may generate a correspondence table of the vehicle speed with time. Thereafter, the execution body may write the target data and text information of the target data into the target table.
In some optional implementations of some embodiments, in response to detecting a query instruction of the target device, the execution subject may further determine query data in the distributed database according to the query instruction. As an example, the query instruction of the user may be a corresponding relationship between a vehicle speed and fuel consumption, and the execution main body may find data of the vehicle speed and the fuel consumption from the distributed database, and use the found data as query data. Thereafter, the execution agent may send the query data to the target device.
One of the above-described various embodiments of the present disclosure has the following advantageous effects: firstly, obtaining an original bus file, then uploading the original bus file to a distributed database, analyzing the bus data in the distributed database according to the text information, and finally writing each target data obtained by analysis into a target table in the distributed database. The storage and analysis of the bus data are completed in the database, so that the problem of mass CAN bus data storage of a user is solved, meanwhile, a table is used for carrying out a structured data storage mode, the occupied disk space is small, the user CAN directly read the data (without reading files in sequence) during data query, time and labor are saved, and the user experience and the working efficiency are improved.
With further reference to fig. 3, as an implementation of the methods shown in the above figures, the present disclosure provides some embodiments of a CAN bus data storage device, which correspond to those shown in fig. 2, and which may be particularly applicable in various electronic devices.
As shown in fig. 3, the CAN bus data storage device 300 of some embodiments includes: an acquisition unit 301, an upload unit 302, an analysis unit 303, and a write unit 304. The obtaining unit 301 is configured to obtain an original bus file, where the bus data includes target data and text information corresponding to the bus data; the uploading unit 302 is configured to upload the raw bus file into a distributed database; the analyzing unit 303 is configured to analyze the bus data according to the text information in the distributed database to obtain at least one target data; and the writing unit 304 is configured to, for each of the at least one target data, write the target data into a target table in the distributed database.
In an optional implementation manner of some embodiments, the text information includes: ID information of the bus data, position information of the bus data, byte information of the bus data, conversion information of the bus data, bus protocol information of the bus data, and/or unit information of the bus data.
In an optional implementation of some embodiments, the parsing unit is further configured to: performing data cleaning on the bus data to obtain cleaning data; converting the cleaning data into target format data according to the bus protocol information; and reading the target format data according to the text information to obtain at least one target data.
In an optional implementation of some embodiments, the write unit is further configured to: determining the data type of the target data according to the text information corresponding to the target data; determining a target table in the distributed database according to the data type; and writing the target data and the text information of the target data into the target table in response to the existence of the target table in the distributed database.
In an optional implementation of some embodiments, the write unit is further configured to: determining the data type of the target data according to the text information corresponding to the target data; determining a target table in the distributed database according to the data type; responding to the fact that no target table exists in the distributed database, and generating a target table according to the data type of the target data; and writing the target data and the text information of the target data into the target table.
In an optional implementation manner of some embodiments, the apparatus further includes a sending unit configured to: responding to a query instruction of the target device, and determining query data in the distributed database according to the query instruction; and sending the query data to the target equipment.
It will be understood that the units described in the apparatus 300 correspond to the various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 300 and the units included therein, and are not described herein again.
One of the above-described various embodiments of the present disclosure has the following advantageous effects: firstly, obtaining an original bus file, then uploading the original bus file to a distributed database, analyzing the bus data in the distributed database according to the text information, and finally writing each target data obtained by analysis into a target table in the distributed database. The storage and analysis of the bus data are completed in the database, so that the problem of mass CAN bus data storage of a user is solved, meanwhile, a table is used for carrying out a structured data storage mode, the occupied disk space is small, the user CAN directly read the data (without reading files in sequence) during data query, time and labor are saved, and the user experience and the working efficiency are improved.
Referring now to fig. 4, a block diagram of an electronic device (e.g., server in fig. 1) 400 suitable for use in implementing some embodiments of the present disclosure is shown. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage device 408 into a Random Access Memory (RAM) 403. In the RAM 403, various programs and data necessary for the operation of the electronic apparatus 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other through a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Generally, the following devices may be connected to the I/O interface 405: input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 408 including, for example, tape, hard disk, etc.; and a communication device 409. The communication means 409 may allow the electronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates an electronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 4 may represent one device or may represent multiple devices as desired.
In particular, according to some embodiments of the present disclosure, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In some such embodiments, the computer program may be downloaded and installed from a network through the communication device 409, or from the storage device 408, or from the ROM 402. The computer program, when executed by the processing apparatus 401, performs the above-described functions defined in the methods of some embodiments of the present disclosure.
It should be noted that the computer readable medium described above in some embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In some embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring an original bus file, wherein the original bus file comprises bus data and text information corresponding to the bus data; uploading the original bus file to a distributed database; in the distributed database, analyzing the bus data according to the text information to obtain at least one target data; for each target data in the at least one target data, writing the target data into a target table in the distributed database.
Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in some embodiments of the present disclosure may be implemented by software, and may also be implemented by hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, an upload unit, a parsing unit, and a writing unit. Where the names of these units do not in some cases constitute a limitation of the unit itself, for example, a receiving unit may also be described as a "unit to obtain the original bus file".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

Claims (9)

1. A CAN bus data storage method comprises the following steps:
acquiring an original bus file, wherein the original bus file comprises bus data and text information corresponding to the bus data;
uploading the original bus file to a distributed database;
analyzing the bus data in the distributed database according to the text information to obtain at least one target data;
for each of the at least one target data, writing the target data to a target table in the distributed database.
2. The method of claim 1, wherein the textual information comprises:
the bus data comprises ID information of the bus data, position information of the bus data, byte information of the bus data, conversion information of the bus data, bus protocol information of the bus data and/or unit information of the bus data.
3. The method of claim 2, wherein the parsing the bus data according to the text information to obtain at least one target data comprises:
performing data cleaning on the bus data to obtain cleaning data;
converting the cleaning data into target format data according to the bus protocol information;
and reading the target format data according to the text information to obtain at least one target data.
4. The method of claim 2, wherein said writing the target data to a target table in a distributed database comprises:
determining the data type of the target data according to the text information corresponding to the target data;
determining a target table in the distributed database according to the data type;
in response to the target table being present in the distributed database, writing the target data and the text information of the target data to the target table.
5. The method of claim 2, wherein the writing the target data to a target table in a distributed database comprises:
determining the data type of the target data according to the text information corresponding to the target data;
determining a target table in the distributed database according to the data type;
in response to the target table not existing in the distributed database, generating a target table according to the data type of the target data;
and writing the target data and the text information of the target data into the target table.
6. The method of claim 1, wherein the method further comprises:
in response to detecting a query instruction of a target device, determining query data in the distributed database according to the query instruction;
and sending the query data to the target equipment.
7. A CAN bus data storage device comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is configured to acquire an original bus file, and the bus data comprises target data and text information corresponding to the bus data;
an upload unit configured to upload the raw bus file into a distributed database;
the analysis unit is configured to analyze the bus data according to the text information in the distributed database to obtain at least one target data;
a writing unit configured to, for each of the at least one target data, write the target data to a target table in a distributed database.
8. An electronic device, comprising:
one or more processors;
a storage device having one or more programs stored thereon,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.
9. A computer-readable medium, on which a computer program is stored, wherein the program, when executed by a processor, implements the method of any one of claims 1-6.
CN202210763425.2A 2022-07-01 2022-07-01 CAN bus data storage method and device, electronic equipment and computer readable medium Pending CN114844741A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210763425.2A CN114844741A (en) 2022-07-01 2022-07-01 CAN bus data storage method and device, electronic equipment and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210763425.2A CN114844741A (en) 2022-07-01 2022-07-01 CAN bus data storage method and device, electronic equipment and computer readable medium

Publications (1)

Publication Number Publication Date
CN114844741A true CN114844741A (en) 2022-08-02

Family

ID=82574022

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210763425.2A Pending CN114844741A (en) 2022-07-01 2022-07-01 CAN bus data storage method and device, electronic equipment and computer readable medium

Country Status (1)

Country Link
CN (1) CN114844741A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105429833A (en) * 2015-10-21 2016-03-23 中国汽车工程研究院股份有限公司 Method based on CAN bus data storage and system thereof
CN109064582A (en) * 2018-07-04 2018-12-21 北京车和家信息技术有限公司 CAN date storage method, device, server and vehicle
WO2020186081A1 (en) * 2019-03-12 2020-09-17 Intel Corporation Computational data storage systems
CN113568933A (en) * 2021-07-22 2021-10-29 上汽通用五菱汽车股份有限公司 Vehicle data storage method, vehicle and readable storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105429833A (en) * 2015-10-21 2016-03-23 中国汽车工程研究院股份有限公司 Method based on CAN bus data storage and system thereof
CN109064582A (en) * 2018-07-04 2018-12-21 北京车和家信息技术有限公司 CAN date storage method, device, server and vehicle
WO2020186081A1 (en) * 2019-03-12 2020-09-17 Intel Corporation Computational data storage systems
CN113568933A (en) * 2021-07-22 2021-10-29 上汽通用五菱汽车股份有限公司 Vehicle data storage method, vehicle and readable storage medium

Similar Documents

Publication Publication Date Title
CN111581563B (en) Page response method and device, storage medium and electronic equipment
CN111930534A (en) Data calling method and device and electronic equipment
CN110516159B (en) Information recommendation method and device, electronic equipment and storage medium
CN110753089A (en) Method, device, medium and electronic equipment for managing client
CN110909521A (en) Synchronous processing method and device for online document information and electronic equipment
CN111198859A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111950857A (en) Index system management method and device based on service indexes and electronic equipment
CN112015816A (en) Data synchronization method, device, medium and electronic equipment
CN111881216A (en) Data acquisition method and device based on shared template
CN112099982A (en) Collapse information positioning method, device, medium and electronic equipment
CN111857720A (en) Method and device for generating user interface state information, electronic equipment and medium
CN111241137A (en) Data processing method and device, electronic equipment and storage medium
CN112699111B (en) Report generation method and device, electronic equipment and computer readable medium
CN111756953A (en) Video processing method, device, equipment and computer readable medium
CN112732457B (en) Image transmission method, image transmission device, electronic equipment and computer readable medium
CN114860213A (en) Application package generation method, device, equipment and medium
CN114844741A (en) CAN bus data storage method and device, electronic equipment and computer readable medium
CN112100159A (en) Data processing method and device, electronic equipment and computer readable medium
CN112507676A (en) Energy report generation method and device, electronic equipment and computer readable medium
CN112230986A (en) Project file generation method and device, electronic equipment and computer readable medium
CN111581246A (en) Method, device, electronic equipment and computer readable medium for generating data
CN112163176A (en) Data storage method and device, electronic equipment and computer readable medium
CN112100205A (en) Data processing method, device, equipment and computer readable medium
CN112115154A (en) Data processing and data query method, device, equipment and computer readable medium
CN112100211A (en) Data storage method and device, electronic equipment and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20220802