Remote log pulling method and device, computer equipment and storage medium

By implementing the remote log pull method on the car machine's main chip, the problem that the car machine cannot extract logs across chips and systems is solved, efficient log data processing is achieved, and labor costs are saved.

CN120238532APending Publication Date: 2025-07-01WUHAN LOTUS CARS CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202311852395.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2025-07-01

AI Technical Summary

Technical Problem

The prior art cannot realize the extraction of logs across chips and systems of vehicles, resulting in low log data processing efficiency.

Method used

By implementing the remote log pull method on the main chip of the vehicle machine, obtain the log pull task issued by the server, analyze the task, determine the type of log to be extracted, select the cross-chip or cross-system log extraction strategy, and extract and upload the corresponding log data.

Benefits of technology

It realizes log extraction across chips and systems of the vehicle machine, improves log data processing efficiency, does not require manual travel to the site, and saves labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120238532A_ABST
    Figure CN120238532A_ABST
Patent Text Reader

Abstract

The invention relates to a remote log pulling method and device, computer equipment and a storage medium. The method comprises the following steps: acquiring a log pulling task issued by a server; analyzing the log pulling task, and determining a to-be-extracted log type; determining a chip identifier and a system identifier corresponding to the log type; selecting a corresponding log extraction strategy according to the chip identifier and the system identifier, and extracting log data corresponding to the log type based on the log extraction strategy; the log extraction strategy comprises a cross-chip log extraction strategy or a cross-system log extraction strategy; and for the log pulling task, uploading log data to the server. By the adoption of the method, cross-chip and cross-system log extraction of the vehicle-mounted terminal can be achieved, the corresponding log data can be remotely uploaded according to the remotely issued log pulling task, workers do not need to go to the site, the labor cost is saved, and the log data processing efficiency of the vehicle-mounted terminal is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of vehicles, and particularly to a method, device, computer device, and storage medium for remotely pulling logs. Background Art

[0002] With the rapid development of vehicle assisted driving technology, the hardware integration of in-vehicle computers has been gradually improved. In order to run more applications, multiple chips are provided at the hardware level of the in-vehicle computer, and operating systems such as QNX and Android are installed at the software level. In order to eliminate in-vehicle computer anomalies or facilitate developers to analyze problems with the help of logs, a method for querying in-vehicle computer logs needs to be provided. Currently, professional technicians generally connect to the in-vehicle computer on-site through a computer to retrieve and view the logs. This method requires professional technicians to go to the site, and the current log acquisition method cannot cross systems and chips, resulting in low efficiency in processing log data of the in-vehicle computer. Summary of the Invention

[0003] Based on this, in view of the above technical problems, it is necessary to provide a method, device, computer device, and computer-readable storage medium for remotely pulling logs, which can realize cross-chip and cross-system extraction of logs from the in-vehicle computer and improve the efficiency of processing log data of the in-vehicle computer.

[0004] In a first aspect, the present application provides a method for remotely pulling logs. The method for remotely pulling logs is applied to the main chip of the in-vehicle computer. The in-vehicle computer is provided with a main chip and at least one slave chip, and the main chip is provided with a main system and at least one slave system. The method includes:

[0005] Obtain a log pulling task sent by the server;

[0006] Parse the log pulling task to determine the type of log to be extracted;

[0007] Determine the chip identifier and system identifier corresponding to the log type;

[0008] Select a corresponding log extraction strategy according to the chip identifier and the system identifier, and extract log data corresponding to the log type based on the log extraction strategy; the log extraction strategy includes a cross-chip log extraction strategy or a cross-system log extraction strategy;

[0009] Upload the log data to the server for the log pulling task.

[0010] In one of the embodiments, the selecting a corresponding log extraction strategy according to the chip identifier and the system identifier includes:

[0011] When the chip identifier indicates the main chip and the system identifier indicates the target slave system, select a cross-system log extraction strategy;

[0012] Extracting the log data corresponding to the log type based on the log extraction policy includes:

[0013] Invoking a preset interface to mount the log data matching the log type in the system to the main system directory;

[0014] Extracting the log data corresponding to the log type from the main system directory.

