Log level adjustment method and device, electronic equipment and vehicle

By receiving the target log level parameter information of the external diagnostic instrument and adjusting the log level on the vehicle terminal, the problem that the vehicle cannot modify the log level is solved, and more fault diagnosis logs are obtained, and fault analysis efficiency is improved.

CN119003320APending Publication Date: 2024-11-22BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310559568.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-17
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The existing car machine cannot adjust the log level after leaving the factory, resulting in the failure to obtain low-priority logs when there are problems on mass-produced cars, affecting fault diagnosis and analysis.

Method used

By receiving the target log level parameter information sent by the external diagnostic instrument, adjust the actual log level of the log service on the vehicle side to ensure that the timing logical logs suitable for vehicle fault diagnosis can be obtained.

Benefits of technology

The adaptive adjustment of the vehicle log level is realized, so that the vehicle can obtain more logical logs during operation when there are problems, making it easier to diagnose and analyze vehicle failure problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003320A_ABST
    Figure CN119003320A_ABST
Patent Text Reader

Abstract

The invention relates to a log level adjusting method and device, electronic equipment and a vehicle, and relates to the technical field of vehicles, the log level adjusting method comprises the steps that parameter information which is sent by an external diagnostic apparatus and comprises a target log level is received, the parameter information is used for indicating a vehicle terminal to adjust a current actual log level to the target log level, and the target log level is used for adjusting the current actual log level to the target log level; a log corresponding to the target log level comprises at least one sequential logic suitable for vehicle fault diagnosis; and based on the parameter information, adjusting the actual log level of the log service of the vehicle-mounted terminal to the target log level. According to the application, through the external diagnosis service of the external diagnosis instrument, adaptive adjustment of the log level of the vehicle machine can be realized, so that when the vehicle has a problem, the logic log containing more sequential logic suitable for vehicle fault diagnosis can be obtained, and diagnosis analysis of the vehicle fault problem is facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of vehicle technology, and in particular to a log level adjustment method, device, electronic equipment and vehicle. Background Art

[0002] The current car computer is the user version after leaving the factory, and the log level cannot be adjusted in this version. In the Android system, logs are differentiated by levels, and the priorities from left to right are V, D, I, W, E (Verbose, Debug, Info, Warning, Error) from low to high. However, in order to reduce the printing of logs after leaving the factory, only high-priority logs can be printed (for example, only I, W, E level logs can be output). This will result in the inability to obtain low-priority logs when certain problems occur. These low-priority logs contain a lot of sequential logic, which will result in insufficient logs for analysis when some problems occur on mass-produced cars. Summary of the invention

[0003] In view of this, the present application provides a log level adjustment method, device, electronic device and vehicle, which can solve the current problem that the log level of the vehicle computer cannot be modified on mass-produced vehicles and more runtime logical logs cannot be obtained.

[0004] According to a first aspect of the present application, a log level adjustment method is provided, comprising:

[0005] Receiving parameter information including a target log level sent by an external diagnostic instrument, wherein the parameter information is used to instruct the vehicle computer to adjust the current actual log level to the target log level, and the log corresponding to the target log level contains at least one timing logic suitable for vehicle fault diagnosis;

[0006] Based on the parameter information, the actual log level of the log service of the vehicle terminal is adjusted to the target log level.

[0007] In some embodiments of the present disclosure, the method further includes:

[0008] Receiving a session service request sent by an external diagnostic instrument, wherein the session service request is used to instruct the vehicle computer to switch a current session mode to a target session mode, wherein the target session mode is a session mode capable of responding to an external diagnostic routine service;

[0009] In response to the session service request, the current session mode is switched to the target session mode.

[0010] In some embodiments of the present disclosure, the method further includes:

[0011] In the target session mode, the identity authentication information sent by the external diagnostic instrument is received, and the security access verification of the external diagnostic instrument is performed based on the identity authentication information. The security access verification is used to verify whether the external diagnostic instrument has the external diagnostic authority of the vehicle end.

[0012] In some embodiments of the present disclosure, the method further includes:

[0013] A first response message is sent to the external diagnostic instrument, where the first response message is used to indicate that the target session mode has been successfully switched.

