A method and system for repairing vehicle OTA remote upgrade failure
By collaboratively processing error logs through the vehicle terminal and cloud platform, constructing a full-dimensional feature vector and generating customized repair strategies, the problem of inaccurate identification of the root cause of failure in vehicle OTA upgrade failures is solved, achieving an efficient automated repair process and reducing manual intervention.
Patent Information
- Application Number
- CN202611156555.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-11-27
AI Technical Summary
Existing solutions for repairing OTA remote upgrade failures in vehicles fail to fully utilize the time-series correlation between error descriptions, vehicle hardware status, and module interaction logs, resulting in inaccurate identification of the root cause of the fault and an inability to dynamically adjust the repair strategy, which can easily lead to repair failures or secondary faults.
Error logs are collected and preprocessed by the vehicle terminal, and the cloud platform performs full-dimensional feature extraction and similarity matching to generate customized repair strategies. These strategies are then deployed and executed in accordance with the vehicle's status, forming a closed-loop repair process.
It enables fault type determination even in the absence of valid error codes or with inaccurate error codes, reduces cross-stage feature interference, avoids repair failures, reduces the intervention of users and offline maintenance personnel, and expands the scope of fault identification.
Smart Images

Figure CN123178136A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent connected vehicle technology, specifically to a method and system for repairing vehicle OTA remote upgrade failures. Background Technology
[0002] Over-the-air (OTA) remote upgrade technology for vehicles enables the remote pushing of software or firmware updates to in-vehicle terminals via a cloud platform, facilitating vehicle software iteration, feature optimization, and defect repair. A typical vehicle OTA system includes a cloud-based OTA platform, an in-vehicle OTA client, a security chip, one or more electronic control units, and a communication network for transmitting data between the vehicle and the cloud.
[0003] During a routine upgrade, the cloud platform generates a full or differential upgrade package for the target version and digitally signs the upgrade package. The vehicle terminal receives the upgrade task, verifies the signature, integrity, and hardware compatibility of the upgrade package, downloads the upgrade package to local storage, performs installation and activation, and sends the upgrade results back to the cloud platform.
[0004] Over-the-air (OTA) vehicle upgrades may fail during the download, verification, installation, and activation stages. For example, network interruptions or data packet loss may occur during the download stage; signature invalidation or hardware version incompatibility may occur during the verification stage; insufficient storage space or cross-version compatibility conflicts may occur during the installation stage; and electronic control unit startup abnormalities or unresponsive functional modules may occur during the activation stage.
[0005] Existing repair methods typically include retries or resume interrupted downloads when there are network anomalies, rollback using dual partitions when startup fails, or calling a fixed repair script based on a preset error code. Some solutions still require manual intervention from users, customer service personnel, or maintenance personnel after automatic repair fails.
[0006] The above-mentioned solutions typically use a single error code or timeout as the basis for fault identification, failing to fully utilize the time-series correlation between error descriptions, vehicle hardware status, parameter changes, and module interaction logs. When there is no preset error code, the error code is inconsistent with the actual fault, or multiple different faults share the same error code, the fixed "error code-repair method" mapping is difficult to accurately determine the root cause of the fault and the repair method.
[0007] Furthermore, existing solutions typically cannot dynamically adjust repair steps based on the vehicle's current communication status, storage status, and hardware model. This leads to the need to repeatedly develop different repair scripts for similar faults, and may cause repair failures or secondary faults due to inaccurate matching of repair strategies. Therefore, a vehicle OTA upgrade failure repair solution is needed that can identify faults using multi-dimensional features of error logs, dynamically generate repair strategies, and execute them remotely on the vehicle. Summary of the Invention
[0008] To address the shortcomings of existing technologies, the purpose of this invention is to provide a method and system for repairing vehicle OTA remote upgrade failures.
[0009] To achieve the above-mentioned technical effects, the present invention adopts the following technical solution:
[0010] According to a first aspect of the present invention, a method for repairing a vehicle OTA remote upgrade failure is provided, the method being executed collaboratively by an in-vehicle terminal and a cloud platform, comprising:
[0011] S1: When the vehicle terminal detects that the vehicle OTA upgrade has failed, it collects an error log with a timestamp. The error log includes at least the stage of the error, the error description text, the vehicle hardware status information, and the time sequence correlation information before and after the error.
[0012] S2: The vehicle terminal performs noise reduction, compression, and format standardization on the error log to obtain a preprocessed log;
[0013] S3: The vehicle terminal uploads the preprocessed log to the cloud platform, and the cloud platform decompresses, verifies the integrity of, and performs structured parsing on the preprocessed log to obtain structured log data;
[0014] S4: The cloud platform extracts text features, numerical features, and time-series features from the structured log data, and performs weighted fusion of the text features, numerical features, and time-series features to obtain the full-dimensional feature vector of the current error;
[0015] S5: The cloud platform filters historical feature vectors from the error log feature library that are at the same stage as the error occurrence, calculates the similarity between the full-dimensional feature vector and the historical feature vector, and determines the highest similarity. When the highest similarity is not lower than a first similarity threshold, the platform determines the error code associated with the historical feature vector corresponding to the highest similarity. When the highest similarity is lower than the first similarity threshold, the platform stores the full-dimensional feature vector in the annotation library and sends an annotation request. Based on the returned annotation results, the platform determines the error code and updates the error log feature library. When the error log contains an original error code, and the similarity between the historical feature associated with the original error code and the full-dimensional feature vector is lower than a second similarity threshold, the platform corrects the original error code based on the error code determined by the highest similarity.
[0016] S6: The cloud platform retrieves a basic repair solution from the error code-repair solution association library based on the determined error code, adapts the basic repair solution to the real-time status of the vehicle, and sorts the repair actions according to the impact range of each repair action to generate a customized repair strategy.
[0017] S7: The cloud platform sends the customized repair strategy to the vehicle terminal. When the vehicle status meets the execution conditions, the vehicle terminal parses and executes the customized repair strategy and monitors the execution progress of the customized repair strategy.
[0018] S8: The vehicle terminal will feed back the execution status and execution log to the cloud platform; when the repair is successful, the cloud platform will write the repair record into the historical repair record database and control the re-initiation or continuation of the vehicle OTA upgrade; when the repair fails, the similarity matching and repair strategy generation will be re-executed, and an offline service prompt will be output after the preset number of retries is reached.
[0019] Furthermore, the vehicle terminal maintains a rolling log cache with a preset backtracking time window before detecting a vehicle OTA upgrade failure, and starts log collection after detecting a vehicle OTA upgrade failure, so that the error log contains at least the module interaction logs of the 3 minutes before the error occurred; the sampling interval of the log collection is 100ms, and the collection duration is 5 minutes.
[0020] Furthermore, the noise reduction includes a sliding window deduplication algorithm with a window size of 5 seconds, which retains only the first and last records for consecutive duplicate logs with parameter value differences of less than 5%; the compression uses the LZ4 lossless compression algorithm; the format standardization includes converting logs from different vehicle hardware into a standard JSON format, which includes at least the vehicle identification number (VIN), acquisition module, parameter type, parameter value, and timestamp.
[0021] Furthermore, the vehicle-mounted terminal uploads the preprocessed logs via a 4G / 5G cellular network or wireless LAN, using the Message Queuing Telemetry Transmission (MQTT) protocol with a Quality of Service (QoS) level of 2. When the upload time exceeds 30 seconds, the vehicle-mounted terminal switches the communication channel and retryes twice. The cloud platform verifies whether the VIN conforms to the 17-bit standard format and whether the log fields are complete, and sends a retransmission request to the vehicle-mounted terminal if any key fields are missing.
[0022] Furthermore, the text features are extracted from the erroneous description text using the Term Frequency-Inverse Document Frequency (TF-IDF) algorithm to generate a 500-dimensional text feature vector; the numerical features are generated by mapping network signal strength and local cache remaining space to the [0,1] interval to generate a 20-dimensional numerical feature vector; the temporal features are extracted from the module interaction log using the PrefixSpan sequence pattern mining algorithm to generate a 100-dimensional temporal feature vector; the weighted fusion includes processing the text feature vector, the numerical feature vector, and the temporal feature vector with weights of 0.5, 0.3, and 0.2 respectively, and concatenating them to obtain a 620-dimensional full-dimensional feature vector.
[0023] Furthermore, the similarity is cosine similarity, the first similarity threshold is 0.8, and the second similarity threshold is 0.6; when there is no historical feature vector in the error log feature library that is the same as the error occurrence stage, the current error is directly determined as an unknown error and the annotation request is triggered; after receiving the annotation result, the full-dimensional feature vector, the error occurrence stage, the annotated error code, and the annotation time are written into the error log feature library.
[0024] Furthermore, the basic repair scheme is also associated with the compatible ECU model; the real-time status of the vehicle includes at least the current communication channel, network signal strength, remaining local cache space, and vehicle hardware model; the repair actions include at least one of network configuration actions, storage cleanup actions, and firmware operation actions, and local storage operations are executed before network configuration operations in order of increasing impact.
[0025] When the current communication channel is a cellular network and the network signal strength is lower than a preset value, the customized repair strategy includes prioritizing switching to the vehicle-home interconnection wireless local area network; when the remaining space of the local cache is lower than a preset space threshold, the customized repair strategy includes clearing the OTA temporary cache at the path / data / ota / tmp; the customized repair strategy adopts a JSON format that includes instruction identifiers, execution steps, parameter requirements, and timeout thresholds.
[0026] Furthermore, the cloud platform issues the customized repair strategy using the QoS 2 level of the MQTT protocol and sets a 30-minute validity period for the customized repair strategy; if a single repair action takes more than 10 seconds to execute, it is retried once; if a single repair action fails, it is skipped and the next priority repair action is executed; the vehicle terminal uses the QoS 1 level of the MQTT protocol to report the execution status, execution duration, and key execution logs; if the repair fails, the similarity matching and repair strategy generation are re-executed at most twice.
[0027] Furthermore, the error log feature library uses a hash structure that supports indexing by error occurrence stage to store feature identifiers, error occurrence stages, full-dimensional feature vectors, corresponding error codes, and annotation times; the error code-repair scheme association library stores error codes, basic repair schemes, a list of compatible ECU models, and update times, and uses the combination of error codes and compatible ECU models as an index; the historical repair record library stores VIN, error time, log feature identifiers, matching error codes, repair strategies, execution results, and time consumption, and is partitioned according to time.
[0028] According to a second aspect of the present invention, a repair system for vehicle OTA remote upgrade failure is provided, for implementing the vehicle OTA remote upgrade failure repair method as described above, including an in-vehicle terminal, a cloud platform and a data storage layer;
[0029] The vehicle terminal includes an OTA client, a log collection module, a local preprocessing module, a repair strategy execution module, and a status feedback module. The log collection module is used to collect error logs when the OTA client detects an upgrade failure. The local preprocessing module is used to reduce noise, compress, and standardize the format of the error logs. The repair strategy execution module is used to execute the customized repair strategy issued by the cloud platform. The status feedback module is used to report the execution status and execution logs to the cloud platform.
[0030] The cloud platform includes a log receiving and parsing module, a log feature extraction module, a similarity matching module, a repair strategy generation module, and a strategy distribution and status receiving module. The log receiving and parsing module is used to verify and structure the preprocessed logs. The log feature extraction module is used to extract and fuse text features, numerical features, and time-series features. The similarity matching module is used to determine or correct error codes based on historical feature vectors from the same upgrade stage. The repair strategy generation module is used to generate customized repair strategies based on the determined error codes and the real-time vehicle status. The strategy distribution and status receiving module is used to distribute the customized repair strategies and receive the execution results.
[0031] The data storage layer includes an error log feature library, an error code-repair scheme association library, a library to be labeled, and a historical repair record library.
[0032] Compared with the prior art, the present invention has the following beneficial effects:
[0033] 1. The vehicle OTA remote upgrade failure repair method and system provided by the present invention utilizes error description text, vehicle status values and module interaction timing to construct a full-dimensional feature vector, which can determine the fault type based on the log context when there is no valid error code or the error code is inaccurate.
[0034] 2. The vehicle OTA remote upgrade failure repair method and system provided by the present invention can reduce cross-stage feature interference by performing similarity matching on historical features in the same upgrade stage, and reuse existing repair solutions for faults that are essentially the same but have different error codes.
[0035] 3. The vehicle OTA remote upgrade failure repair method and system provided by the present invention adapts and sorts the basic repair scheme according to the vehicle's current communication status, storage status and hardware model, which can avoid repair failure caused by the inconsistency between the fixed repair script and the vehicle's real-time status.
[0036] 4. The vehicle OTA remote upgrade failure repair method and system provided by the present invention forms a closed loop through policy distribution, vehicle execution, result feedback, re-matching and historical record update, which can reduce the intervention of users and offline maintenance personnel.
[0037] 5. The vehicle OTA remote upgrade failure repair method and system provided by the present invention stores features that do not reach the similarity threshold into the labeling library, and updates the error log feature library after obtaining the label, which can expand the range of identifiable faults as the number of repair cases increases. Attached Figure Description
[0038] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0039] Figure 1 This is a flowchart of the repair method for vehicle OTA remote upgrade failure in Example 1;
[0040] Figure 2 This is a schematic diagram of the process of full-dimensional log feature extraction and similarity matching in Example 1. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0042] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0043] It should be noted that similar reference numerals and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, all directional indications (such as up, down, left, right, front, back, bottom, etc.) in this application are only used to explain the relative positional relationships and movements between components in a specific orientation (as shown in the figures). If the specific orientation changes, the directional indication will also change accordingly. Furthermore, descriptions involving "first," "second," etc., in this application are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated.
[0044] In this application, OTA refers to over-the-air remote upgrade; ECU refers to electronic control unit; IVI refers to in-vehicle infotainment system; VIN refers to vehicle identification number; RSRP refers to reference signal received power; MQTT refers to message queue telemetry transmission protocol; QoS refers to quality of service level; JSON refers to JavaScript object notation; TF-IDF refers to term frequency-inverse document frequency; and LZ4 refers to a lossless compression algorithm based on the Lempel-Ziv structure.
[0045] Example 1
[0046] like Figure 1-2 As shown in the embodiment, this is a method for repairing vehicle OTA remote upgrade failures through collaborative execution between an in-vehicle terminal and a cloud platform.
[0047] During a normal OTA upgrade process, the cloud-based OTA platform generates a full or differential upgrade package for the target version and digitally signs it. The vehicle-mounted OTA client receives the upgrade command, verifies the upgrade package signature and hardware compatibility, downloads the upgrade package to local storage, and performs installation and activation on the corresponding ECU. The upgrade result is then uploaded to the cloud. When the vehicle-mounted OTA client detects download progress stalling, verification failure, installation error code return, ECU unresponsive after activation, or other upgrade failure states, the repair process described in this embodiment is triggered.
[0048] The vehicle-mounted terminal includes an OTA client, a log collection module, a local preprocessing module, a repair strategy execution module, and a status feedback module. The cloud platform includes a log receiving and parsing module, a log feature extraction module, a similarity matching module, a repair strategy generation module, and a strategy distribution and status receiving module. The data storage layer includes an error log feature library, an error code-repair scheme association library, a library to be labeled, and a historical repair record library.
[0049] The log collection module is used to collect error scenario context information from all dimensions when an OTA upgrade fails. To obtain logs prior to the error, the vehicle terminal can continuously maintain a rolling log cache and freeze data within a preset time window before the error occurs after an upgrade failure is detected, while continuing to collect data after the error occurs. All data in the error log is timestamped, with timestamps accurate to milliseconds.
[0050] Table 1. Schematic diagram of error log collection information
[0051] category Information content Example Basic error messages Error occurrence stage, original error code, error description text Download phase, 0x001, Download communication interrupted Hardware status information ECU model, IVI version, remaining local cache space, network signal strength ECU-A, V3.2, 1.2GB, RSRP=-95dBm Time-series correlation information Module interaction logs and key parameter change curves before and after the error occurred Weak network signal → Communication interruption → Download failure
[0052] In one example, the log collection module collects data at 100ms intervals for a total of 5 minutes, ensuring that the collected results include at least 3 minutes of module interaction logs prior to the error. This allows the context of the error to be determined by network fluctuations, module calls, and parameter changes prior to the error, rather than being limited to a single error code at the moment the error occurred. The raw logs can be in JSON format, with a file size of approximately 500KB.
[0053] The local preprocessing module sequentially performs noise reduction, compression, and format normalization on the raw logs. Noise reduction can employ a sliding window deduplication algorithm with a window size of 5 seconds; for logs where the same parameter is repeated consecutively within the window and the parameter value difference is less than 5%, only the first and last records are retained. Compression can use the LZ4 lossless compression algorithm, with an exemplary compression ratio of approximately 1:3. Format normalization converts logs from different ECUs or IVIs into a unified vehicle log standard JSON format, with fields including at least VIN, acquisition module, parameter type, parameter value, and timestamp. The size of the preprocessed log file is, for example, approximately 170KB.
[0054] If a corrupted log file or compression failure is detected during the compression process, the local preprocessing module can re-collect the logs and retain at least the basic error information during the re-collection, so as to provide a minimum amount of fault data to the cloud even when the amount of data to be transmitted is limited.
[0055] Preprocessed logs are uploaded to the cloud via 4G / 5G cellular networks or vehicle-to-home wireless LAN. Uploads can utilize MQTT protocol at QoS level 2 to ensure messages are delivered exactly once, preventing log loss or duplicate processing. If the upload time exceeds 30 seconds, the vehicle terminal can switch between cellular and wireless LAN, and retry twice.
[0056] After receiving the preprocessed logs, the log receiving and parsing module decompresses the logs using the LZ4 algorithm corresponding to the vehicle terminal, verifies whether the VIN conforms to the 17-bit standard format, and checks the integrity of the log fields. When error stages, timestamps, or other critical fields are missing, the cloud platform sends a retransmission request to the vehicle terminal. Verified JSON logs are converted into structured data; for example, "RSRP=-95dBm" is parsed into a record with a parameter type of network signal, a parameter value of -95, and a unit of dBm. This data can be temporarily stored in a Redis cache with a validity period of, for example, 30 minutes.
[0057] The log feature extraction module extracts essential error features from structured logs. For example... Figure 2 As shown, the features include at least text features, numerical features, and temporal features.
[0058] Text features can be extracted by segmenting the error description text using the TF-IDF algorithm, performing word frequency statistics, and calculating inverse document frequency to extract keywords such as "differential packet," "verification failure," and "startup timeout," forming a 500-dimensional text feature vector. Numerical features can normalize numerical parameters such as RSRP, remaining local cache space, network bandwidth, and download progress, mapping parameter values to the [0,1] interval. For example, RSRP=-95dBm is mapped to 0.6, and RSRP=-110dBm is mapped to 0.2, forming a 20-dimensional numerical feature vector.
[0059] Temporal features can be analyzed using the PrefixSpan sequence pattern mining algorithm to examine module interaction logs before and after an error occurs, extracting sequential patterns such as "weak network signal → communication interruption → download failure," and forming a 100-dimensional temporal feature vector. To introduce different weights while retaining various feature dimensions, this embodiment multiplies the text feature vector, numerical feature vector, and temporal feature vector by 0.5, 0.3, and 0.2 respectively before concatenation, forming a 620-dimensional full-dimensional feature vector.
[0060] Table 2. Schematic diagram of full-dimensional feature vectors
[0061] Feature type Preferred processing method Example Dimension Weight Text features TF-IDF Keyword Extraction 500 0.5 Numerical features [0,1] interval normalization 20 0.3 Temporal characteristics PrefixSpan sequence pattern mining 100 0.2
[0062] The similarity matching module first filters historical feature vectors from the error log feature library based on the current error's stage. For example, if the current error occurred during the download stage, only historical features from the download stage are retrieved to reduce interference from features from the verification, installation, or activation stages.
[0063] Similarity values can be in the range [0,1], with values closer to 1 indicating greater similarity between the two erroneous log features. The similarity matching module calculates the similarity between the current feature vector and each historical feature vector in the same period, and obtains the highest similarity.
[0064] The first similarity threshold can be set to 0.8. When the highest similarity is not lower than 0.8, a match is considered successful, and the error code associated with the historical feature vector corresponding to the highest similarity is used as the current incorrect match error code. In a set of exemplary tests, using 0.8 as the threshold can balance matching accuracy and coverage. The first similarity threshold can also be calibrated according to vehicle model, feature library size, and test results.
[0065] When the highest similarity is below 0.8, or when there is no historical feature vector in the error log feature library that is at the same escalation stage as the current error, it is determined to be an unknown error. The cloud platform writes the current full-dimensional feature vector and its error stage into the annotation library and sends an annotation request to the annotation terminal. After the annotation terminal returns the error code and the corresponding basic repair solution, the cloud platform writes the full-dimensional feature vector, error stage, error code, and annotation time into the error log feature library, thereby expanding the scope of subsequent automatically identifiable faults.
[0066] When the current error log contains the original error code, the similarity matching module can also retrieve historical features associated with the original error code from the error log feature library and calculate their similarity to the current full-dimensional feature vector. If this similarity is lower than the second similarity threshold of 0.6, and the highest similarity between the historical feature corresponding to another error code and the current feature reaches the first similarity threshold, then the original error code is determined to be inaccurate, and the error code corresponding to the highest similarity is used to cover or correct the original error code.
[0067] The repair strategy generation module retrieves a basic repair solution from the error code-repair solution association library based on the error code obtained through matching or annotation and the vehicle hardware model. The mapping in the error code-repair solution association library can include the error code, basic solution content, list of compatible ECU models, and update time, and is indexed by the combination of the error code and the compatible ECU model.
[0068] After retrieving the basic repair plan, the repair strategy generation module adapts the basic repair plan to the vehicle's real-time status. For example, the basic repair plan corresponding to error code 0x001 may include switching communication channels and resuming interrupted transmissions; when the vehicle is currently using a cellular network and RSRP is lower than a preset signal threshold, the basic plan adds an action to prioritize switching to the vehicle-to-home wireless LAN; when the remaining local cache space is lower than a preset space threshold, the basic plan adds an action to clear the OTA temporary cache at the path / data / ota / tmp.
[0069] When a customized repair strategy includes multiple repair actions, these actions can be arranged in ascending order of their impact. For example, clearing the local cache, switching communication channels, and resuming interrupted downloads can be executed sequentially, prioritizing local operations that have less impact on other vehicle functions. Customized repair strategies can use JSON format, where each instruction includes an instruction identifier, execution steps, parameter requirements, and a timeout threshold. For example, the instruction identifier could be 001, the execution step could be switching the Wi-Fi network, the parameter could be the target network identifier, and the timeout threshold could be 10 seconds.
[0070] The policy delivery and status reception module uses the MQTT protocol at QoS level 2 to deliver customized repair policies to the vehicle terminal, and sets a validity period of, for example, 30 minutes for the policies. Policies that have expired and have not been executed can be re-delivered to prevent the vehicle terminal from executing expired policies.
[0071] After receiving the repair strategy execution module, it first checks whether the vehicle is in a state where repair can be performed. For example, for firmware operations that may affect driving functions, the vehicle can be in a parked state, the power supply voltage must meet a preset value, and the relevant ECUs must not perform critical driving control tasks. Once the execution conditions are met, the repair strategy execution module parses network configuration, storage cleanup, and firmware operation strategies into onboard executable instructions and executes them sequentially according to the priority in the strategy.
[0072] During execution, the repair strategy execution module monitors the progress of each action in real time. If an action takes more than 10 seconds to execute, it can be retried once; if the retry still fails, the reason for the failure can be recorded and the action skipped, continuing with the next priority action. This approach allows for the attempt of other actions that can eliminate the cause of the failure even when some actions are unexecutable.
[0073] The status feedback module uses a dual feedback method of "results + logs" to upload execution results. The feedback results include at least the execution status and execution duration, with the execution status represented by 0 for success and 1 for failure. The execution logs can include the number of files deleted, the amount of space released, communication channel switching results, and breakpoint resume positions, etc. Execution results can be uploaded using the MQTT protocol at QoS 1 level to ensure that messages are delivered at least once.
[0074] Upon receiving a successful result, the cloud platform writes the repair record to the historical repair record database and sends a command to the vehicle OTA client to re-initiate or continue the upgrade. If the execution fails, the cloud platform re-triggers the similarity matching module to check for error codes or matching discrepancies in the repair strategy, and regenerates the repair strategy. The number of re-matching and strategy generation attempts can be limited to two; if the attempt still fails after reaching the retry limit, an offline service prompt is output to the vehicle or user terminal, and complete error logs and repair records are retained for subsequent diagnostics.
[0075] Table 3. Schematic diagram of repair process parameters
[0076] parameter Example value effect Slide deduplication window 5s Filtering consecutive duplicate logs Log sampling interval / collection duration 100ms / 5min Override error context Upload timeout / Switch retry 30s / 2 times Improve log upload reliability First / Second Similarity Threshold 0.8 / 0.6 Matching error codes and correcting original error codes Strategy validity period 30min Avoid implementing expiration policies Single step timeout / retry 10s / time Control vehicle execution time Number of times to rematch after repair failure 2 times Limit the number of closed-loop retries
[0077] The error log feature library can be stored using a Redis hash structure, with fields including feature identifier, error occurrence stage, full-dimensional feature vector, corresponding error code, and annotation time, and supports indexing by error occurrence stage. The error code-repair solution association library can be stored using a MySQL table, with the error code and the compatible ECU model as the composite primary key. The historical repair record library can be stored using MySQL partitioned tables, divided by month, recording VIN, error time, log feature identifier, matching error code, repair strategy, execution result, and execution time, supporting queries for historical repair records by VIN or error code.
[0078] The cloud platform can be deployed on a cluster of cloud servers. In one exemplary implementation, the server may employ an Intel Xeon Gold 6348 processor and 128GB of memory; this hardware configuration is for illustrative purposes only and does not constitute a limitation on the cloud platform hardware.
[0079] The following example of a network interruption during the download phase illustrates the repair process. The vehicle-mounted OTA client triggers log collection after detecting a download stagnation of more than 5 minutes. The logs contain continuously decreasing RSRP, communication interruption between the network module and the download module, download failure, and the original error code. After extracting text, numerical, and temporal features, the cloud platform matches error code 0x001 in the historical features of the download phase.
[0080] The cloud platform retrieves the basic solution corresponding to 0x001: "Switch communication channel + resume interrupted download". If the vehicle is currently using a cellular network with a weak signal and insufficient local cache space, a customized repair strategy is generated: "Clear OTA temporary cache → Switch to vehicle-home interconnection wireless LAN → Resume download from the interrupted position". After execution by the in-vehicle terminal, the cache clearing, network switching, and resume download results are returned; if the repair is successful, the upgrade continues, and this case is written to the historical repair record database.
[0081] The vehicle OTA remote upgrade failure repair method and system provided in this embodiment utilizes error description text, vehicle status values, and module interaction timing to construct a full-dimensional feature vector. This enables the determination of the fault type based on log context even when there is no valid error code or the error code is inaccurate. Similarity matching is performed on historical features within the same upgrade stage, reducing cross-stage feature interference and allowing faults with essentially the same error code but different error codes to reuse existing repair solutions. Adapting and sorting basic repair solutions based on the vehicle's current communication status, storage status, and hardware model avoids repair failures caused by inconsistencies between fixed repair scripts and the vehicle's real-time status. A closed loop is formed through policy distribution, on-board execution, result feedback, re-matching, and historical record updates, reducing the need for user and offline maintenance personnel intervention. Features that do not reach the similarity threshold are stored in a labeling library, and errors are updated after labeling is obtained.
[0082] Example 2
[0083] This embodiment provides a repair system for vehicle OTA remote upgrade failures, used to implement the method described in Embodiment 1. The system includes an in-vehicle terminal, a cloud platform, and a data storage layer.
[0084] The OTA client in the vehicle terminal connects to the log acquisition module, which outputs a failure trigger signal and upgrade stage information when an upgrade failure is detected. The log acquisition module connects to the local preprocessing module, which transmits the raw logs to the local preprocessing module. The local preprocessing module communicates with the log receiving and parsing module on the cloud platform through the vehicle communication module.
[0085] The cloud-based log receiving and parsing module is sequentially connected to the log feature extraction module, similarity matching module, repair strategy generation module, and strategy distribution and status receiving module. The similarity matching module is connected to the error log feature library and the annotation library, the repair strategy generation module is connected to the error code-repair scheme association library, and the strategy distribution and status receiving module is connected to the historical repair record library.
[0086] The on-board repair strategy execution module receives customized repair strategies from the cloud and connects to the vehicle network management, storage management, and ECU upgrade interfaces to perform network configuration, storage cleanup, and firmware operations. The status feedback module connects to the repair strategy execution module and sends the execution status and key logs to the cloud-based strategy delivery and status receiving module. This forms a closed loop from fault acquisition, fault identification, strategy generation, on-board execution, to result feedback.
[0087] The specific embodiments of the present invention have been described above. Based on the above description, those skilled in the art can make various changes and modifications without departing from the technical concept of the present invention.
Claims
1. A method for repairing vehicle OTA remote upgrade failure, characterized in that, The method is executed collaboratively by the vehicle-mounted terminal and the cloud platform, including: S1: When the vehicle terminal detects that the vehicle OTA upgrade has failed, it collects an error log with a timestamp. The error log includes at least the stage of the error, the error description text, the vehicle hardware status information, and the time sequence correlation information before and after the error. S2: The vehicle terminal performs noise reduction, compression, and format standardization on the error log to obtain a preprocessed log; S3: The vehicle terminal uploads the preprocessed log to the cloud platform, and the cloud platform decompresses, verifies the integrity of, and performs structured parsing on the preprocessed log to obtain structured log data; S4: The cloud platform extracts text features, numerical features, and time-series features from the structured log data, and performs weighted fusion of the text features, numerical features, and time-series features to obtain the full-dimensional feature vector of the current error; S5: The cloud platform filters historical feature vectors from the error log feature library that are at the same stage as the error occurrence, calculates the similarity between the full-dimensional feature vector and the historical feature vector, and determines the highest similarity. When the highest similarity is not lower than a first similarity threshold, the platform determines the error code associated with the historical feature vector corresponding to the highest similarity. When the highest similarity is lower than the first similarity threshold, the platform stores the full-dimensional feature vector in the annotation library and sends an annotation request. Based on the returned annotation results, the platform determines the error code and updates the error log feature library. When the error log contains an original error code, and the similarity between the historical feature associated with the original error code and the full-dimensional feature vector is lower than a second similarity threshold, the platform corrects the original error code based on the error code determined by the highest similarity. S6: The cloud platform retrieves a basic repair solution from the error code-repair solution association library based on the determined error code, adapts the basic repair solution to the real-time status of the vehicle, and sorts the repair actions according to the impact range of each repair action to generate a customized repair strategy. S7: The cloud platform sends the customized repair strategy to the vehicle terminal. When the vehicle status meets the execution conditions, the vehicle terminal parses and executes the customized repair strategy and monitors the execution progress of the customized repair strategy. S8: The vehicle terminal will feed back the execution status and execution log to the cloud platform; when the repair is successful, the cloud platform will write the repair record into the historical repair record database and control the re-initiation or continuation of the vehicle OTA upgrade; when the repair fails, the similarity matching and repair strategy generation will be re-executed, and an offline service prompt will be output after the preset number of retries is reached.
2. The method for repairing vehicle OTA remote upgrade failure according to claim 1, characterized in that, The vehicle terminal maintains a rolling log cache with a preset backtracking time window before detecting a vehicle OTA upgrade failure, and starts log collection after detecting a vehicle OTA upgrade failure, so that the error log contains at least the module interaction logs of the 3 minutes before the error occurred; the sampling interval of the log collection is 100ms, and the collection duration is 5 minutes.
3. The method for repairing vehicle OTA remote upgrade failure according to claim 1, characterized in that, The noise reduction includes a sliding window deduplication algorithm with a window size of 5 seconds, which retains only the first and last records of consecutive duplicate logs with parameter value differences of less than 5%; the compression uses the LZ4 lossless compression algorithm; the format standardization includes converting logs from different vehicle hardware into a standard JSON format, which includes at least the vehicle identification number (VIN), acquisition module, parameter type, parameter value, and timestamp.
4. The method for repairing vehicle OTA remote upgrade failure according to claim 1, characterized in that, The vehicle-mounted terminal uploads the preprocessed logs via a 4G / 5G cellular network or wireless LAN, using the Message Queuing Telemetry Transmission (MQTT) protocol with a Quality of Service (QoS) level of 2. When the upload time exceeds 30 seconds, the vehicle-mounted terminal switches the communication channel and retryes twice. The cloud platform verifies whether the VIN conforms to the 17-bit standard format and whether the log fields are complete, and sends a retransmission request to the vehicle-mounted terminal if any key fields are missing.
5. The method for repairing vehicle OTA remote upgrade failure according to claim 1, characterized in that, The text features are extracted from the erroneous description text using the TF-IDF algorithm to generate a 500-dimensional text feature vector; the numerical features are generated by mapping network signal strength and local cache remaining space to the [0,1] interval to generate a 20-dimensional numerical feature vector; the temporal features are extracted from the module interaction log using the PrefixSpan sequence pattern mining algorithm to generate a 100-dimensional temporal feature vector; the weighted fusion includes processing the text feature vector, the numerical feature vector, and the temporal feature vector with weights of 0.5, 0.3, and 0.2 respectively, and concatenating them to obtain a 620-dimensional full-dimensional feature vector.
6. The method for repairing vehicle OTA remote upgrade failure according to claim 1, characterized in that, The similarity is cosine similarity, the first similarity threshold is 0.8, and the second similarity threshold is 0.
6. When there is no historical feature vector in the error log feature library that is the same as the error occurrence stage, the current error is directly determined as an unknown error and the annotation request is triggered. After receiving the annotation result, the full-dimensional feature vector, the error occurrence stage, the annotated error code, and the annotation time are written into the error log feature library.
7. The method for repairing vehicle OTA remote upgrade failure according to claim 1, characterized in that, The basic repair scheme is also associated with the compatible ECU model; the real-time status of the vehicle includes at least the current communication channel, network signal strength, local cache remaining space, and vehicle hardware model; the repair actions include at least one of network configuration actions, storage cleanup actions, and firmware operation actions, and local storage operations are executed before network configuration operations in order of increasing impact. When the current communication channel is a cellular network and the network signal strength is lower than a preset value, the customized repair strategy includes prioritizing switching to the vehicle-home interconnection wireless local area network; when the remaining space of the local cache is lower than a preset space threshold, the customized repair strategy includes clearing the OTA temporary cache at the path / data / ota / tmp; the customized repair strategy adopts a JSON format that includes instruction identifiers, execution steps, parameter requirements, and timeout thresholds.
8. The method for repairing vehicle OTA remote upgrade failure according to claim 1, characterized in that, The cloud platform uses the MQTT protocol at QoS level 2 to issue the customized repair strategy and sets a validity period of 30 minutes for the customized repair strategy; If a single repair action takes more than 10 seconds to execute, it will be retried once. If a single repair action fails, it will be skipped and the next priority repair action will be executed. The vehicle terminal uses the MQTT protocol at QoS level 1 to report the execution status, execution duration and key execution logs. If the repair fails, the similarity matching and repair strategy generation will be re-executed at most twice.
9. The method for repairing vehicle OTA remote upgrade failure according to claim 1, characterized in that, The error log feature library uses a hash structure that supports indexing by error occurrence stage to store feature identifiers, error occurrence stages, full-dimensional feature vectors, corresponding error codes, and annotation times. The error code-repair scheme association library stores error codes, basic repair schemes, a list of compatible ECU models, and update times, and uses the combination of error codes and compatible ECU models as an index. The historical repair record library stores VIN, error time, log feature identifiers, matching error codes, repair strategies, execution results, and time consumption, and is partitioned according to time.
10. A system for repairing vehicle OTA remote upgrade failures, used to implement the vehicle OTA remote upgrade failure repair method as described in any one of claims 1-9, characterized in that, This includes in-vehicle terminals, cloud platforms, and data storage layers; The vehicle terminal includes an OTA client, a log collection module, a local preprocessing module, a repair strategy execution module, and a status feedback module. The log collection module is used to collect error logs when the OTA client detects an upgrade failure. The local preprocessing module is used to reduce noise, compress, and standardize the format of the error logs. The repair strategy execution module is used to execute the customized repair strategy issued by the cloud platform. The status feedback module is used to report the execution status and execution logs to the cloud platform. The cloud platform includes a log receiving and parsing module, a log feature extraction module, a similarity matching module, a repair strategy generation module, and a strategy distribution and status receiving module. The log receiving and parsing module is used to verify and structure the preprocessed logs. The log feature extraction module is used to extract and fuse text features, numerical features, and time-series features. The similarity matching module is used to determine or correct error codes based on historical feature vectors from the same upgrade stage. The repair strategy generation module is used to generate customized repair strategies based on the determined error codes and the real-time vehicle status. The strategy distribution and status receiving module is used to distribute the customized repair strategies and receive the execution results. The data storage layer includes an error log feature library, an error code-repair scheme association library, a library to be labeled, and a historical repair record library.