[0015] In one embodiment, the selecting the corresponding log extraction policy according to the chip identifier and the system identifier includes:

[0016] When the chip identifier indicates a target slave chip, selecting a cross-chip log extraction policy;

[0017] The extracting the log data corresponding to the log type based on the log extraction policy includes:

[0018] Communicating with the target slave chip through a preset protocol to instruct the target slave chip to extract the log data corresponding to the log type from a preset storage area and feedback the log data.

[0019] In one embodiment, after uploading the log data to the server for the log pulling task, the method further includes:

[0020] Invoking the preset interface to mount the log data mounted in the main system directory back to the target slave system directory.

[0021] In one embodiment, the determining the chip identifier and the system identifier corresponding to the log type includes:

[0022] Determining at least one application program corresponding to the log type;

[0023] Determining the system identifier and the chip identifier corresponding to the application program; the system indicated by the system identifier is used to run the application program, and the chip indicated by the chip identifier is used to carry the system indicated by the system identifier.

[0024] In one embodiment, after uploading the log data to the server for the log pulling task, the method further includes:

[0025] After the log data is successfully uploaded, deleting the log pulling task and the compressed file corresponding to the log pulling task.

[0026] In one embodiment, the uploading the log data to the server for the log pulling task includes:

[0027] Obtain the encryption information corresponding to the log pulling task;

[0028] Encrypt the log data according to the encryption information to obtain encrypted log data;

[0029] For the log pulling task, upload the encrypted log data to the server.

[0030] In a second aspect, the present application also provides a remote log pulling device. The remote log pulling device is applied to the main chip of the in-vehicle computer. The in-vehicle computer is provided with a main chip and at least one slave chip, and the main chip is provided with a main system and at least one slave system. The device includes:

[0031] An obtaining module, configured to obtain a log pulling task sent by the server;

[0032] An analyzing module, configured to analyze the log pulling task to determine the log type to be extracted;

[0033] A determining module, configured to determine the chip identifier and system identifier corresponding to the log type;

[0034] An extracting module, configured to select a corresponding log extraction policy according to the chip identifier and the system identifier, and extract log data corresponding to the log type based on the log extraction policy; the log extraction policy includes a cross-chip log extraction policy or a cross-system log extraction policy;

[0035] An uploading module, configured to upload the log data to the server for the log pulling task.

[0036] In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0037] Obtain a log pulling task sent by the server;

[0038] Analyze the log pulling task to determine the log type to be extracted;

[0039] Determine the chip identifier and system identifier corresponding to the log type;

[0040] Select a corresponding log extraction policy according to the chip identifier and the system identifier, and extract log data corresponding to the log type based on the log extraction policy; the log extraction policy includes a cross-chip log extraction policy or a cross-system log extraction policy;

[0041] Upload the log data to the server for the log pulling task.

[0042] Fourthly, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:

[0043] Obtain the log pulling task sent by the server;

[0044] Parse the log pulling task to determine the log type to be extracted;

[0045] Determine the chip identifier and system identifier corresponding to the log type;

[0046] Select the corresponding log extraction policy according to the chip identifier and the system identifier, and extract the log data corresponding to the log type based on the log extraction policy; the log extraction policy includes a cross-chip log extraction policy or a cross-system log extraction policy;

[0047] Upload the log data to the server for the log pulling task.

[0048] The above remote log pulling method, device, computer device and storage medium obtain the log pulling task sent by the server; parse the log pulling task to determine the log type to be extracted; determine the chip identifier and system identifier corresponding to the log type; select the corresponding log extraction policy according to the chip identifier and the system identifier, and extract the log data corresponding to the log type based on the log extraction policy; the log extraction policy includes a cross-chip log extraction policy or a cross-system log extraction policy; upload the log data to the server for the log pulling task. Through the above method, the task remotely sent by the server is parsed, and the cross-chip or cross-system log extraction policy is executed according to the task to extract the corresponding log data, realizing cross-chip and cross-system log extraction of the in-vehicle unit; for the remotely sent log pulling task, the corresponding log data is remotely uploaded, eliminating the need for manual on-site visits, saving labor costs, and improving the log data processing efficiency of the in-vehicle unit. Description of the Drawings