[0014] In some embodiments of the present disclosure, the receiving parameter information including the target log level sent by the external diagnostic instrument includes:

[0015] In the case that the external diagnostic instrument has the external diagnostic authority of the vehicle machine end, parameter information including the target log level sent by the external diagnostic instrument through the external diagnostic routine service is received.

[0016] In some embodiments of the present disclosure, adjusting the actual log level of the log service of the vehicle terminal to the target log level based on the parameter information includes:

[0017] By identifying the parameter information, determining the target log level to be adjusted;

[0018] A target interface or a target system property provided by a log service is obtained, and the target log level is written to the target interface or the target system property, so as to adjust the actual log level in the log service to the target log level.

[0019] In some embodiments of the present disclosure, the method further includes:

[0020] Sending second response information to the external diagnostic instrument, where the second response information is used to indicate that the adjustment of the target log level has been completed.

[0021] According to a second aspect of the present application, a log level adjustment device is provided, comprising:

[0022] A receiving module, used for receiving parameter information including a target log level sent by an external diagnostic instrument, wherein the parameter information is used to instruct the vehicle computer to adjust the current actual log level to the target log level, and the log corresponding to the target log level contains at least one timing logic suitable for vehicle fault diagnosis;

[0023] The adjustment module is used to adjust the actual log level of the log service of the vehicle terminal to the target log level based on the parameter information.

[0024] According to a third aspect of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the log level adjustment method described in the first aspect is implemented.

[0025] According to a fourth aspect of the present application, an electronic device is provided, comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the log level adjustment method described in the first aspect when executing the computer program.

[0026] According to a fifth aspect of the present application, a vehicle is provided, comprising: the electronic device as described in the fourth aspect.

[0027] By means of the above technical solution, the present application provides a method, device, electronic device and vehicle for adjusting the log level. For vehicles whose log level cannot be modified, the diagnostic service in the vehicle computer can connect to an external diagnostic instrument, receive parameter information containing the target log level sent by the external diagnostic instrument, and then analyze the parameter information to determine the target log level suitable for vehicle fault diagnosis as indicated by the parameter information, and then write the target log level to the log service on the vehicle computer. For the present application, the external diagnostic service of the external diagnostic instrument can realize adaptive adjustment of the log level on the vehicle computer, so that when there is a problem with the vehicle, more logical logs can be obtained during operation, which is convenient for diagnostic analysis of vehicle fault problems.

[0028] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0030] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0031] Figure 1 A flow chart of a log level adjustment method provided by an embodiment of the present disclosure;

[0032] Figure 2 A schematic diagram of a system structure for adjusting log levels provided by an embodiment of the present disclosure;

[0033] Figure 3 A flow chart of a log level adjustment method provided by another embodiment of the present disclosure;

[0034] Figure 4 A structural diagram of a log level adjustment device provided by an embodiment of the present disclosure;

[0035] Figure 5 A schematic diagram of the structure of a log level adjustment device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0036] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0037] The following describes the log level adjustment method, device, electronic device and vehicle according to the embodiments of the present disclosure with reference to the accompanying drawings.

[0038] The current car computer is a user version after leaving the factory, and the log level cannot be adjusted in this version. In the Android system, logs are differentiated by levels, and the priorities from left to right are V, D, I, W, E (Verbose, Debug, Info, Warning, Error) from low to high. Among them, the lower the log level, the more logical runtimes it contains. However, when the log level is too low, it will occupy more resources and increase the load, which will affect the running speed of the vehicle. Therefore, the log level set for the car computer is relatively high when it leaves the factory.

[0039] However, it is currently impossible to modify the log level of the vehicle computer on mass-produced vehicles. This will result in the inability to obtain low-priority logs when there are certain problems with the vehicle (such as a malfunction). These low-priority logs contain a lot of logical runtime sequences, which will result in insufficient logs for analysis when some problems occur on mass-produced vehicles.

[0040] In order to solve the above technical problems, the present disclosure provides a log level adjustment method, device, electronic device and vehicle, which can solve the problem that the log level of the vehicle computer cannot be modified on mass-produced vehicles and more runtime logical logs cannot be obtained.

[0041] like Figure 1 , an embodiment of the present disclosure provides a log level adjustment method, comprising:

