Off-line OBD data analysis method based on Bluetooth communication
Through the offline OBD data analysis method based on Bluetooth communication, the local database and Protobuf protocol are used to solve the problem of strong network dependence in the existing technology, and efficient and fast data analysis and troubleshooting are achieved in a network-free environment. It is suitable for OBD data acquisition and analysis of various models.
Patent Information
- Application Number
- CN202510618583.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-14
- Publication Date
- 2025-08-15
AI Technical Summary
The existing OBD data analysis scheme has strong network dependence, resulting in limited data continuity and real-time performance, and cannot perform effective analysis in offline environments, especially in areas without networks or when offline analysis is required.
The offline OBD data analysis method based on Bluetooth communication is adopted, and the local SQLite database and Protobuf protocol in the mobile phone are used to connect the OBD diagnostic instrument to collect and analyze data in real time through Bluetooth, support disconnection and cache mechanisms, ensure the integrity and stability of data transmission, and update the analysis rule base through offline upgrade packages.
It realizes efficient and fast OBD data analysis in a network-free environment, ensures data integrity and real-time, supports compatibility between new models and new protocols, and improves troubleshooting efficiency and vehicle safety.
Smart Images

Figure CN120491599A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of on-board diagnostic systems, and in particular to an off-line OBD data analysis method based on Bluetooth communication. Background Art
[0002] On-board diagnostics (OBD) systems are widely used for vehicle health monitoring and fault diagnosis. Currently, commercial vehicles typically use the SAE J1939 protocol for on-board data transmission. This protocol, based on the CAN (Controller Area Network) bus, can be used to monitor the vehicle's operating status in real time.
[0003] Existing technologies mainly rely on the following methods to collect and analyze OBD data: on-board diagnostic instruments, that is, handheld devices. Many vehicle maintenance personnel use handheld diagnostic instruments, such as professional OBD reading devices, which are connected to the vehicle's OBD interface to read data in real time; 4G / 5G-based remote monitoring systems. Some fleet management systems, such as T-BOX devices, use cellular networks to upload OBD data to the cloud and store and analyze it through cloud servers; local storage plus wired transmission. This solution uses an OBD adapter to collect data and store it locally on the device, and then transfer it to a computer via USB or SD card for analysis.
[0004] However, the above methods have the following defects: strong dependence on the network, which affects data continuity. Many remote OBD monitoring devices rely on cellular networks to upload data, but in cases where the network signal is weak (such as tunnels, mountainous areas, and remote areas), the device may not be able to transmit data normally, resulting in loss of diagnostic information; limited real-time and storage capabilities. Traditional OBD reading devices can usually only provide limited real-time data, and the data storage capacity is limited, and historical data cannot be stored for a long time for analysis. Although cloud-based parsing solutions can store data for a long time, due to dependence on the network, the data upload and download process may be delayed; data analysis cannot be performed in an offline environment. Existing OBD devices usually need to be connected to a computer or the cloud for data analysis. If the vehicle is traveling in an area without a network or requires offline analysis after diagnosis (such as accident investigation, fleet management), traditional solutions are difficult to meet the needs. Summary of the Invention
[0005] The purpose of the present invention is to provide an offline OBD data parsing method based on Bluetooth communication, which has the advantages of no network dependence, the parsing rules are pre-downloaded to the local computer, and the data can still be accurately and quickly parsed in the offline state; efficient search, using the index mechanism of the SQLite database to speed up the rule search speed and realize real-time analysis; flexible upgrade, updating the local rule base through the offline upgrade package, ensuring that the parsing rules are always kept up to date and compatible with new models and new protocols.
[0006] The above technical objectives of the present invention are achieved through the following technical solutions:
[0007] The offline OBD data analysis method based on Bluetooth communication includes the following steps:
[0008] Step 1: The phone has an offline local database, which needs to be updated;
[0009] Step 2: Establish a Bluetooth connection between the mobile phone and the OBD diagnostic instrument;
[0010] Step 3: The mobile phone sends a data request to the OBD diagnostic instrument via Bluetooth and sends a command request to the OBD diagnostic instrument;
[0011] Step 4: The OBD diagnostic instrument sends a data request to the vehicle's ECU;
[0012] Step 5: Vehicle data response: the vehicle's ECU receives the request from the OBD diagnostic instrument, packages the data and sends it to the OBD diagnostic instrument;
[0013] Step 6: The OBD diagnostic instrument sends the vehicle data to the mobile phone via Bluetooth;
[0014] Step 7: The mobile phone receives the vehicle data, and the local database parses, stores and displays the vehicle data.
[0015] The preferred options are as follows:
[0016] Preferably: in step 1,
[0017] Check the rule base version number stored in the SQLite database and record the current rule version in the meta table. When new parsing rules are issued, the application downloads the update package and updates the SQLite database in the background. This database mainly contains offline data parsing rules.
[0018] Preferably: in step 2,
[0019] Use a mobile phone to establish a Bluetooth connection with the OBD diagnostic instrument. The OBD diagnostic instrument sends Protobuf data packets to the mobile phone in real time through the Bluetooth module. It supports disconnection reconnection and caching mechanisms to ensure the integrity and stability of data transmission.
[0020] When the mobile phone is not connected to the OBD diagnostic instrument via Bluetooth, the OBD diagnostic instrument will periodically query the vehicle fault information. If a vehicle fault occurs, the diagnostic instrument will store it locally, so that the abnormal condition of the vehicle can be obtained in time after the mobile phone is reconnected, and the owner can be notified for inspection and repair, thereby improving driving safety.
[0021] Preferably: in step 4,
[0022] The OBD diagnostic instrument receives and analyzes the command request sent from the mobile phone via Bluetooth, and sends data requests and control requests to the vehicle's ECU through the vehicle's OBD interface according to the protocol specifications;
[0023] The OBD diagnostic instrument performs preliminary filtering and error checking on the collected data, and uses the predefined Protobuf protocol to serialize and package the data and send it to the mobile phone;
[0024] The Protobuf protocol ensures data encapsulation and scalability and supports future version upgrades.
[0025] In summary, the present invention has the following beneficial effects:
[0026] The offline OBD data analysis method based on Bluetooth communication proposed in the present invention is applicable to various types of vehicles with OBD protocol specifications.
[0027] In practical applications, the present invention can efficiently collect and store vehicle operation data, and ensure data integrity even in an off-network environment.
[0028] Fleet management: In logistics and commercial fleet management, the offline OBD data analysis method of the present invention can help operators continuously monitor vehicle status and ensure complete data recording even when the vehicle travels to remote areas without network coverage.
[0029] In vehicle maintenance and after-sales service, this invention provides maintenance personnel with an efficient method for reading and analyzing OBD data. Maintenance personnel can use offline collected data to predict the cause of a fault before the vehicle arrives at the site, reducing the manual intervention required by traditional diagnostic methods and improving troubleshooting efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 This is the overall process of device interaction between the mobile phone, the OBD diagnostic instrument, and the car in the embodiment;
[0031] Figure 2 This is the offline data analysis process of the embodiment. DETAILED DESCRIPTION
[0032] The present invention will be further described in detail below with reference to the accompanying drawings.
[0033] Offline OBD data analysis method based on Bluetooth communication, such as Figure 1 、 Figure 2 As shown,
[0034] The steps are as follows:
[0035] Step 1: The phone has an offline local database, which needs to be updated;
[0036] Before connecting to Bluetooth, the rule base version number stored in the SQLite database is checked and the current rule version is recorded in the meta table. When new parsing rules are issued, the application downloads the update package and updates the SQLite database in the background. This database mainly contains offline data parsing rules, such as the PGN and SPN codes, conversion formulas, and information descriptions in the J1939 protocol. Other protocols are similar.
[0037] Step 2: Establish a Bluetooth connection between the mobile phone and the OBD diagnostic instrument;
[0038] Use a mobile phone to establish a Bluetooth connection with the OBD diagnostic instrument. The OBD diagnostic instrument sends Protobuf data packets to the mobile phone in real time through the Bluetooth module. It supports disconnection reconnection and caching mechanisms to ensure the integrity and stability of data transmission.
[0039] When the phone is not connected to the OBD diagnostic instrument via Bluetooth, the OBD diagnostic instrument will periodically query vehicle fault information. If a vehicle fault occurs, the OBD diagnostic instrument will store the information locally, so that the phone can obtain the abnormal situation of the vehicle in time after reconnecting, notify the owner to carry out maintenance, and improve driving safety.
[0040] Step 3: The mobile phone sends a data request to the OBD diagnostic instrument via Bluetooth and sends a command request to the OBD diagnostic instrument;
[0041] The command request is a specific command request, such as a PGN request;
[0042] Step 4: The OBD diagnostic instrument sends a data request to the vehicle's ECU;
[0043] The OBD diagnostic instrument receives and analyzes command requests sent from the mobile phone via Bluetooth, and sends data requests and control requests to the vehicle's ECU through the vehicle's OBD interface according to protocol specifications, including but not limited to J1939 and ISO15031 protocols.
[0044] The OBD diagnostic instrument performs preliminary filtering and error checking on the collected data, and uses the predefined Protobuf protocol to serialize and package the data and send it to the mobile phone;
[0045] Error checking includes but is not limited to CRC checking;
[0046] The Protobuf protocol contains header information, vehicle identification, timestamp, sensor data, and fault code list fields;
[0047] The Protobuf protocol ensures data encapsulation and scalability, and supports future version upgrades;
[0048] Step 5: Vehicle data response: the vehicle's ECU receives the request from the OBD diagnostic instrument, packages the data and sends it to the OBD diagnostic instrument;
[0049] Step 6: The OBD diagnostic instrument sends the vehicle data to the mobile phone via Bluetooth;
[0050] Step 7: The mobile phone receives the vehicle data, and the local database analyzes, stores and displays the latest vehicle information.
[0051] The offline local database uses SQLite, which is compact and high-performance, making it suitable for offline storage on mobile devices. Key fields, such as PGN and SPN, are extracted from the raw data. Based on parsing rules, the SQLite database is searched for rule tables to convert, correct, and diagnose the data.
[0052] This specific embodiment is merely an explanation of the present invention and is not intended to limit the present invention. After reading this specification, those skilled in the art may make non-creative modifications to this embodiment as needed. However, as long as such modifications are within the scope of the claims of the present invention, they are protected by patent law.
Claims
1. Offline OBD data analysis method based on Bluetooth communication, characterized in that: The steps are as follows: Step 1: There is an offline local database in the mobile phone, update the database; Step 2: Establish a Bluetooth connection between the mobile phone and the OBD diagnostic instrument; Step 3: The mobile phone sends a data request to the OBD diagnostic instrument via Bluetooth and sends a command request to the OBD diagnostic instrument; Step 4: The OBD diagnostic instrument sends a data request to the vehicle's ECU; Step 5: Vehicle data response: the vehicle's ECU receives the request from the OBD diagnostic instrument, packages the data and sends it to the OBD diagnostic instrument; Step 6: The OBD diagnostic instrument sends the vehicle data to the mobile phone via Bluetooth; Step 7: The mobile phone receives the vehicle data, and the local database parses, stores and displays the vehicle data.
2. The offline OBD data analysis method based on Bluetooth communication according to claim 1, characterized in that: In step one, Check the rule base version number stored in the SQLite database and record the current rule version in the meta table. When new parsing rules are issued, the application downloads the update package and updates the SQLite database in the background. This database mainly contains offline data parsing rules.
3. The offline OBD data analysis method based on Bluetooth communication according to claim 1, characterized in that: In step 2, Use a mobile phone to establish a Bluetooth connection with the OBD diagnostic instrument. The OBD diagnostic instrument sends Protobuf data packets to the mobile phone in real time through the Bluetooth module. It supports disconnection reconnection and caching mechanisms to ensure the integrity and stability of data transmission. When the mobile phone is not connected to the OBD diagnostic instrument via Bluetooth, the OBD diagnostic instrument will periodically query the vehicle fault information. If a vehicle fault occurs, the diagnostic instrument will store it locally, so that the abnormal condition of the vehicle can be obtained in time after the mobile phone is reconnected, and the owner can be notified for inspection and repair, thereby improving driving safety.
4. The offline OBD data analysis method based on Bluetooth communication according to claim 1, characterized in that: In step four, The OBD diagnostic instrument receives and analyzes the command request sent from the mobile phone via Bluetooth, and sends data requests and control requests to the vehicle's ECU through the vehicle's OBD interface according to the protocol specifications; The OBD diagnostic instrument performs preliminary filtering and error checking on the collected data, and uses the predefined Protobuf protocol to serialize and package the data and send it to the mobile phone; The Protobuf protocol ensures data encapsulation and scalability and supports future version upgrades.