[0049] Figure 1 It is an application environment diagram of the remote log pulling method in an embodiment;

[0050] Figure 2 It is a flowchart of the remote log pulling method in an embodiment;

[0051] Figure 3 It is a flowchart of the cross-system log extraction steps in an embodiment;

[0052] Figure 4Schematic flowchart of the cross-chip log extraction step in an embodiment;

[0053] Figure 5 Schematic flowchart of the specific process of the remote log pulling method in an example;

[0054] Figure 6 Block diagram of the structure of the remote log pulling device in an embodiment;

[0055] Figure 7 Internal structure diagram of a computer device in an embodiment. Detailed implementation manners

[0056] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0057] The remote log pulling method provided by the embodiments of the present application can be applied to an application environment as Figure 1 shown. Among them, the vehicle-mounted device 102 and the terminal 106 communicate with the server 104 through a network, and the data storage system can store the data that the server 104 needs to process. In one implementation, the terminal 106 can send a log acquisition request to the server 104, and the server 104 sends a log pulling task to the vehicle-mounted device 102 according to the log acquisition request. In response to the log pulling task, the vehicle-mounted device 102 extracts corresponding log data through a cross-chip or cross-system log extraction strategy and uploads it to the server 104. Among them, the server 104 can also send the log data uploaded by the vehicle-mounted device 102 or stored in the data storage system to the terminal 106. Among them, the data storage system can be integrated on the server 104, or placed in the cloud or other network servers. Among them, the terminal 106 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0058] In one embodiment, as Figure 2 shown, a remote log pulling method is provided. The remote log pulling method is applied to the main chip of the vehicle-mounted device. The vehicle-mounted device is provided with a main chip and at least one slave chip, and the main chip is provided with a main system and at least one slave system. The method includes the following steps:

[0059] Step 202, obtain the log pulling task sent by the server.

[0060] Among them, the car computer refers to the vehicle-mounted terminal equipment installed on the vehicle, which integrates information and entertainment functions. In order to adapt to the increasingly enhanced intelligent needs, the hardware and software configurations of the car computer are gradually increasing, and the traditional log extraction method cannot realize cross-chip and cross-system log extraction, resulting in low efficiency of log data processing of the car computer. The method of this embodiment is applied to the main chip of the car computer. The car computer is provided with a main chip and one or more slave chips. For example, the car computer adopts dual 8155 chips, and the main chip is deployed with a main system and one or more slave systems. Among them, the slave chip (Master chip) runs applications that occupy a large performance, such as navigation, and the master chip (Slave chip) runs applications that occupy a small performance. The main system of this embodiment is the Android system, and the slave system can be a QNX system, a Linux system, etc., which is not limited in this embodiment.

[0061] The server sends a log pull task to the vehicle computer under the operation of the user, or triggered by the log acquisition request submitted by the terminal, or triggered by the abnormal feedback of the vehicle computer. In one implementation, the log pull task includes information such as the VIN code, log type (or log scene), and log interception time period. The VIN code (Vehicle Identification Number) is convenient for the server to distinguish different vehicle computers and send the log pull task to the vehicle computer corresponding to the VIN code. The log interception time period can be a null value.

[0062] Step 204: parse the log pulling task to determine the type of log to be extracted.

[0063] In one implementation, the log pull task carries information about the log type, and the log pull task is parsed to read the log type from a first preset position of the parsed data, and the first preset position corresponds to the log type field. In one implementation, the log pull task carries information about the log scene, and the log pull task is parsed to read the log scene from a second preset position of the parsed data, and one or more log types that match the current log scene are determined based on a preset scene type mapping relationship, and the second preset position corresponds to the log scene field.