[0042] Step 101: Receive parameter information including a target log level sent by an external diagnostic instrument.

[0043] Among them, the external diagnostic instrument is a diagnostic instrument that can be connected to the vehicle computer to provide external diagnostic services for the vehicle computer. Specifically, it can be an external diagnostic device that supports the vehicle's on-board automatic diagnostic system (the Second On-Board Diagnostics, OBDII), and there is no specific limitation on this. Figure 2 As shown, the vehicle head unit (HU) corresponding to the vehicle may include diagnostic services and log services. The external diagnostic instrument may be connected to the vehicle on-board diagnostic (OBD) interface on the vehicle through a physical connection line, and the vehicle on-board diagnostic interface may be connected to the diagnostic service of the vehicle head unit through Ethernet. The external diagnostic instrument is used to send parameter information to the diagnostic service through the vehicle on-board diagnostic interface, and the parameter information is used to instruct the vehicle head unit to adjust the current actual log level to the target log level. The target log level is the best log level suitable for vehicle fault diagnosis. The log corresponding to the target log level contains at least one timing logic suitable for vehicle fault diagnosis. The timing logic is mainly used to describe and define events occurring within a given time period. It can represent the order of precedence. In this solution, the diagnosis of vehicle problems can be realized based on the timing logic. Among them, the diagnostic service can be responsible for executing the diagnostic service based on the UDS / DoIP protocol inside the vehicle head unit. Specifically, it can handle services corresponding to various UDS service identifiers (Service ID, SID) of the Unified Diagnostic Services (UDS) protocol, such as write services, read services, routine services, etc.

[0044] The execution subject of the present disclosure can be applied to the vehicle computer side, specifically to the diagnostic service of the vehicle computer side. After receiving the parameter information sent by the external diagnostic instrument, the diagnostic service can analyze the parameter information to determine the target log level suitable for vehicle fault diagnosis as indicated by the parameter information, and then write the target log level to the log service of the vehicle computer side to achieve adaptive adjustment of the log level on the vehicle computer.

[0045] Step 102: Based on the parameter information, the actual log level of the log service on the vehicle side is adjusted to the target log level.

[0046] For the disclosed embodiments, the diagnostic service can analyze the parameter information, extract the target log level indicated by the external diagnostic instrument in the parameter information, and then adjust the current actual log level of the vehicle computer to the target log level based on the log level parameters provided by the external diagnostic instrument. Specifically, the current higher priority log level can be adjusted to the optimal log level with a lower priority that can obtain sufficient timing logic for vehicle fault diagnosis.

[0047] In summary, according to the log level adjustment method provided by this application, for vehicles whose log level cannot be modified, the diagnostic service in the vehicle computer can connect to an external diagnostic instrument, receive parameter information containing the target log level sent by the external diagnostic instrument, and then analyze the parameter information to determine the target log level suitable for vehicle fault diagnosis as indicated by the parameter information, and then write the target log level to the log service on the vehicle computer. For this application, the external diagnostic service of the external diagnostic instrument can realize adaptive adjustment of the log level on the vehicle computer, so that when there is a problem with the vehicle, more logical logs can be obtained during operation, which is convenient for diagnostic analysis of vehicle fault problems.

[0048] Further, as a refinement and extension of the above embodiment, in order to fully illustrate the specific implementation process of the method of this embodiment, this embodiment provides the following Figure 3 The specific method shown includes:

[0049] Step 201: receiving a session service request sent by an external diagnostic instrument, and in response to the session service request, switching a current session mode to a target session mode.

[0050] Among them, the session service request is used to instruct the vehicle end to switch the current session mode to the target session mode, the current session mode is the session mode in which the diagnostic service is currently running, and the target session mode is a session mode that can respond to external diagnostic routine services.

[0051] In specific application scenarios, the diagnostic service can be configured with multiple session modes suitable for different communication scenarios, and can implement switching control between different session modes. After receiving the session service request sent by the external diagnostic instrument, if the diagnostic service determines that the current session mode cannot respond to the external diagnostic routine service or cannot support the security access verification of the external diagnostic instrument, it can respond to the session service request sent by the external diagnostic instrument and switch the current session mode to a target session mode that can respond to the external diagnostic routine service and can support the security access verification of the external diagnostic instrument.

