Vehicle-mounted terminal system and repair method
By deploying AI models on the server side of the on-board terminal system, automatically identifying and repairing script errors uploaded by on-board terminals, the problem of software updates and repairs in the existing technology requires manual intervention, and the repair efficiency and system stability are improved.
Patent Information
- Application Number
- CN202510118214.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-06
AI Technical Summary
Existing vehicle-mounted terminal systems require manual intervention during software updates or repairs, resulting in long and inefficient problem handling cycles.
By deploying an AI model on the server side, receiving the target script and its error log uploaded by the on-board terminal, automatically identifying the script error type and automatically generating repair scripts, and issuing them to the on-board terminal for verification and replacement.
It realizes an automated software repair process, shortens the problem handling cycle, improves the software repair efficiency of the on-board terminal system, and reduces manual intervention.
Smart Images

Figure CN119938386A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a vehicle-mounted terminal system and a repair method. Background Art
[0002] Existing vehicle terminal systems usually use fixed software upgrade solutions, such as FOTA or SOTA. When encountering errors or requiring updates, manual intervention is usually required to update or repair the software, resulting in a long problem handling cycle and low efficiency. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide a vehicle-mounted terminal system and a repair method to improve the software repair efficiency of the vehicle-mounted terminal system.
[0004] In a first aspect, the present invention provides a repair method for a vehicle-mounted terminal system, the vehicle-mounted terminal system comprising a vehicle-mounted terminal and a server, the method comprising the server receiving a first target script uploaded by the vehicle-mounted terminal and its corresponding script error log, the server determining whether the first target script satisfies an automatic repair condition based on the script error log and an identification result of the first target script; if the automatic repair condition is met, the server automatically generates a second target script, and sends it to the vehicle-mounted terminal, so that the vehicle-mounted terminal verifies the second target script, and if the second target script passes the verification, the first target script is replaced with the second target script.
[0005] In an optional implementation, the vehicle terminal includes a health management module, a business application module and a script management module. The health management module responds to a business application error message sent by the business application module and parses the business application error message. The application error message includes at least a business type and a business error type. The health management module generates a script error log based on the business application error message. The health management module extracts the corresponding first target script from the script management module based on the business type and error type. The health management module uploads the script error log and the first target script to the server.
[0006] In an optional implementation, the server performs script error identification based on the script error log and the first target script to obtain the script error type of the first target script, and the server determines whether the first target script meets the automatic repair condition based on the script error type.
[0007] In an optional implementation, if the automatic repair condition is not met, the first target script is repaired manually.
[0008] In an optional implementation, the health management module generates an executable file corresponding to the second target script in the TEE environment, and the executable file is used to run in the REE environment; the health management module verifies the executable file based on the vehicle operation data corresponding to the business type to determine whether the second target script passes the verification.
[0009] In an optional implementation, if the second target script passes verification, the business application module replaces the executable file corresponding to the first target script with the executable file corresponding to the second target script.
[0010] In an optional implementation, the server is further configured to perform an automated test on the generated second target script, and if the test passes, the second target script is sent to the vehicle-mounted terminal.
[0011] In a second aspect, the present invention provides a vehicle-mounted terminal system, which includes a vehicle-mounted terminal and a server, wherein the server is used to receive a first target script uploaded by the vehicle-mounted terminal and its corresponding script error log; based on the script error information log and the parsing and identification results of the first target script, determine whether the first target script meets the automatic repair conditions; if the automatic repair conditions are met, the server automatically generates a second target script and sends it to the vehicle-mounted terminal; the vehicle-mounted terminal is used to verify the second target script, and if the second target script passes the verification, the first target script is replaced with the second target script.
[0012] In an optional embodiment, the vehicle terminal includes a health management module, a business application module and a script management module, wherein the health management module is used to respond to a business application error message sent by the business application module, parse the business application error message, and the application error message includes at least a business type and a business error type; based on the business application error message, generate a script error log; based on the business type and error type, extract the first target script corresponding to the application error message indicated by the script management module; upload the script error log and the first target script to the server.
[0013] In an optional implementation, the server is further configured to perform script error identification based on the script error log and the first target script to obtain a script error type of the first target script, and determine whether the first target script satisfies an automatic repair condition based on the script error type.
[0014] The present application provides a vehicle terminal system and repair method, the vehicle terminal system includes a vehicle terminal and a server, the method includes the server receiving a first target script uploaded by the vehicle terminal and its corresponding script error log, the server determining whether the first target script meets the automatic repair condition based on the script error log and the recognition result of the first target script; if the automatic repair condition is met, the server automatically generates a second target script and sends it to the vehicle terminal, so that the vehicle terminal verifies the second target script, and if the second target script passes the verification, the first target script is replaced with the second target script. The server can automatically repair the problem script through the AI model, shortening the problem script processing cycle and improving the software repair efficiency of the vehicle terminal system. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 A schematic diagram of the structure of a vehicle terminal system provided in an embodiment of the present application;
[0017] Figure 2 A flowchart of a repair method for a vehicle terminal system provided in an embodiment of the present application. DETAILED DESCRIPTION
[0018] First, the application scenario of the present application is described. The technical solution of the present application can be applied to the software upgrade of the vehicle terminal system.
[0019] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.
[0020] Figure 1 A schematic diagram of the structure of a vehicle terminal system provided in an embodiment of the present application. Figure 2 A flowchart of a repair method for a vehicle terminal system provided in an embodiment of the present application.
[0021] like Figure 1 As shown, the vehicle terminal system of the present application includes a vehicle terminal and a server. The vehicle terminal here can be TBOX. The server here can be pre-deployed with a pre-trained AI model.
[0022] The server is used to receive the first target script uploaded by the vehicle terminal and its corresponding script error log. Based on the script error information log and the parsing and identification results of the first target script, it is determined whether the first target script meets the automatic repair condition. If the automatic repair condition is met, the server automatically generates a second target script and sends it to the vehicle terminal. The vehicle terminal is used to verify the second target script. If the second target script passes the verification, the first target script is replaced with the second target script.
[0023] The server is specifically used to perform script error identification based on the script error log and the first target script to obtain the script error type of the first target script, and determine whether the first target script meets the automatic repair condition based on the script error type.
[0024] The vehicle terminal includes a health management module, a business application module and a script management module. The health management module and the business application module are deployed in the REE operating environment. The script management module is deployed in the TEE operating environment.
[0025] Among them, the health management module is used to respond to the business application error message sent by the business application module, parse the business application error message, and the application error message at least includes the business type and the business error type. Based on the business application error message, a script error log is generated. Based on the business type and the error type, the first target script corresponding to the application error message is extracted in the script management module. The script error log and the first target script are uploaded to the server.
[0026] like Figure 2 As shown, the vehicle terminal system can implement script automated repair in the following ways:
[0027] S1. The business application module sends a business application error message to the health management module.
[0028] The application error message includes at least the service type and the service error type. For example, the service type here can be remote monitoring, fault diagnosis, data collection, etc. Specifically, the service error type can be to enable the drag reminder service when the vehicle is in driving state. Therefore, the drag reminder function here is a service that is executed only when the vehicle is stopped.
[0029] S2. The health management module responds to the business application error message sent by the business application module and parses the business application error message. The health management module generates a script error log based on the business application error message. And the health management module determines the first target script based on the business type and the error type.
[0030] The script here can specifically be a Python script, a Java script, a C++ script, etc.
[0031] The health management module here can first perform format analysis on the business application error message, such as JSON or XML. Then identify and extract key information, such as error code, error description, occurrence time, related business data, etc. According to the error content, it is classified into different error types, such as logical errors, system errors, input validation errors, etc. Finally, the corresponding first target script can be determined according to the error type and business type. For example, a script for executing drag reminders. Here, the corresponding script can be determined by pre-defining matching rules.
[0032] The script error log here may include the error timestamp, error source (business application module), business type, script error type, error description, related business data, possible cause analysis, etc.
[0033] S3. The health management module sends a first target script acquisition request to the script management module.
[0034] Exemplarily, the first target script acquisition request here may include an identifier corresponding to the first target script.
[0035] S4. The script management module feeds back the first target script to the health management module.
[0036] S5. The health management module script error log and the first target script are uploaded to the server.
[0037] S6. The server performs script error identification based on the script error log and the first target script to obtain a script error type of the first target script.
[0038] Here, the server can identify the script error type through the configured AI model.
[0039] S7. The server determines whether the first target script meets the automatic repair condition based on the script error type.
[0040] Here, script error types may include syntax errors, logic errors, runtime errors, performance issues, etc. For common syntax errors and logic errors, it can be considered that they can be successfully repaired.
[0041] Here you can pre-configure the mapping between script error types and whether they can be automatically fixed.
[0042] S8: If the automatic repair condition is met, the server automatically generates a second target script. If the automatic repair condition is not met, the first target script is manually repaired.
[0043] The server can use the AI model to parse the script in combination with its context, and then repair the first target script to generate a second target script.
[0044] For example, there is an incorrect judgment condition code in the first target script, "if temperature>25", which should be "if temperature<25" after repair.
[0045] S9. The server performs automated testing on the second target script.
[0046] Here, the server may perform an automated test on the repaired and generated second target script through an automated test program, and determine whether the second target script can run normally through virtual test data.
[0047] S10: If the test passes, the server sends the second target script to the health management module of the vehicle terminal.
[0048] S11. The health management module generates an executable file corresponding to the second target script in the TEE environment, and the executable file is used to run in the REE environment.
[0049] Here, the health management module converts the second target script into a binary executable file that can be run in REE.
[0050] S12. The health management module verifies the executable file based on the vehicle operation data corresponding to the business type to determine whether the second target script passes the verification.
[0051] The health management module conducts a trial run on the received second target script and verifies it through the actual vehicle operation data in the vehicle system. If the second target script can run normally without errors, it passes the verification.
[0052] S13. If the second target script is verified, the health management module sends the executable file corresponding to the second target script to the business application module. If the second target script is not verified, the health management module continues to report the first target script and the corresponding script error log to the server. The script error log here is regenerated.
[0053] For the second target script that passes the verification, its corresponding executable file can be sent to the business application module.
[0054] For the second target script that fails to pass the verification, it can continue to be reported to the server so that the server can continue to repair it.
[0055] S14. The business application module replaces the executable file corresponding to the first target script with the executable file corresponding to the second target script.
[0056] The business application module may delete the executable file corresponding to the first target script and replace it with the received executable file corresponding to the second target script.
[0057] The present application provides a method for repairing an in-vehicle terminal system, which uses an AI model deployed on a server to identify and automatically repair script errors, thereby improving the efficiency of script repair, thereby ensuring the stability and reliability of the in-vehicle terminal system and reducing the workload of manual intervention.
[0058] In one embodiment of the present application, the vehicle terminal system architecture design adopts TrustZone technology, which is divided into two environments: REE (Rich Execution Environment) and TEE (Trusted Execution Environment). TEE is used as a secure environment to save Python scripts and generate executable files. The REE environment runs business applications and connects to servers.
[0059] In the REE environment, run the platform health management module, which is responsible for collecting ERROR information of each business application. Upload the ERROR information and the corresponding application Python script to the server, and the AI model performs intelligent analysis and modification on the Python script. The AI model here can be kimi or Tongyi, etc.
[0060] The modified Python script is transferred back to the terminal, and an executable file in the REE environment is generated in the TEE environment. The platform health management module runs the newly generated executable file, and after confirming that the problem has been fixed, it automatically replaces the original business application executable file to complete the self-repair of the problem.
[0061] In this way, the security of data in the repair script process is improved and the stable operation of the system is ensured.
[0062] In one embodiment of the present application, the AI model can be trained in the following manner to achieve identification and repair of script error types:
[0063] First, collect the problematic scripts generated during TBOX operation and the corresponding script error types. Script error types may include:
[0064] (1) Logical errors: For example, a script for controlling an air conditioner may contain incorrect logical judgments, resulting in the air conditioner being unable to automatically adjust according to the temperature.
[0065] (2) Syntax errors: For example, a Python script may contain syntax errors such as spelling errors, missing brackets, etc.
[0066] (3) Runtime errors: For example, a script may crash during execution due to division by zero or accessing a non-existent variable.
[0067] (4) Performance issues: For example, the script may be inefficient when processing large amounts of data, requiring optimization of algorithms or data structures.
[0068] For example, the use of an undefined variable: print(unknown_variable) should be print(defined_variable). Another example is a division by zero operation: result = 1 / 0 should be result = 1 / valid_number.
[0069] Next, the collected data is preprocessed, including but not limited to filling missing values, standardization, and normalization to ensure data quality.
[0070] Perform feature extraction, where the extracted features include script error type, error location, code context, code complexity, and code pattern.
[0071] Among them, the error location feature can include the line number and file name of the code where the error occurred, helping the model locate the problem code for accurate repair. The code context feature can include the lines of code before and after the error occurred, which is used to understand the context of the error and provide enough information to understand the cause of the error, so as to make a more accurate repair. Code complexity features can include the nesting depth of functions, the number of loops and conditional statements, etc. Highly complex code may require more complex repair strategies. Code pattern features can include specific code patterns or pattern matching, such as common error patterns, for quickly applying known repair methods.
[0072] For the selection of the initial model, based on the properties of TBOX, you can choose a sequence-to-sequence model (Seq2Seq), a graph neural network (GNN), and a reinforcement learning model.
[0073] In a specific embodiment, a Transformer-based Seq2Seq model can be used. The model can process long sequence data and performs well in the field of natural language processing, and is therefore also suitable for code repair tasks.
[0074] When training the code repair function of the model, you can input the script error type, error location, code context, code complexity, code pattern and other features of the samples in the training set respectively, so that the model can output the correct script code snippet after repair.
[0075] During the training process, you can use the validation set to adjust the model's hyperparameters and the test set to evaluate the model's performance. Based on the validation and test results, tune the model to improve its performance. Finally, deploy the trained model to the TBOX server.
[0076] After the model is deployed, its performance can be continuously monitored and maintained and updated as needed. Feedback from the model in real-world applications can be collected for further training and improvement of the model.
[0077] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0078] In addition, the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0079] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0080] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially be embodied in the form of a software product, or the part that contributes to the prior art or the part of the technical solution. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM) random access memory (RAM), disk or optical disk, and other media that can store program codes.
[0081] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0082] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for repairing a vehicle terminal system, characterized in that: The vehicle-mounted terminal system includes a vehicle-mounted terminal and a server, and the method includes: The server receives a first target script uploaded by the vehicle terminal and a corresponding script error log; The server determines whether the first target script meets the automatic repair condition based on the script error log and the recognition result of the first target script; If the automatic repair condition is met, the server automatically generates a second target script and sends it to the vehicle terminal, so that the vehicle terminal verifies the second target script. If the second target script passes the verification, the first target script is replaced by the second target script.
2. The method according to claim 1, characterized in that The vehicle terminal includes a health management module, a business application module and a script management module. The health management module responds to a business application error message sent by the business application module and parses the business application error message. The application error message includes at least a business type and a business error type. The health management module generates a script error log based on the business application error message; The health management module extracts the corresponding first target script in the script management module based on the business type and the error type; The health management module uploads the script error log and the first target script to a server.
3. The method according to claim 1, characterized in that The server performs script error identification based on the script error log and the first target script to obtain a script error type of the first target script, and The server determines whether the first target script meets an automatic repair condition based on the script error type.
4. The method according to claim 1, characterized in that: If the automatic repair condition is not met, the first target script is repaired manually.
5. The method according to claim 2, characterized in that: The health management module generates an executable file corresponding to the second target script in the TEE environment, and the executable file is used to run in the REE environment; The health management module verifies the executable file based on the vehicle operation data corresponding to the business type to determine whether the second target script passes the verification.
6. The method according to claim 2, characterized in that If the second target script passes the verification, the business application module replaces the executable file corresponding to the first target script with the executable file corresponding to the second target script.
7. The method according to claim 1, characterized in that The server is also used to perform an automated test on the generated second target script, and if the test passes, the second target script is sent to the vehicle terminal.
8. A vehicle-mounted terminal system, characterized in that: The vehicle-mounted terminal system includes a vehicle-mounted terminal and a server. The server is used to receive a first target script uploaded by the vehicle terminal and its corresponding script error log; based on the script error information log and the parsing and identification result of the first target script, determine whether the first target script meets the automatic repair condition; if the automatic repair condition is met, the server automatically generates a second target script and sends it to the vehicle terminal; The vehicle-mounted terminal is used to verify the second target script. If the second target script passes the verification, the first target script is replaced by the second target script.
9. The system according to claim 8, characterized in that The vehicle terminal includes a health management module, a business application module and a script management module, wherein: The health management module is used to respond to the business application error message sent by the business application module, parse the business application error message, and the application error message includes at least a business type and a business error type; generate a script error log based on the business application error message; based on the business type and error type, extract the first target script corresponding to the application error message indicated by the script management module; upload the script error log and the first target script to the server.
10. The system according to claim 8, characterized in that The server is also used to perform script error identification based on the script error log and the first target script to obtain a script error type of the first target script, and determine whether the first target script meets an automatic repair condition based on the script error type.