[0064] Among them, the Android system of the main chip of the in-vehicle infotainment system calls the logd process to collect, process, and store log information from applications, and records the logs of various abnormal scenarios. For example, ANR logs (Application Not Responding logs), network tcpdump logs, native exception logs, tombstones logs, etc. During the log collection and processing process, the ROM classifies and transfers various types of logs to the specified path files through the logcat module. Logcat is a command-line tool in the Android system, which is used to read and display log messages from various application programs and system components from the logd process. In one implementation, the logs are divided into system logs, application logs, exception logs, and non-exception logs. The system stores the logs in different directories according to different scenarios. For example, in system directories such as data / anr / , data / log / , data / tcpdump / , etc. In one implementation, the logs collected by the in-vehicle infotainment system are sorted by time and stored in a cyclic storage and compression manner. After exceeding the specified number of compressed packages and / or exceeding the total size limit, the logs with the earliest storage time are deleted.

[0065] Step 206, determine the chip identifier and system identifier corresponding to the log type.

[0066] Among them, the chip identifier is used to distinguish different chips, and the system identifier is used to distinguish different systems. In one implementation, if the log type is an application log, determine at least one corresponding application program, determine the system and chip running the application program, so as to determine the chip identifier and system identifier. In one implementation, if the log type is a system log, determine at least one corresponding system, and determine the chip setting the system, so as to determine the chip identifier and system identifier. In one implementation, if the log type is an exception log and a non-exception log, determine at least one system that can generate the log of this log type, and determine the chip setting the system, so as to determine the chip identifier and system identifier.

[0067] Step 208, select the corresponding log extraction policy according to the chip identifier and the system identifier, and extract the log data corresponding to the log type based on the log extraction policy; the log extraction policy includes a cross-chip log extraction policy or a cross-system log extraction policy.

[0068] Among them, the log extraction policy is a pre-set method for extracting log data from different chips and different systems. The pre-set log extraction policies include a cross-chip log extraction policy, a cross-system log extraction policy, and a local log extraction policy. For the log data of the main chip and the main system, the local log extraction policy is adopted; for the log data of the main chip and the slave system, the cross-system log extraction policy is adopted; for the log data of the slave chip, the cross-chip log extraction policy is adopted.

[0069] In one implementation, the log pulling task carries information about the log truncation time period. When executing the log extraction policy, log data corresponding to the log type and the log truncation time period is extracted.

[0070] Step 210: Upload the log data to the server for the log pulling task.

[0071] Among them, the in-vehicle unit responds to the log pulling task, uploads the extracted log data to the server. The server sends the received log data to the terminal for display and / or stores the received log data. The server can aggregate and analyze the logs and provide a log query function for easy query and analysis by the terminal. In one implementation, the in-vehicle unit compresses the log data and uploads the compressed data to the server to improve the data transmission efficiency.

[0072] Among them, the in-vehicle unit pre-installs an application in the ROM to receive the log pulling task. After receiving the log pulling task, it returns the log data that meets the requirements. The log data includes but is not limited to system logs and non-system logs. When the log pulling fails, it feedbacks failure information to the server. The failure information includes the detailed failure reason, for example, response timeout, no log data meeting the requirements is found, etc.

[0073] In the above remote log pulling method, obtain the log pulling task sent by the server; parse the log pulling task to determine the log type to be extracted; determine the chip identifier and system identifier corresponding to the log type; select the corresponding log extraction policy according to the chip identifier and system identifier, and extract the log data corresponding to the log type based on the log extraction policy; the log extraction policy includes a cross-chip log extraction policy or a cross-system log extraction policy; upload the log data to the server for the log pulling task. Through the above method, the task remotely sent by the server is parsed, and the cross-chip or cross-system log extraction policy is executed according to the task to extract the corresponding log data, realizing the in-vehicle unit to extract logs across chips and across systems; for the remotely sent log pulling task, the corresponding log data is remotely uploaded, without the need for manual on-site visit, saving labor costs and improving the log data processing efficiency of the in-vehicle unit.

[0074] In one embodiment, as Figure 3 shown, the selecting the corresponding log extraction policy according to the chip identifier and the system identifier includes:

[0075] Step 302: Select a cross-system log extraction policy when the chip identifier indicates the main chip and the system identifier indicates the target slave system.

[0076] Among them, the target slave system is any slave system set by the main chip. When the log type corresponds to the log data of the main chip's slave system, a cross-system log extraction strategy is selected.