[0052] Accordingly, after the diagnostic service successfully switches the current session mode to the target session mode, in order to prompt the external diagnostic instrument to perform subsequent data interaction processes to improve the efficiency of the diagnostic service, the diagnostic service may send a first response message to the external diagnostic instrument, wherein the first response message is used to indicate that the target session mode has been successfully switched.

[0053] Step 202: In the target session mode, the identity authentication information sent by the external diagnostic instrument is received, and security access verification is performed on the external diagnostic instrument based on the identity authentication information. The security access verification is used to verify whether the external diagnostic instrument has external diagnostic authority on the vehicle side.

[0054] In specific application scenarios, after receiving the first response information sent by the diagnostic service, the external diagnostic instrument can send identity authentication information to the diagnostic service for further security access verification. Only after passing the security access verification can it provide external diagnostic services to the vehicle computer. This is for security reasons, to ensure that not all external devices can modify the log level inside the vehicle computer at will.

[0055] Correspondingly, for the disclosed embodiment, after receiving the identity authentication information sent by the external diagnostic instrument, the diagnostic service can further perform security access verification of the external diagnostic authority of the external diagnostic instrument based on the identity authentication information. Among them, the verification method of the security access verification includes but is not limited to application programming interface (Application Programming Interface, API) key verification, hypertext transfer protocol (Hypertext Transfer Protocol, HTTP) identity authentication, open standard (Json Web Token, JWT) identity authentication, etc., which are not specifically limited here. The identity authentication information is the auxiliary verification information that the external diagnostic instrument needs to cooperate with to send to the diagnostic service under the corresponding security access verification method. Exemplarily, taking the security access verification method as API key verification as an example, the identity authentication information sent by the external diagnostic instrument can be an API key. After receiving the API key, the diagnostic service can verify whether the API key matches the API key set by itself. If it matches, it is determined that the external diagnostic instrument passes the security access verification.

[0056] Step 203 : When the external diagnostic instrument has the external diagnostic authority of the vehicle computer, receive parameter information including the target log level sent by the external diagnostic instrument through the external diagnostic routine service.

[0057] In a specific application scenario, when a vehicle breaks down, an external diagnostic instrument that establishes a secure access connection with the vehicle computer can determine the target log level applicable to vehicle fault diagnosis. When determining the target log level applicable to vehicle fault diagnosis, as a possible implementation method, the external diagnostic instrument can receive the target log level set manually, that is, after a problem occurs in the vehicle, the target log level applicable to vehicle fault diagnosis is determined manually based on empirical analysis and the evaluation criteria corresponding to the log level, and then the target log level is entered into the external diagnostic instrument, so as to adjust the log level on the vehicle computer based on the external diagnostic instrument; as a possible implementation method, the external diagnostic instrument can also receive vehicle fault data, and then diagnose and determine the target log level applicable to vehicle fault diagnosis in combination with the evaluation criteria corresponding to the log level and through analysis of the vehicle fault data; as a possible implementation method, the vehicle computer can also be configured with an arbitration module, and after a problem occurs in the vehicle, the vehicle computer can upload the vehicle fault data to the arbitration module, and the arbitration module can diagnose and determine the target log level applicable to vehicle fault diagnosis in combination with the evaluation criteria corresponding to the log level and through analysis of the vehicle fault data, and then the target log level is entered into the external diagnostic instrument, so as to adjust the log level on the vehicle computer based on the external diagnostic instrument. It should be noted that, when determining the target log level applicable to vehicle fault diagnosis, the external diagnostic instrument may also include other possible implementation methods, which are not specifically limited here.

[0058] Correspondingly, after the external diagnostic instrument determines the target log level suitable for vehicle fault diagnosis, it can also generate parameter information corresponding to the target log level, and send the parameter information to the diagnostic service on the vehicle side through the external diagnostic routine service. Specifically, in order to enable the external diagnostic instrument to successfully send the parameter information corresponding to the target log level to the vehicle side, a service identifier (Service ID, SID) supported by UDS can be added to the external diagnostic routine service, and software logic for reading / writing log levels can be added to the diagnostic service corresponding to the vehicle side, so that the diagnostic service can read the target log level in the parameter information sent by the external diagnostic instrument, and write the target log level to the log service in the vehicle side.

