Search

CN-121979884-A - Vehicle data query method and device, computer readable medium and electronic equipment

CN121979884ACN 121979884 ACN121979884 ACN 121979884ACN-121979884-A

Abstract

The disclosure provides a vehicle data query method, a vehicle data query device, a computer readable medium and electronic equipment, and relates to the technical field of Internet of vehicles big data. The method comprises the steps of receiving a query request, querying target index metadata containing keywords in a pre-built index database based on keywords contained in the query request, accessing corresponding positions in a distributed file system according to a data volume storage path in the target index metadata, reading corresponding target data volumes, and assembling and returning one or more read target data volumes. The method and the device effectively decouple lightweight index inquiry from distributed data volume access, convert time-consuming full-quantity data scanning into efficient index searching and accurate data positioning, improve the inquiry efficiency in historical data, and improve the performance more particularly in historical data inquiry in a larger time range.

Inventors

  • TAN BAOJUN
  • LI GUANGMENG
  • MA WENCHUANG
  • WU GANG

Assignees

  • 普科未来(北京)智能科技有限公司

Dates

Publication Date
20260505
Application Date
20260106

Claims (10)

  1. 1. A vehicle data query method, comprising: Receiving a query request, wherein the query request comprises at least one keyword for screening vehicle data; Inquiring target index metadata containing the keywords in a pre-constructed index database based on the keywords, wherein the index database stores a plurality of pieces of index metadata, and each piece of index metadata at least comprises one keyword and a corresponding data volume storage path; according to the data volume storage path in the target index metadata, accessing the corresponding position in the distributed file system, and reading the corresponding target data volume; the read one or more target data volumes are assembled and returned.
  2. 2. The method of claim 1, wherein the query request includes at least one keyword or a combination of keywords in a terminal identification, a data time, a data type.
  3. 3. The method of claim 1, wherein the keywords include terminal identification and data time, and wherein after the receiving the query request, the method further comprises: judging whether the query request is a real-time data query request or not based on the data time; And when the query request is a real-time data query request, reading a corresponding target data body in the memory database by taking the terminal identifier as a memory database key and returning.
  4. 4. The method of claim 1, wherein prior to the receiving a query request, the method further comprises: Receiving vehicle data sent by a vehicle-mounted terminal, and generating corresponding keywords and data bodies according to the vehicle data; generating a data volume storage path based on the keywords and a preset storage rule; And generating index metadata according to the keywords and the storage path, and storing the data volume according to the data volume storage path.
  5. 5. The method of claim 4, wherein the keywords include terminal identifications, and wherein after the generating the corresponding keywords and data volumes from the vehicle data, the method further comprises: judging whether the vehicle data is real-time data or not; and when the vehicle data are real-time data, the terminal identifier is used as a memory database key, and the data body is used as a memory database value to be stored in a memory database.
  6. 6. The method of claim 4, wherein the distributed file system is a Hadoop Distributed File System (HDFS) or an object storage system.
  7. 7. The method of claim 6, wherein when the distributed file system is a Hadoop Distributed File System (HDFS), the data volumes are written to the distributed file system in a columnar storage format and stored in partitions according to data generation time.
  8. 8. A vehicle data query device, characterized by comprising: The system comprises a request receiving module, a query module and a query module, wherein the request receiving module is used for receiving a query request, and the query request comprises at least one keyword for screening vehicle data; The index retrieval module is used for inquiring target index metadata containing the keywords in a pre-constructed index database based on the keywords, wherein a plurality of pieces of index metadata are stored in the index database, and each piece of index metadata at least comprises one keyword and a corresponding data volume storage path; The data reading module is used for accessing corresponding positions in the distributed file system according to the data volume storage path in the target index metadata and reading corresponding target data volumes; and the data return module is used for assembling and returning the read one or more target data volumes.
  9. 9. A computer readable medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any one of claims 1 to 7.
  10. 10. An electronic device, comprising: the apparatus comprises a processor, and a memory for storing executable instructions of the processor, wherein the processor is configured to perform the method of any one of claims 1 to 7 via execution of the executable instructions.

Description

Vehicle data query method and device, computer readable medium and electronic equipment Technical Field The disclosure relates to the technical field of internet of vehicles big data, in particular to a vehicle data query method, a vehicle data query device, a computer readable medium and electronic equipment. Background In the transportation industry, a vehicle-mounted terminal based on JT808 (road transport vehicle satellite positioning system terminal data communication protocol) and JT809 (road transport vehicle satellite positioning system platform data exchange protocol) can generate and upload massive vehicle time series data. At present, a scheme of directly storing data in a relational database such as MySQL is commonly adopted in the industry. However, with the rapid increase of the data scale, the conventional scheme has the obvious defects that firstly, a large amount of time sequence data rapidly depletes the storage capacity of a single database and makes the input/output performance of the single database become a system bottleneck, secondly, the history inquiry performance is low, the response is extremely slow due to the whole-table scanning mode of the relational database facing the history data range inquiry of months or years, the service analysis requirement cannot be met, and thirdly, the real-time performance is not guaranteed, and the conventional database architecture is difficult to support low-delay data reading required by the scenes such as real-time monitoring, emergency warning and the like of a vehicle. Disclosure of Invention The present disclosure aims to provide a vehicle data query method, a vehicle data query device, a computer-readable medium and an electronic apparatus, thereby improving the efficiency of data query at least to some extent. According to a first aspect of the disclosure, a vehicle data query method is provided, which comprises the steps of receiving a query request, wherein the query request comprises at least one keyword used for screening vehicle data, querying target index metadata containing the keyword in a pre-constructed index database based on the keyword, storing a plurality of pieces of index metadata in the index database, wherein each piece of index metadata at least comprises one keyword and a corresponding data volume storage path, accessing corresponding positions in a distributed file system according to the data volume storage path in the target index metadata, reading corresponding target data volumes, and assembling and returning one or more read target data volumes. According to a second aspect of the disclosure, a vehicle data query device is provided, which comprises a request receiving module for receiving a query request, wherein the query request comprises at least one keyword for screening vehicle data, an index searching module for searching target index metadata containing keywords in a pre-constructed index database based on the keywords, wherein the index database stores a plurality of index metadata, each index metadata at least comprises one keyword and a corresponding data volume storage path, a data reading module for accessing corresponding positions in a distributed file system according to the data volume storage paths in the target index metadata and reading corresponding target data volumes, and a data returning module for assembling and returning the read one or more target data volumes. According to a third aspect of the present disclosure, there is provided a computer readable medium having stored thereon a computer program which, when executed by a processor, implements the method described above. According to a fourth aspect of the present disclosure, there is provided an electronic device characterized by comprising a processor, and a memory for storing one or more programs, which when executed by the one or more processors, cause the one or more processors to implement the above-described method. According to the vehicle data query method provided by the embodiment of the disclosure, the target index metadata is rapidly positioned by extracting keywords in the query request and utilizing the index database which is pre-constructed and is associated with the keywords and the data body storage path, and then the specific position in the distributed file system is directly accessed according to the data body storage path in the target index metadata, and finally the query process is completed by assembling and returning the target data body. The method effectively decouples lightweight index inquiry and distributed data volume access, converts time-consuming full-volume data scanning into efficient index searching and accurate data positioning, improves the inquiry efficiency in historical data, and particularly improves performance in historical data inquiry in a larger time range. It is to be understood that both the foregoing general description and the following detailed description are exemplary and explan