[0077] Extracting the log data corresponding to the log type based on the log extraction strategy includes:

[0078] Step 304: Call a preset interface to mount the log data matching the log type in the target slave system under the main system directory.

[0079] Step 306: Extract the log data corresponding to the log type from the main system directory.

[0080] Among them, the specific extraction method for implementing the cross-system log extraction strategy is: call a preset interface to mount the log data of the slave system under the main system directory, and the in-vehicle unit extracts the log data from the main system directory of the main chip. For example, if the main system is the Android system and the slave system is the QNX system, when extracting logs, the logs of the QNX system are mounted to the Android directory. The preset interface is a reserved interface that facilitates the transfer of log data from the slave system to the main system.

[0081] In this embodiment, by selecting a cross-system log extraction strategy when the chip identifier indicates the main chip and the system identifier indicates the target slave system; calling a preset interface to mount the log data matching the log type in the target slave system under the main system directory; and extracting the log data corresponding to the log type from the main system directory, it is possible to implement the in-vehicle unit to extract logs across systems, match the in-vehicle unit with multiple systems set, and improve the processing efficiency of the log data of the in-vehicle unit.

[0082] In one embodiment, after step 210 for the log pulling task, the method further includes: calling the preset interface to mount the log data mounted in the main system directory back under the target slave system directory.

[0083] Among them, after using the log data of the slave system, the used log data is mounted back under the corresponding directory of the target slave system through a preset interface. This realizes the timely cleaning of the data in the main system directory, avoids too much log data in the main system directory affecting the subsequent log extraction process, and improves the processing efficiency of the log data of the in-vehicle unit.

[0084] In one embodiment, as Figure 4 shown, selecting the corresponding log extraction strategy according to the chip identifier and the system identifier includes:

[0085] Step 402: When the chip identifier indicates the target slave chip, select a cross-chip log extraction strategy.

[0086] The target slave chip is any slave chip set in the vehicle computer. When the log type corresponds to the log data of the slave chip, a cross-chip log extraction strategy is selected.

[0087] The extracting log data corresponding to the log type based on the log extraction strategy includes:

[0088] Step 404 , communicating with the target slave chip through a preset protocol to instruct the target slave chip to extract log data corresponding to the log type from a preset storage area and feed back the log data.

[0089] The preset protocol is a communication protocol set in advance, for example, the SOME / IP protocol or the TFTP protocol. In one implementation, the specific extraction method for executing the cross-chip log extraction strategy is: the master chip communicates with the target slave chip through the preset protocol, and sends a message including the log type and the log interception time period to the target slave chip to instruct the target slave chip to extract the log data corresponding to the log type and the log interception time period from the preset storage area, and feeds the extracted log data back to the master chip.

[0090] In this embodiment, when the chip identifier indicates the target slave chip, a cross-chip log extraction strategy is selected; communication with the target slave chip is performed through a preset protocol to instruct the target slave chip to extract log data corresponding to the log type from the preset storage area and feed back the log data. This enables the vehicle computer to extract logs across chips and match vehicle computers with multiple chips, thereby improving the log data processing efficiency of the vehicle computer.

[0091] In one embodiment, step 206 includes: determining at least one application corresponding to the log type; determining a system identifier and a chip identifier corresponding to the application; the system indicated by the system identifier is used to run the application, and the chip indicated by the chip identifier is used to carry the system indicated by the system identifier.

[0092] Wherein, when the log type is an application log, at least one application indicated by the log pulling task is determined, and for each application, the identifier of the system running the targeted application is determined, and the identifier of the chip corresponding to the system running the application is determined. In one implementation, multiple applications corresponding to the log type are respectively run on different chips or different systems. For the system identifier and chip identifier corresponding to each application, a corresponding log extraction strategy is selected to extract the corresponding log data across chips, systems or locally, and the main chip integrates and feeds back to the server.

[0093] In one embodiment, after the step 210, the method further includes: after the log data is successfully uploaded, deleting the log pulling task and the compressed file corresponding to the log pulling task.