[0059] Among them, the parameter information may include a diagnostic service identifier, a sub-function, a routine identifier, a log level parameter, or may also include other parameters that can be used to indicate the target log level, which is not specifically limited here. In the following embodiment steps of the present disclosure, the technical solution in the present disclosure is described by taking the parameter information including the diagnostic service identifier, the sub-function, the routine identifier, and the log level parameter as an example, but it does not constitute a specific limitation. Among them, the diagnostic service identifier and the sub-function are in the protocol standard format, the diagnostic service identifier is used to indicate the diagnostic service (such as write service, read service, routine service, etc.) implemented based on the Unified Diagnostic Services (UDS) / diagnostic protocol (Diagnostic communication over Internet Protocol, DoIP) based on the vehicle Ethernet, the sub-function is used to indicate that the diagnostic service is to pass the log level parameter to the vehicle computer, the routine identifier is used to indicate the parameter identifier corresponding to multiple log levels, and the log level parameter is used to indicate the target log level that needs to be adjusted.

[0060] For the disclosed embodiment, when the parameter information includes a diagnostic service identifier, a sub-function, a routine identifier, and a log level parameter, the parameter structure corresponding to the parameter information sent by the external diagnostic instrument may be: SID (0x31) + sub function (1) + DID (e.g., 0x1234) + Log level parameter (0-4), wherein SID (0x31) is a diagnostic service identifier, 0x31 is a Unified Diagnostic Services (UDS) routine; sub function (1) is a sub-function; DID is a routine identifier, 0x1234, indicating that the routine contains 5 log level parameters, and these 5 log level parameters (setting parameter identifiers 0-4) correspond to 5 log levels, such as: Verbose, Debug, Info, Warning, Error in the log level; Log level parameter (0-4) is one of the log level parameters indicated by the 5 log level parameters (0-4). For example, the complete parameter information adjusted to the Debug level may be 31 01 1234 1.

[0061] Step 204: Based on the parameter information, the actual log level of the log service on the vehicle side is adjusted to the target log level.

[0062] Following step 203 of the embodiment, when the parameter information includes a diagnostic service identifier, a sub-function, a routine identifier, and a log level parameter, for the disclosed embodiment, the parameter identifiers corresponding to different log levels can be determined based on the routine identifier, and then the target log level indicated by the parameter information can be determined by identifying the parameter identifier corresponding to the log level parameter. Specifically, in order to achieve the purpose of an external diagnostic instrument being able to adjust the vehicle log level, a routine data identifier (Data Identifier, DID) such as 0x1234 can be newly added to the diagnostic service and the external diagnosis respectively. It is identified that the routine contains 5 log level parameters, and these 5 log level parameters (parameter identifiers 0-4) correspond to the 5 levels of the log respectively. By adding the routine data identifier in the diagnostic service and the external diagnosis at the same time, it is convenient for the diagnostic service to determine that the parameter information sent by the external diagnostic instrument is used to indicate the adjustment of the current log level, and to determine the target log level indicated by the log level parameter based on the routine data identifier. For example, the routine data identifier corresponds to the parameter identifiers of five log level parameters: 0, 1, 2, 3, and 4. The above five parameter identifiers are respectively used to indicate the log levels: Verbose, Debug, Info, Warning, and Error. When the log level parameter in the parameter information is 0, it can be determined based on the routine data identifier that the target log level indicated by the parameter information is Verbose.

[0063] Correspondingly, for the embodiments of the present disclosure, the steps of the embodiments may include: determining the target log level that needs to be adjusted by identifying parameter information; obtaining the target interface or target system properties provided by the log service, and writing the target log level to the target interface or target system properties to adjust the actual log level in the log service to the target log level.

[0064] In a specific application scenario, after the current log level in the log service is adjusted to the target log level, a positive response can be returned to the external diagnostic instrument through the standard diagnostic protocol to indicate that the business process of log level adjustment is completed. Accordingly, the embodiment steps also include: sending a second response message to the external diagnostic instrument, and the second response message is used to indicate that the adjustment of the target log level has been completed.