[0094] Wherein, the compressed file is a temporary file generated by the in-vehicle unit in response to the log pulling task. After the log data is successfully uploaded, the received messages and the temporary files created for the log pulling task are deleted, realizing the slimming operation of the in-vehicle unit's memory and saving the storage resources of the in-vehicle unit.

[0095] In one embodiment, the step 210 includes: obtaining the encryption information corresponding to the log pulling task; encrypting the log data according to the encryption information to obtain encrypted log data; and uploading the encrypted log data to the server for the log pulling task.

[0096] Wherein, the encryption information can be a public key. The in-vehicle unit encrypts the log data according to the public key, uploads the decrypted log data to the server, and the server decrypts the encrypted log data according to its own set private key to obtain the decrypted log data, and stores or feeds back the decrypted log data to the terminal. In this way, the security of remote log extraction is improved.

[0097] Refer to Figure 5 , in one example, the server receives the log type to be retrieved selected by the user as needed, the push service encapsulates the data according to the corresponding protocol, and sends the encapsulated task message to the in-vehicle unit. The in-vehicle unit parses the task message to determine the log type to be extracted, extracts the corresponding log data from the main chip, slave chip or slave system according to the log type, and uploads the extracted log data to the server, realizing cross-chip and cross-system log extraction and improving the processing efficiency of the in-vehicle unit's log data.

[0098] It should be understood that although the steps in the flowcharts of the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts of the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.

[0099] Based on the same inventive concept, an embodiment of the present application further provides a remote log pulling device for implementing the remote log pulling method involved above. The solution provided by this device for solving problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the remote log pulling device provided below can refer to the limitations on the remote log pulling method in the above text, and will not be repeated here.

[0100] In one embodiment, as Figure 6 shown, a remote log pulling device is provided. The remote log pulling device is applied to the main chip of the in-vehicle unit. The in-vehicle unit is provided with a main chip and at least one slave chip. The main chip is provided with a main system and at least one slave system. The device includes:

[0101] An acquisition module 10, configured to acquire a log pulling task sent by the server.

[0102] An analysis module 20, configured to analyze the log pulling task to determine the log type to be extracted.

[0103] A determination module 30, configured to determine the chip identifier and system identifier corresponding to the log type.

[0104] An extraction module 40, configured to select a corresponding log extraction policy according to the chip identifier and the system identifier, and extract log data corresponding to the log type based on the log extraction policy; the log extraction policy includes a cross-chip log extraction policy or a cross-system log extraction policy.

[0105] An upload module 50, configured to upload the log data to the server for the log pulling task.

[0106] In the above remote log pulling device, acquire the log pulling task sent by the server; analyze the log pulling task to determine the log type to be extracted; determine the chip identifier and system identifier corresponding to the log type; select a corresponding log extraction policy according to the chip identifier and the system identifier, and extract log data corresponding to the log type based on the log extraction policy; the log extraction policy includes a cross-chip log extraction policy or a cross-system log extraction policy; upload the log data to the server for the log pulling task. By the above method, analyze the task remotely sent by the server, execute the cross-chip or cross-system log extraction policy according to the task, extract the corresponding log data, and realize the cross-chip and cross-system log extraction of the in-vehicle unit; for the remotely sent log pulling task, remotely upload the corresponding log data, without the need for manual on-site visit, saving labor costs and improving the log data processing efficiency of the in-vehicle unit.

[0107] In one embodiment, the extraction module 40 is further configured to select a cross-system log extraction policy when the chip identifier indicates a main chip and the system identifier indicates a target slave system; call a preset interface to mount the log data matching the log type in the target slave system under the main system directory; and extract the log data corresponding to the log type from the main system directory.

[0108] In one embodiment, the extraction module 40 is further configured to select a cross-chip log extraction policy when the chip identifier indicates a target slave chip; communicate with the target slave chip through a preset protocol to instruct the target slave chip to extract the log data corresponding to the log type from a preset storage area and feedback the log data.

[0109] In one embodiment, the remote log pulling device further includes a cleaning module;

[0110] The cleaning module is configured to call the preset interface to mount the log data mounted in the main system directory back under the target slave system directory.

[0111] In one embodiment, the determination module 30 is further configured to determine at least one application program corresponding to the log type; determine the system identifier and the chip identifier corresponding to the application program; the system indicated by the system identifier is used to run the application program, and the chip indicated by the chip identifier is used to carry the system indicated by the system identifier.

[0112] In one embodiment, the remote log pulling device further includes a deletion module;

[0113] The deletion module is configured to delete the log pulling task and the compressed file corresponding to the log pulling task after the log data is successfully uploaded.

[0114] In one embodiment, the uploading module 50 is further configured to obtain the encryption information corresponding to the log pulling task; encrypt the log data according to the encryption information to obtain encrypted log data; and upload the encrypted log data to the server for the log pulling task.

[0115] Each module in the above remote log pulling device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0116] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 7As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by the processor, implements a remote log pulling method.

[0117] Those skilled in the art can understand that Figure 7 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have a different component layout.

[0118] In one embodiment, a computer device is provided, including a memory and a processor. A computer program is stored in the memory. When the processor executes the computer program, the following steps are implemented:

[0119] Obtain the log pulling task issued by the server;

[0120] Parse the log pulling task to determine the log type to be extracted;

[0121] Determine the chip identifier and system identifier corresponding to the log type;

[0122] Select a corresponding log extraction policy according to the chip identifier and the system identifier, and extract log data corresponding to the log type based on the log extraction policy; the log extraction policy includes a cross-chip log extraction policy or a cross-system log extraction policy;

[0123] Upload the log data to the server for the log pulling task.

[0124] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0125] In the case where the chip identifier indicates the main chip and the system identifier indicates the target slave system, select a cross-system log extraction policy;

[0126] Call a preset interface to mount the log data matching the log type for the target in the system under the main system directory;

[0127] Extract the log data corresponding to the log type from the main system directory.

[0128] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0129] When the chip identifier indicates a target from a chip, select a cross-chip log extraction strategy;

[0130] Communicate with the target slave chip through a preset protocol to instruct the target slave chip to extract the log data corresponding to the log type from a preset storage area and feedback the log data.

[0131] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0132] Call the preset interface to mount the log data mounted in the main system directory back under the target slave system directory.

[0133] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0134] Determine at least one application program corresponding to the log type;

[0135] Determine the system identifier and chip identifier corresponding to the application program; the system indicated by the system identifier is used to run the application program, and the chip indicated by the chip identifier is used to carry the system indicated by the system identifier.

[0136] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0137] After the log data is successfully uploaded, delete the log pulling task and the compressed file corresponding to the log pulling task.

[0138] In one embodiment, when the processor executes the computer program, the following steps are further implemented:

[0139] Obtain the encryption information corresponding to the log pulling task;

[0140] Encrypt the log data according to the encryption information to obtain encrypted log data;

[0141] For the log pulling task, upload the encrypted log data to the server.

[0142] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0143] Obtain a log pulling task issued by a server;

[0144] Parse the log pulling task to determine the log type to be extracted;

[0145] Determine the chip identifier and system identifier corresponding to the log type;

[0146] Select a corresponding log extraction policy according to the chip identifier and the system identifier, and extract log data corresponding to the log type based on the log extraction policy; the log extraction policy includes a cross-chip log extraction policy or a cross-system log extraction policy;

[0147] For the log pulling task, upload the log data to the server.

[0148] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0149] When the chip identifier indicates the main chip and the system identifier indicates the target slave system, select a cross-system log extraction policy;

[0150] Call a preset interface to mount the log data matching the log type in the target slave system to the main system directory;

[0151] Extract the log data corresponding to the log type from the main system directory.

[0152] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0153] When the chip identifier indicates the target slave chip, select a cross-chip log extraction policy;

[0154] Communicate with the target slave chip through a preset protocol to instruct the target slave chip to extract the log data corresponding to the log type from a preset storage area and feedback the log data.

[0155] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0156] Call the preset interface to mount the log data mounted in the main system directory back to the target slave system directory.

[0157] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0158] Determine at least one application corresponding to the log type;