[0065] In summary, according to the log level adjustment method provided by the present application, for vehicles whose log level cannot be modified, the diagnostic service in the vehicle computer can connect to an external diagnostic instrument, receive parameter information containing the target log level sent by the external diagnostic instrument, and then determine the target log level suitable for vehicle fault diagnosis as indicated by the parameter information by analyzing the parameter information, and then write the target log level to the log service on the vehicle computer. For the present application, the external diagnostic service of the external diagnostic instrument can realize adaptive adjustment of the log level on the vehicle computer, so that when there is a problem, the vehicle can obtain more logical logs during operation, which is convenient for diagnostic analysis of vehicle fault problems. In addition, before allowing the external diagnostic instrument to provide external diagnostic services, the diagnostic service can also perform security access verification on the external diagnostic instrument, so as to ensure the security of log level adjustment.

[0066] Based on the above Figure 1 , Figure 3 The specific implementation of the method shown in this embodiment provides a log level adjustment device, such as Figure 4 As shown, the device comprises:

[0067] The receiving module 31 can be used to receive parameter information including a target log level sent by an external diagnostic instrument, wherein the parameter information is used to instruct the vehicle computer to adjust the current actual log level to the target log level, and the log corresponding to the target log level contains at least one timing logic suitable for vehicle fault diagnosis;

[0068] The adjustment module 32 may be used to adjust the actual log level of the log service at the vehicle terminal to the target log level based on the parameter information.

[0069] In specific application scenarios, such as Figure 5 As shown, the device further includes: a switching module 33;

[0070] The receiving module 31 can also be used to receive a session service request sent by an external diagnostic instrument, the session service request is used to instruct the vehicle terminal to switch the current session mode to a target session mode, the target session mode is a session mode that can respond to the external diagnostic routine service;

[0071] The switching module 33 may be configured to switch the current session mode to a target session mode in response to a session service request.

[0072] In a specific application scenario, the receiving module 31 can also be used to receive the identity authentication information sent by the external diagnostic instrument in the target session mode, and perform security access verification on the external diagnostic instrument based on the identity authentication information. The security access verification is used to verify whether the external diagnostic instrument has external diagnostic authority on the vehicle side.

[0073] In specific application scenarios, such as Figure 5As shown, the device further includes: a sending module 34;

[0074] The sending module 34 may be used to send a first response message to the external diagnostic instrument, where the first response message is used to indicate that the target session mode has been successfully switched.

[0075] In a specific application scenario, the receiving module 31 can be used to receive parameter information including a target log level sent by the external diagnostic instrument through the external diagnostic routine service when the external diagnostic instrument has the external diagnostic authority of the vehicle terminal.

[0076] In a specific application scenario, the adjustment module 32 can be used to determine the target log level that needs to be adjusted by identifying parameter information; obtain the target interface or target system properties provided by the log service, and write the target log level to the target interface or target system properties to adjust the actual log level in the log service to the target log level.

[0077] In a specific application scenario, the sending module 34 may also be used to send a second response message to the external diagnostic instrument, where the second response message is used to indicate that the adjustment of the target log level has been completed.

[0078] It should be noted that for other corresponding descriptions of the functional units involved in the log level adjustment device provided in this embodiment, please refer to Figure 1 and Figure 3 The corresponding description in will not be repeated here.

[0079] Based on the above Figure 1 and Figure 3 The method shown in the embodiment also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned Figure 1 and Figure 3 The method shown.

[0080] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of the present application.

[0081] Based on the above Figure 1 and Figure 3 The method shown, and Figure 4 and Figure 5In order to achieve the above-mentioned purpose, the embodiment of the present application also provides an electronic device that can be configured on the vehicle (such as an electric vehicle) side, and the device includes a storage medium and a processor; the storage medium is used to store a computer program; the processor is used to execute the computer program to achieve the above-mentioned Figure 1 and Figure 3 The method shown.

[0082] Optionally, the above-mentioned physical device may also include a user interface, a network interface, a camera, a radio frequency (RF) circuit, a sensor, an audio circuit, a WI-FI module, etc. The user interface may include a display, an input unit such as a keyboard, etc., and the optional user interface may also include a USB interface, a card reader interface, etc. The network interface may optionally include a standard wired interface, a wireless interface (such as a WI-FI interface), etc.