[0159] Determine the system identifier and the chip identifier corresponding to the application; the system indicated by the system identifier is used to run the application, and the chip indicated by the chip identifier is used to carry the system indicated by the system identifier.

[0160] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0161] After the log data is successfully uploaded, delete the log pulling task and the compressed file corresponding to the log pulling task.

[0162] In one embodiment, when the computer program is executed by a processor, the following steps are further implemented:

[0163] Obtain the encryption information corresponding to the log pulling task;

[0164] Encrypt the log data according to the encryption information to obtain encrypted log data;

[0165] For the log pulling task, upload the encrypted log data to the server.

[0166] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.

[0167] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0168] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.

[0169] The above-described embodiments only represent several implementation manners of the present application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A remote log pulling method, characterized in that, The remote log pulling method is applied to the main chip of the in-vehicle unit. The in-vehicle unit is provided with a main chip and at least one slave chip. The main chip is provided with a main system and at least one slave system. The method includes: Obtain a log pulling task issued by the server; Parse the log pulling task to determine the log type to be extracted; Determine the chip identifier and system identifier corresponding to the log type; Select a corresponding log extraction policy according to the chip identifier and the system identifier, and extract log data corresponding to the log type based on the log extraction policy; the log extraction policy includes a cross-chip log extraction policy or a cross-system log extraction policy; Upload the log data to the server for the log pulling task.

2. The method according to claim 1, wherein The selecting a corresponding log extraction policy according to the chip identifier and the system identifier includes: When the chip identifier indicates the main chip and the system identifier indicates the target slave system, select a cross-system log extraction policy; The extracting log data corresponding to the log type based on the log extraction policy includes: Call a preset interface to mount the log data matching the log type in the target slave system to the main system directory; Extract the log data corresponding to the log type from the main system directory.

3. The method according to claim 1, characterized in that The selecting a corresponding log extraction policy according to the chip identifier and the system identifier includes: When the chip identifier indicates the target slave chip, select a cross-chip log extraction policy; The extracting log data corresponding to the log type based on the log extraction policy includes: Communicate with the target slave chip through a preset protocol to instruct the target slave chip to extract the log data corresponding to the log type from a preset storage area and feedback the log data.

4. The method according to claim 2, wherein After uploading the log data to the server for the log pulling task, the method further includes: Call the preset interface to mount the log data mounted in the main system directory back to the target slave system directory.

5. The method according to claim 1, characterized in that The determining the chip identifier and system identifier corresponding to the log type includes: Determine at least one application program corresponding to the log type; Determine the system identifier and chip identifier corresponding to the application program; the system indicated by the system identifier is used to run the application program, and the chip indicated by the chip identifier is used to carry the system indicated by the system identifier.

6. The method according to any one of claims 1 to 5, characterized in that, After uploading the log data to the server for the log pulling task, the method further includes: After the log data is successfully uploaded, delete the log pulling task and the compressed file corresponding to the log pulling task.

7. The method according to any one of claims 1 to 5, characterized in that The uploading the log data to the server for the log pulling task includes: Obtain the encryption information corresponding to the log pulling task; Encrypt the log data according to the encryption information to obtain encrypted log data; Upload the encrypted log data to the server for the log pulling task.

8. A remote log pulling device, characterized in that, The remote log pulling device is applied to the main chip of the in-vehicle unit. The in-vehicle unit is provided with a main chip and at least one slave chip. The main chip is provided with a main system and at least one slave system. The device includes: An acquisition module, configured to acquire a log pulling task issued by the server; An analysis module, configured to analyze the log pulling task to determine the log type to be extracted; A determination module, configured to determine the chip identifier and system identifier corresponding to the log type; An extraction module, configured to select a corresponding log extraction policy according to the chip identifier and the system identifier, and extract log data corresponding to the log type based on the log extraction policy; the log extraction policy includes a cross-chip log extraction policy or a cross-system log extraction policy; An upload module, configured to upload the log data to the server for the log pulling task.

9. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

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

Citation Information

Cited By

  • Split device log storage and pulling method and system and storage medium

    CN120973753A