[0083] Those skilled in the art will appreciate that the above-mentioned physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or a combination of certain components, or different arrangements of components.

[0084] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the above-mentioned physical device, and supports the operation of the information processing program and other software and / or programs. The network communication module is used to realize the communication between the components inside the storage medium, and the communication with other hardware and software in the information processing physical device.

[0085] Based on the above electronic device, the embodiment of the present application further provides a vehicle, which may specifically include: the above electronic device. The vehicle may specifically be an electric car, etc.

[0086] Through the description of the above implementation methods, those skilled in the art can clearly understand that the present application can be implemented by means of software plus the necessary general hardware platform, or by hardware. The technical solution disclosed in the present invention, for vehicles that cannot modify the log level, the diagnostic service in the vehicle computer can be connected to an external diagnostic instrument, receive parameter information containing the target log level sent by the external diagnostic instrument, and then determine the target log level suitable for vehicle fault diagnosis as indicated by the parameter information by analyzing the parameter information, and then write the target log level to the log service on the vehicle computer. For the present application, the adaptive adjustment of the log level on the vehicle computer can be achieved through the external diagnostic service of the external diagnostic instrument, so that when there is a problem, the vehicle can obtain more logical logs during operation, which is convenient for the diagnosis and analysis of vehicle fault problems. In addition, before allowing the external diagnostic instrument to provide external diagnostic services, the diagnostic service can also perform security access verification on the external diagnostic instrument, so as to ensure the security of the log level adjustment.

[0087] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0088] The above is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features applied for herein.

Claims

1. A log level adjustment method, characterized in that: Applied to the vehicle side, including: Receiving parameter information including a target log level sent by an external diagnostic instrument, wherein the parameter information is used to instruct the vehicle computer to adjust the current actual log level to the target log level, and the log corresponding to the target log level contains at least one timing logic suitable for vehicle fault diagnosis; Based on the parameter information, the actual log level of the log service of the vehicle terminal is adjusted to the target log level.

2. The method according to claim 1, characterized in that: The method further comprises: Receiving a session service request sent by an external diagnostic instrument, wherein the session service request is used to instruct the vehicle computer to switch a current session mode to a target session mode, wherein the target session mode is a session mode capable of responding to an external diagnostic routine service; In response to the session service request, the current session mode is switched to the target session mode.

3. The method according to claim 2, characterized in that The method further comprises: In the target session mode, the identity authentication information sent by the external diagnostic instrument is received, and the security access verification of the external diagnostic instrument is performed based on the identity authentication information. The security access verification is used to verify whether the external diagnostic instrument has the external diagnostic authority of the vehicle end.

4. The method according to claim 2, characterized in that: The method further comprises: A first response message is sent to the external diagnostic instrument, where the first response message is used to indicate that the target session mode has been successfully switched.

5. The method according to claim 3, characterized in that: The receiving parameter information containing the target log level sent by the external diagnostic instrument includes: In the case that the external diagnostic instrument has the external diagnostic authority of the vehicle machine end, parameter information including the target log level sent by the external diagnostic instrument through the external diagnostic routine service is received.

6. The method according to claim 5, characterized in that The adjusting the actual log level of the log service of the vehicle terminal to the target log level based on the parameter information includes: By identifying the parameter information, determining the target log level to be adjusted; A target interface or a target system property provided by a log service is obtained, and the target log level is written to the target interface or the target system property, so as to adjust the actual log level in the log service to the target log level.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Sending second response information to the external diagnostic instrument, where the second response information is used to indicate that the adjustment of the target log level has been completed.

8. A log level adjustment device, characterized in that: Applied to the vehicle side, including: A receiving module, used for receiving parameter information including a target log level sent by an external diagnostic instrument, wherein the parameter information is used to instruct the vehicle computer to adjust the current actual log level to the target log level, and the log corresponding to the target log level contains at least one timing logic suitable for vehicle fault diagnosis; The adjustment module is used to adjust the actual log level of the log service of the vehicle terminal to the target log level based on the parameter information.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

10. An electronic device comprising a storage medium, a processor, and a computer program stored in the storage medium and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 7 is implemented.

11. A vehicle, characterized in that: include: The electronic device as claimed in claim 10.