Log processing method and device, electronic equipment and storage medium

By using a knowledge database to match logs and historical processing information in new energy vehicles, processing information is automatically generated, solving the problems of difficulty in locating vehicle problems and low efficiency of manual analysis, and realizing fast and intelligent log processing.

CN121858787APending Publication Date: 2026-04-14ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-07
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In new energy vehicles, the complex hardware and software links make it difficult to locate problems, resulting in low efficiency of manual analysis. Furthermore, different users repeatedly analyze the same problems, leading to serious waste of resources and an inability to quickly obtain historical solutions.

Method used

By obtaining the logs to be processed and the target regular expression field, the system uses a knowledge database to match similar logs and historical processing information to generate target processing information, automatically instructing vehicles to perform operations and reducing manual analysis.

Benefits of technology

It improves the efficiency and intelligence of problem handling, reduces repetitive work, quickly obtains accurate processing information, and meets the high-efficiency processing needs of complex problem scenarios in new energy vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121858787A_ABST
    Figure CN121858787A_ABST
Patent Text Reader

Abstract

The invention relates to a log processing method and device, electronic equipment and a storage medium, and relates to the technical field of data processing.The method comprises the steps that in response to a log processing request sent by a vehicle, a to-be-processed log and a target regular expression field are obtained, retrieving the to-be-processed log on the basis of a target regular expression corresponding to the target regular expression field to obtain a target log, matching in a knowledge database on the basis of the target log to obtain a similar log and corresponding historical processing information, and processing on the basis of the target log, the similar log and the historical processing information to obtain the to-be-processed log. Target processing information is generated and sent to the vehicle to instruct the vehicle to execute the target operation. By adopting the technical scheme, when the vehicle processes a new problem, the historical processing information is adjusted according to the current log, and the accurate target processing information is quickly acquired and sent to the vehicle, so that the vehicle can quickly execute related operations to solve the problem, and the problem processing efficiency is greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and in particular to a log processing method, apparatus, electronic device, and storage medium. Background Technology

[0002] Currently, in the actual use scenarios of new energy vehicles, the software and hardware links involved in the vehicles are extremely complex. From the hardware perspective, it covers various sensors, controllers, actuators, and chips of different functional modules. On the software side, there are underlying operating systems, middleware, and various applications. This complexity means that when users encounter problems, the cause of the problem may be hidden in multiple links.

[0003] In related technologies, manually analyzing logs to determine how to solve problems is not only costly in terms of manpower, but also inefficient. Different users may encounter the same problem, but each time the analysis needs to be repeated, resulting in duplicate analysis of the same problem, wasting resources and slowing down the problem-solving process. Summary of the Invention

[0004] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, at least one embodiment of the present disclosure provides a log processing method, apparatus, electronic device and storage medium.

[0005] In a first aspect, this disclosure provides a log processing method, comprising: responding to a log processing request sent by a vehicle, obtaining a log to be processed and a target regular expression field; determining a parameter threshold range based on the target regular expression corresponding to the target regular expression field, and searching the log to be processed based on the parameter threshold range to obtain a target log; matching the target log in a knowledge database to obtain similar logs corresponding to the target log, and obtaining historical processing information corresponding to the similar logs; processing the target log, the similar logs, and the historical processing information to generate target processing information and sending it to the vehicle; wherein the target processing information is used to instruct the vehicle to perform a target operation.

[0006] Secondly, this disclosure provides a log processing apparatus, comprising: a response acquisition module, configured to acquire a log to be processed and a target regular expression field in response to a log processing request sent by a vehicle; a retrieval module, configured to determine a parameter threshold range based on the target regular expression corresponding to the target regular expression field, and to retrieve a target log based on the parameter threshold range in the log to be processed; a matching module, configured to match the target log in a knowledge database to acquire similar logs corresponding to the target log; a first acquisition module, configured to acquire historical processing information corresponding to the similar logs; a generation module, configured to process the target log, the similar logs, and the historical processing information to generate target processing information; and a sending module, configured to send the target processing information to the vehicle; wherein the target processing information is used to instruct the vehicle to perform a target operation.

[0007] Thirdly, this disclosure provides an electronic device, including: a processor and a memory; The processor executes any of the log processing methods provided in the embodiments of this disclosure by calling programs or instructions stored in the memory.

[0008] Fourthly, this disclosure provides a computer-readable storage medium that stores a program or instructions that cause a computer to perform any of the log processing methods described in the embodiments of this disclosure.

[0009] Fifthly, this disclosure provides a computer program product for executing any of the log processing methods described in the embodiments of this disclosure.

[0010] The technical solution provided in this disclosure has at least the following advantages compared with the prior art: In this embodiment, in response to a log processing request sent by a vehicle, the system obtains the log to be processed and a target regular expression field. A parameter threshold range is determined based on the target regular expression corresponding to the target regular expression field. The system then searches the log to be processed based on this threshold range to obtain the target log. Matching is performed on the target log in a knowledge database to obtain similar logs corresponding to the target log, and historical processing information corresponding to the similar logs is also obtained. Processing is performed based on the target log, similar logs, and historical processing information to generate target processing information, which is then sent to the vehicle. This target processing information instructs the vehicle to perform the target operation. By adopting this technical solution, when the vehicle needs to handle a newly emerging problem, it retrieves historical processing information from the knowledge database and adjusts this information based on the current log. This allows for the rapid acquisition of accurate target processing information, enabling the vehicle to quickly perform relevant operations to resolve the problem without requiring manual re-analysis of the logs. This significantly improves the efficiency of problem handling and further enhances the intelligence and efficiency of log processing. Attached Figure Description

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

[0012] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 A schematic flowchart of a log processing method provided for an exemplary embodiment of this disclosure; Figure 2 A flowchart illustrating a log processing method provided as another exemplary embodiment of this disclosure; Figure 3 This is a schematic diagram of the structure of a log processing apparatus provided in an embodiment of the present disclosure. Detailed Implementation

[0014] To better understand the above-described objectives, features, and advantages of this disclosure, the present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the described embodiments are only some, not all, of the embodiments of this disclosure. The specific embodiments described herein are merely for explaining this disclosure and not for limiting it. Unless otherwise specified, the embodiments of this disclosure and the features within them can be combined with each other. All other embodiments obtained by those skilled in the art based on the described embodiments of this disclosure are within the scope of protection of this disclosure.

[0015] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0016] Currently, there are significant limitations to the methods used for analyzing vehicle problems. On the one hand, due to the long hardware and software links in vehicles, users often find it difficult to accurately determine the location of the problem and may not proactively report it. Even if they do report it, inaccurate or incomplete descriptions may hinder quick problem localization. On the other hand, current methods primarily rely on manual analysis of vehicle data. This approach is not only labor-intensive but also inefficient, as manual analysis requires professionals to interpret log data one by one, making it difficult to quickly process massive amounts of log information and address problems promptly and effectively. Furthermore, proactively reported problems suffer from the drawback of repeated analysis of duplicate issues. Different users may encounter the same problem, but each time analysis is required again, resulting in wasted resources, slowed problem resolution, and reduced overall operational efficiency. The need to start manual analysis from scratch for each problem cannot meet the demands of the growing user base and complex problem scenarios of new energy vehicles for rapid and efficient problem handling. In other words, it hinders the rapid retrieval of previous solutions and impedes the improvement of accuracy and efficiency in problem handling.

[0017] To address the aforementioned issues, this disclosure provides a log processing method. In response to a log processing request from a vehicle, the method obtains the log to be processed and a target regular expression field. Based on the target regular expression field, a parameter threshold range is determined. The method then searches the log to be processed within this threshold range to obtain the target log. Matching the target log with a knowledge database yields similar logs, and historical processing information for these similar logs is also obtained. Finally, the method processes the target log, similar logs, and historical processing information to generate target processing information, which is then sent to the vehicle. This target processing information instructs the vehicle to perform the target operation. By employing this technical solution, when a vehicle needs to handle a newly emerging problem, it retrieves historical processing information from the knowledge database and adjusts this information based on the current log. This allows for the rapid acquisition and transmission of accurate target processing information, enabling the vehicle to quickly execute relevant operations to resolve the problem without requiring manual, comprehensive log analysis. This significantly improves problem-solving efficiency, reduces repetitive work, and further enhances the intelligence and efficiency of log processing.

[0018] The following detailed explanation, in conjunction with the accompanying drawings, illustrates specific implementations of the log processing method, apparatus, electronic device, and storage medium disclosed herein.

[0019] Figure 1 This is a flowchart illustrating a log processing method provided in an exemplary embodiment of the present disclosure. The method can be executed by a log processing device provided in an embodiment of the present disclosure. The log processing device can be implemented in software and / or hardware and is generally integrated into an electronic device.

[0020] like Figure 1 As shown, the log processing method may include the following steps: Step 101: In response to the log processing request sent by the vehicle, obtain the log to be processed and the target regular expression field.

[0021] Specifically, during vehicle use, issues such as lag in the cabin entertainment system and malfunctions in the cabin air conditioning system may occur. These issues need to be addressed promptly to meet vehicle usage requirements and improve the user experience. Understandably, the use of systems such as entertainment and air conditioning generates corresponding log data, which increases over time. When problems arise, new logs can be processed to further improve data processing efficiency.

[0022] In this embodiment of the disclosure, when the vehicle experiences a lag issue with the cockpit entertainment system, the generated log data can be sent to the server to trigger a log processing request; wherein, the log data includes log identifier, log content, etc.; after the server receives the log processing request sent by the vehicle, it parses the log processing request to obtain the log to be processed and the target regular expression field.

[0023] Among them, the pending logs refer to logs generated when problems occur while using the target system without processing; the target regular expression field is used to uniquely identify the corresponding target regular expression. In this embodiment of the disclosure, the target regular expression refers to the threshold regular expression. The threshold regular expression refers to using regular expressions to match or verify values ​​within a specific range. Regular expressions define matching rules through specific characters. Different threshold regular expressions represent threshold ranges corresponding to different parameters. For example, if the parameter is temperature, the threshold range is 16 to 32 degrees.

[0024] Specifically, there are many ways to obtain the log to be processed and the target regular expression field in response to a log processing request sent by a vehicle. In some embodiments, the log to be processed and the target regular expression field can be obtained by parsing the log processing request. In other embodiments, in response to the log processing request, a log identifier and candidate logs are obtained. Based on the log identifier, a query is performed in the knowledge database to obtain a candidate knowledge set and the target regular expression field. Based on each knowledge element in the candidate knowledge set, a search is performed in the candidate logs to obtain the log to be processed. Here, the log identifier can uniquely identify a log and can be determined by fault codes or module identifiers. A knowledge database is pre-set to store the target regular expression field and candidate knowledge set associated with different log identifiers. The candidate knowledge set stores at least one knowledge element, such as a template or parameter field.

[0025] Step 102: Determine the parameter threshold range based on the target regular expression corresponding to the target regular expression field, and search the logs to be processed based on the parameter threshold range to obtain the target logs.

[0026] In this embodiment of the disclosure, after obtaining the target regular expression field, the corresponding target regular expression can be determined based on the target regular expression field. Thus, the target log can be retrieved by searching the log to be processed through the target regular expression. Specifically, the parameter threshold range of each parameter is determined based on the target regular expression, and the log corresponding to the target parameter whose value in the log to be processed is not within the corresponding parameter threshold range is taken as the target log.

[0027] Understandably, target regular expressions are used to determine the parameter threshold range. Parameter values ​​within this range are considered normal, while values ​​outside the range are considered abnormal. By using target regular expressions for retrieval and matching, logs with abnormal parameter values ​​can be used as target logs for further processing, thereby improving data processing efficiency and effectiveness.

[0028] Step 103: Match the target log in the knowledge database to obtain similar logs corresponding to the target log, and obtain the historical processing information corresponding to the similar logs.

[0029] In this embodiment, a knowledge database is pre-set to store log information corresponding to different logs. Specifically, multiple intelligent agents can parse and process the vehicle cockpit domain logs, storing log information (fault codes and template identifiers, etc.), log templates and corresponding log parameter lists, regular expressions, target regular expressions, and historical processing information in the knowledge database. For example, when analyzing a cockpit entertainment system lag issue, multiple intelligent agents parse the correlation between specific parameters in the logs and the lag phenomenon. After manual confirmation, the problem scenario, parsing method, historical processing information (i.e., solutions), and other information are integrated into the knowledge database. The content in the knowledge database can be saved to an ES (Elasticsearch, a search and data analysis engine) database. With its powerful storage and indexing capabilities, the ES database can efficiently manage the massive amounts of information in the knowledge database. By reasonably setting the index, it is possible to quickly retrieve different types of problems and log analysis results from different modules.

[0030] Specifically, there are many ways to match target logs with the knowledge database and obtain similar logs. For example, one method is to directly calculate the log similarity between the target log and candidate logs in the knowledge database, and then select the candidate log with the highest log similarity as the target log. Another method is to query the knowledge database based on log identifiers to obtain regular expressions, process the target logs based on the regular expressions to obtain target templates, calculate the similarity between the target template and the candidate templates in the knowledge database, and select the logs corresponding to the candidate templates with a template similarity greater than a preset similarity threshold as similar logs. The specific method can be selected and set according to the actual application scenario.

[0031] In this embodiment of the disclosure, after obtaining similar logs, the historical processing information corresponding to the similar logs can be obtained; the historical processing information refers to the historical solutions of the similar logs, such as the association between specific parameters in the similar logs and the problem, adjusting the specific parameters to the target value to avoid the problem, etc. The historical processing information corresponding to different logs is usually different.

[0032] Step 104: Process the target log, similar logs, and historical processing information to generate target processing information and send it to the vehicle; wherein, the target processing information is used to instruct the vehicle to perform the target operation.

[0033] In this embodiment of the disclosure, after obtaining similar logs and the historical processing information corresponding to the similar logs, the target log and similar logs can be analyzed to determine the setting information of each parameter in the target log and similar logs, such as the value of the specific parameter. Then, the historical processing information corresponding to the similar logs can be adjusted accordingly to obtain the target processing information, which is sent to the vehicle. The vehicle then performs the target operation according to the target processing information, which can automatically perform certain operations to solve the problem and realize the automated processing of the problem.

[0034] Therefore, when encountering similar problems, retrieval-based generative artificial intelligence technology is used to retrieve historical processing information similar to the current problem from the knowledge database, and combine the historical processing information to generate target processing information for the current problem, thereby achieving automated processing. For example, when the cabin entertainment system lags again, the relevant analysis records from the knowledge database are found to quickly provide possible causes and solutions, eliminating the need for manual comprehensive log analysis, which greatly improves the efficiency of problem handling and reduces repetitive work.

[0035] The log processing method of this disclosure, in response to a log processing request sent by a vehicle, obtains the log to be processed and a target regular expression field. Based on the target regular expression corresponding to the target regular expression field, a parameter threshold range is determined. The log to be processed is then searched based on the parameter threshold range to obtain the target log. The target log is then matched against a knowledge database to obtain similar logs corresponding to the target log, and historical processing information corresponding to the similar logs is obtained. Based on the target log, similar logs, and historical processing information, processing is performed to generate target processing information, which is then sent to the vehicle. The target processing information is used to instruct the vehicle to perform the target operation. Using this technical solution, when the vehicle needs to handle a newly emerging problem, historical processing information is retrieved through a knowledge database, and the historical processing information is adjusted according to the current log. Accurate target processing information is quickly obtained and sent to the vehicle, allowing the vehicle to quickly perform relevant operations to solve the problem without requiring manual comprehensive log analysis. This greatly improves the efficiency of problem handling, reduces repetitive work, and further enhances the intelligence and efficiency of log processing. It solves the drawbacks of traditional analysis methods, such as passive user reporting, high manual analysis costs, and repetitive analysis of recurring problems, further improving the intelligence and efficiency of vehicle cabin domain log analysis.

[0036] Figure 2 This is a flowchart illustrating a log processing method provided in another exemplary embodiment of the present disclosure. This method can be executed by a log processing device provided in an embodiment of the present disclosure. The log processing device can be implemented in software and / or hardware, and is generally integrated into an electronic device. For example... Figure 2 As shown, the log processing method may include the following steps: Step 201: In response to the log processing request sent by the vehicle, obtain the log identifier and candidate logs, query the knowledge database based on the log identifier to obtain the candidate knowledge set and target regular expression field, and search the candidate logs based on each knowledge element in the candidate knowledge set to obtain the logs to be processed.

[0037] In this embodiment of the disclosure, historical logs, as well as corresponding log information and historical processing information, are obtained. The historical logs are processed based on regular expressions to obtain a log template and a corresponding log parameter list. It is determined whether the log parameters have a corresponding threshold range. If the log parameters have a corresponding threshold range, the log template, the corresponding log parameter list, the semantic information corresponding to the historical logs, and the first prompt word are input into a first intelligent agent for processing to obtain a target regular expression. The log information, the log template and the corresponding log parameter list, the regular expression, the target regular expression, and the historical processing information are stored in a knowledge database.

[0038] In some embodiments, the historical logs and the second prompt word are input into the second intelligent agent for processing to obtain the historical template and historical parameters. The historical logs and the third prompt word are input into the third intelligent agent for processing to obtain log semantic information. The historical template, historical parameters, log semantic information, and the fourth prompt word are input into the fourth intelligent agent for processing to obtain a regular expression.

[0039] In this embodiment, multiple intelligent agents are used to collaboratively obtain log templates and corresponding log parameter lists, log semantic information, regular expressions, and threshold regular expressions. For example, when parsing the logs of a complex function in a vehicle cockpit, the collaborative use of multiple intelligent agents can accurately parse the logs by integrating structural and semantic information, greatly improving parsing accuracy, reducing the difficulty and workload of manual analysis, helping to locate problems more efficiently, and solving the difficulties in analyzing vehicle-side problems.

[0040] Specifically, there are one or more historical logs, as well as log information and historical processing information corresponding to each historical log. The log information may include fault codes and module identifiers (used to uniquely identify a module, such as a control module, transmission module, etc.). The historical processing information refers to the solutions given for the problems corresponding to the historical log. Usually, different historical information corresponds to different historical processing information.

[0041] In this embodiment, the first intelligent agent refers to the agent that generates the target regular expression using a large language model. The log template, the corresponding log parameter list, the semantic information of historical logs, and the first prompt word are input into the first intelligent agent for processing to obtain the target regular expression. The first prompt word is used to prompt the large language model to generate the target regular expression; its specific content is selected and set according to the actual application scenario. Specifically, the generated target regular expression is typically a threshold regular expression in this embodiment. The threshold regular expression is used to quickly and accurately search for relevant log information within a specific threshold range, providing efficient retrieval support for the subsequent inference stage.

[0042] In this embodiment, the second intelligent agent refers to an intelligent agent that uses a large language model to identify log templates and log parameters. Historical logs and a second prompt word are input into the second intelligent agent for processing to obtain historical templates and parameters. The second prompt word is used to prompt the large language model to identify the log templates and parameters; its specific content is selected and set according to the actual application scenario. Specifically, logs generated by various modules in the vehicle cockpit domain are uploaded to the server via the vehicle network or other data transmission methods. The second intelligent agent first performs structural analysis on the historical logs, using a large language model to scan the historical log text and identify the fixed parts as historical templates and the variable parts as historical parameters. For example, for the log "[timestamp]-Air conditioning system, user [user_id] set the temperature to [temperature]℃", the second intelligent agent can initially determine "[timestamp]-Air conditioning system, user set the temperature to ℃" as the template, and "user_id" and "temperature" as parameters.

[0043] It should be noted that you can also choose to retrieve log templates and log parameters based on the actual application scenario. Examples are as follows: Example 1: Building a rule-based log parsing engine. First, a series of parsing rules are written to address the characteristics of various logs in the vehicle cabin domain. These rules cover aspects such as log format definitions, field meanings, and parameter ranges. For example, for air conditioning system logs, a format rule is defined as "[timestamp]-air conditioning system, user [user ID] sets the temperature to [temperature value] ℃", and a parameter range rule is defined that the temperature value must be between 16-32℃. When new logs are input, the rule engine matches and parses the logs according to the preset rules, extracting templates and parameters from the logs through string matching, regular expression matching, etc., and verifying the rationality of the parameters. Therefore, this provides clear guidance for log parsing in specific scenarios. When parsing errors occur, it is easy to trace and debug the matching and parsing process of the rule engine, which is relatively simple and direct. When processing small log volumes and with relatively stable log structures, it can quickly provide parsing results.

[0044] Example 2 employs a single deep learning model, such as a recurrent neural network or its variants like Long Short-Term Memory (LSTM) or gated recurrent units (GTUs), for end-to-end log parsing. First, a large amount of log data from the vehicle cabin domain is collected as a training set. The logs are preprocessed, converting them into an input format acceptable to the deep learning model, such as word vector representation. Then, this data is used to train the deep learning model, allowing it to learn the structural and semantic features of the logs and directly predict log templates and parameters from the input logs. During prediction, the deep learning model automatically identifies fixed parts of the logs as templates and variable parts as parameters based on the learned feature patterns. Therefore, unlike rule engines, which require manually writing numerous rules, the model automatically learns log parsing patterns through a data-driven approach, reducing manual intervention. Deep learning models possess strong feature learning capabilities and can capture patterns in logs with complex structures and semantics through training, exhibiting better adaptability compared to rule engines.

[0045] Example 3: Constructing a vehicle cockpit domain knowledge graph. By collecting and organizing knowledge from various modules within the cockpit domain, including hardware components, software functions, operating procedures, and log semantics, this knowledge is represented in graph form. Nodes represent entities (such as modules, parameters, operations, etc.), and edges represent relationships between entities (such as belonging, association, influence, etc.). During log parsing, elements in the log are matched and associated with nodes in the knowledge graph. Utilizing the semantic information and relationship network within the knowledge graph, the meaning of the log is understood, thereby extracting log templates and parameters. For example, if a log mentions "seat heating," the knowledge graph can be used to associate relevant parameters and operating procedures for the seat heating module, thus accurately parsing the log. Therefore, the knowledge graph can fully leverage domain knowledge to achieve in-depth semantic understanding of logs, accurately grasping the meaning and relationships of each element in the log, resulting in more accurate parsing. When new functions or modules are added to the cockpit domain, only the corresponding nodes and relationships need to be added to the knowledge graph to expand parsing capabilities, making it more flexible than rule engines.

[0046] Example 4: First, a log template library is established to collect and organize various known log templates from the vehicle cockpit domain. Simultaneously, a prefix parse tree is constructed for efficient log template matching. For newly input cockpit domain logs, their log vectors are extracted. Using retrieval enhancement generation techniques, similar or identical log templates are searched in the log template library. Specifically, the log vector is compared with existing template vectors in the library. If a similar or identical log template is found, the log is categorized into the corresponding log group. If not found, a large language model is used to parse and generate the target log template, and a new log group containing the target log is added to the log template library. Therefore, using a log template library and a prefix parse tree for matching can ensure the accuracy of log template extraction to a certain extent. Especially for common log types already existing in the template library, the combination of retrieval enhancement generation techniques and prefix parse trees allows for rapid retrieval within the log template library, improving log parsing efficiency and reducing processing time.

[0047] Example 5: Based on the importance of vehicle cabin domain logs, sampling weights are assigned to logs of different levels, prioritizing the coverage of critical logs. Structured prompts guide a locally deployed large language model to generate the regular expressions needed for log parsing. These prompts can include specific format and semantic information of cabin domain logs, helping the large language model generate more suitable regular expressions. A traditional log parsing engine then parses each log entry according to the generated regular expressions, outputting structured logs. The rate of unparsed logs is monitored in real time. When the rate exceeds a preset threshold, asynchronous rule generation is triggered, readjusting the prompts or reusing the large language model to generate more appropriate regular expressions. This reduces manual labor costs. Automatically generating log parsing rules through a local large language model significantly reduces the workload of manually writing rules, lowering labor costs. Real-time monitoring of the unparsed log rate and triggering asynchronous rule generation allows for dynamic adjustment of parsing rules based on actual parsing conditions, demonstrating a degree of adaptability to changes in log structure.

[0048] In this embodiment, the third agent refers to the agent that uses a large language model to identify the meaning of the log. The historical log and the third prompt word are input into the third agent for processing to obtain log semantic information. The third prompt word is used to prompt the large language model to identify the meaning of the log, and the specific content is selected and set according to the actual application scenario. Specifically, the natural language understanding ability of the large language model is used in combination with cockpit domain knowledge to parse the log semantics to ensure accurate understanding of each element in the log. For example, it is confirmed that the "temperature" parameter should be within a reasonable air conditioning temperature adjustment range (e.g., 16 to 32 degrees Celsius).

[0049] In this embodiment, the fourth agent refers to the agent that generates regular expressions using a large language model. Historical templates, historical parameters, log semantic information, and a fourth prompt word are input into the fourth agent for processing to obtain the regular expression. The fourth prompt word is used to prompt the large language model to generate the regular expression, and its specific content is selected and set according to the actual application scenario. Specifically, by combining the outputs of the second and third agents, the fourth agent generates a regular expression for accurately extracting templates and parameters. Based on the structure and semantic information of the logs, the fourth agent constructs a regular expression that can accurately match the log format. For example, the generated regular expression can accurately extract timestamps, user identifiers, and temperature values ​​from similar logs.

[0050] Understandably, after generating the regular expression, the historical logs can be processed directly to obtain the log template and the corresponding log parameter list. This records the template structure and corresponding parameter information for different types of logs, facilitating subsequent retrieval and use.

[0051] Furthermore, log information, log templates, and corresponding log parameter lists, regular expressions, target regular expressions, and historical processing information are stored in a knowledge database. In response to a log processing request, log identifiers and candidate logs are obtained. Based on the log identifiers, a query is performed in the knowledge database to obtain candidate knowledge sets and target regular expression fields. Based on each knowledge element in the candidate knowledge set, a search is performed in the candidate logs to obtain the logs to be processed.

[0052] Specifically, when a vehicle experiences a cockpit-domain related issue again, a new log or issue description is uploaded to the server, triggering a log processing request. The server can then search the knowledge database using a target regular expression. This target regular expression allows for quick location of historical records in the knowledge database that are similar to the current issue, providing relevant templates, parameter information, and previous solutions.

[0053] Therefore, by employing multiple agents based on a large language model working collaboratively, the problem of unproactive reporting and difficult analysis of vehicle-side issues can be addressed more efficiently and accurately by using multi-agent collaboration to parse logs. The second agent identifies log content templates and parameters by performing a preliminary analysis of the log structure and extracting templates and parameters. The third agent identifies the meaning of the logs by gaining a deeper understanding of the semantic information expressed in the log text. The outputs of both agents serve as input for the fourth agent to generate regular expressions. This allows for the effective parsing of complex cockpit domain logs, reducing the difficulty and workload of manual analysis, improving the accuracy of problem localization, and solving some of the difficulties in analyzing vehicle-side issues.

[0054] Furthermore, the results of multi-agent log parsing and manual analysis are organized into a knowledge database and stored in a database such as Elasticsearch (ES). Simultaneously, log templates and corresponding log parameter lists are generated using regular expressions, along with threshold regular expressions specific to the ES database, facilitating knowledge database management and subsequent retrieval. This addresses the resource waste caused by repetitive analysis of recurring problems and the inadequacy of knowledge management and utilization. The knowledge database effectively integrates and stores knowledge; relevant information is stored in the knowledge database after each problem is processed. When encountering the same problem again, a comprehensive re-analysis is unnecessary. The ES database's specific threshold regular expressions, log templates, and corresponding log parameter lists help quickly and accurately retrieve relevant information from the knowledge database during subsequent reasoning stages, improving problem-solving efficiency, avoiding resource waste, and solving the problem of insufficient knowledge management and utilization, ensuring that existing knowledge and experience are fully utilized.

[0055] Step 202: Obtain the value of each parameter in the log to be processed, and take the log corresponding to the target parameter whose value is not in the corresponding parameter threshold range as the target log.

[0056] Specifically, a target regular expression is used to determine the parameter threshold range. A parameter value within the threshold range indicates that the parameter value is normal, while a parameter value outside the threshold range indicates that the parameter value is abnormal. By searching and matching using the target regular expression, the logs corresponding to abnormal parameter values ​​can be used as target logs.

[0057] Step 203: Based on the log identifier obtained in response to the log processing request, query the knowledge database to obtain a regular expression. Process the target log based on the regular expression to obtain the target template. Calculate the similarity between the target template and the candidate templates in the knowledge database to obtain the template similarity between the target template and the candidate templates. The logs of the candidate templates with the maximum template similarity greater than or equal to the preset similarity threshold are regarded as similar logs.

[0058] Step 204: Analyze the historical processing information based on the target log and similar logs, determine the parameters to be adjusted and their corresponding target values ​​in the historical processing information, adjust the parameter values ​​of the parameters to be adjusted to the target values, and send the target processing information to the vehicle; wherein, the target processing information is used to instruct the vehicle to perform the target operation.

[0059] Specifically, similarity calculations are performed between the target template and candidate templates in the knowledge database. There are many ways to obtain the template similarity between the target template and candidate templates, such as calculating the vector cosine value or message digest value of the target template and candidate templates. The specific method can be selected and set according to the actual application needs. A similarity threshold can be preset and set according to the actual application scenario. When there is only one template similarity greater than or equal to the preset similarity threshold, the log of the candidate template corresponding to the maximum template similarity is taken as the similar log. When there are multiple template similarities greater than or equal to the preset similarity threshold, the log of the candidate template corresponding to the maximum template similarity among the multiple template similarities is taken as the similar log.

[0060] In this embodiment of the disclosure, after obtaining similar logs, historical processing information corresponding to the similar logs can be obtained. The target log and similar logs can be analyzed to determine the parameters to be adjusted and the corresponding target values ​​in the historical processing information. The parameter values ​​of the parameters to be adjusted are adjusted to the target values ​​to obtain target processing information, which is then sent to the vehicle to instruct the vehicle to perform the target operation.

[0061] In this embodiment of the disclosure, different logs determine different parameters to be adjusted and different corresponding target values. The target value indicates which specific value the parameter to be adjusted to, and the specific setting is selected according to the actual application scenario.

[0062] Specifically, based on the retrieved similar logs and the target logs for the current problem, historical processing information is adjusted and optimized. A large language model generates target solution information for the current problem and outputs it to the vehicle, allowing the vehicle to automatically perform certain operations to resolve the issue, thus achieving automated problem handling. For problems lacking intelligent problem-solving mechanisms, the retrieval-enhanced generation technology utilizes historical records in a knowledge database to retrieve information similar to the current problem and generate targeted solutions, achieving automated handling of similar problems. This not only improves the speed of problem handling and reduces human intervention but also meets the needs of large-scale vehicle users and complex problem scenarios for rapid and efficient problem processing, making the entire log analysis and problem-solving process more intelligent.

[0063] In summary, the log processing method of this disclosure addresses the issues of passive reporting and difficulty in analyzing vehicle-side problems. Through multi-agent collaboration, it accurately parses both structural and semantic information, significantly improving parsing accuracy, reducing the difficulty and workload of manual analysis, and facilitating more efficient problem localization. It also reduces reliance on manual analysis, as multi-agent collaboration completes complex log parsing and generates structured results, greatly reducing the workload of direct manual log analysis and improving efficiency. This addresses the resource waste caused by passive reporting of vehicle-side problems. Furthermore, it avoids the waste of resources from repetitive analysis of recurring problems. After multi-agent parsing and manual analysis, a knowledge database is created and stored, allowing for direct retrieval of relevant information when encountering the same problem again. For example, after analyzing a cockpit malfunction and creating a knowledge database, subsequent recurrences do not require re-parse of logs; the knowledge can be directly reused, saving time and manpower and avoiding wasted resources from redundant analysis. In complex vehicle systems, existing algorithms may need to repeatedly execute similar parsing steps when processing duplicate template logs, failing to quickly reuse previous results and requiring significant time for manual log analysis. By combining a knowledge database, when duplicate template logs are detected, stored regular expressions can be directly invoked, greatly reducing repetitive work. Simultaneously, automated and intelligent log analysis achieved through customized regular expression generation using a large language model reduces manual intervention in log parsing and troubleshooting, significantly lowering labor costs and improving troubleshooting efficiency.

[0064] Furthermore, by generating log templates and corresponding log parameter lists, along with threshold regular expressions, an efficient retrieval mechanism is built for the knowledge database. When duplicate issues occur, matching information can be quickly and accurately found from the knowledge database, accelerating problem handling and reducing resource consumption from redundant analysis. This, combined with the knowledge database, enables rapid processing of duplicate template logs and the flexibility of the large language model in generating regular expressions. By storing and quickly retrieving regular expressions through the knowledge database, as long as the template remains unchanged, even minor system changes can quickly retrieve the regular expressions for log processing. The large language model generates regular expressions based on semantics, offering greater flexibility and better adaptability to changes in log structure without requiring a complete rewriting of expressions. For example, when a system upgrade causes a slight change in the log format, the large language model can quickly adjust and generate appropriate regular expressions based on the new semantics. This approach significantly improves log management efficiency and reduces maintenance costs. During the inference phase, retrieval-enhanced generation technology, combined with knowledge database information, automatically retrieves similar historical records and generates solutions. For example, when a new problem arises, the retrieval-enhanced generation technology quickly matches similar cases in the knowledge database and provides solutions without manual intervention, improving the intelligence level of problem handling and meeting the rapid processing needs of complex problem scenarios in new energy vehicles. A knowledge database is constructed, organizing and storing the results of multi-agent analysis and manual analysis to achieve effective knowledge integration and storage. For example, the analysis results of different cockpit problems are stored in the knowledge database, forming a complete knowledge system for convenient subsequent querying and utilization. Due to the efficient retrieval mechanism and strong knowledge reusability of the knowledge database, relevant knowledge can be quickly obtained for subsequent processing of similar problems, improving the accuracy and efficiency of problem handling.

[0065] To implement the above embodiments, this disclosure also provides a log processing apparatus, which can be implemented in software and / or hardware.

[0066] Figure 3 This is a schematic diagram of the structure of a log processing apparatus provided in an embodiment of the present disclosure, as shown below. Figure 3 As shown, the log processing device 30 may include: The response acquisition module 310 is used to respond to the log processing request sent by the vehicle and acquire the log to be processed and the target regular expression field; The retrieval module 320 is used to determine the parameter threshold range based on the target regular expression corresponding to the target regular expression field, and to retrieve the target log based on the parameter threshold range in the log to be processed. Matching module 330 is used to match the target log in a knowledge database and obtain similar logs corresponding to the target log; The first acquisition module 340 is used to acquire historical processing information corresponding to the similar logs; The generation module 350 is used to process the target log, the similar log, and the historical processing information to generate target processing information. The sending module 360 ​​is used to send the target processing information to the vehicle; wherein the target processing information is used to instruct the vehicle to perform a target operation.

[0067] Optionally, the response acquisition module 310 is specifically configured to: in response to the log processing request, acquire a log identifier and candidate logs; query the knowledge database based on the log identifier to acquire a candidate knowledge set and the target regular expression field; and search the candidate logs based on each knowledge element in the candidate knowledge set to acquire the log to be processed.

[0068] Optionally, the retrieval module 320 is specifically used to: obtain the value of each parameter in the log to be processed; and take the log corresponding to the target parameter whose value is not in the corresponding parameter threshold range as the target log.

[0069] Optionally, the matching module 330 is specifically configured to: query the knowledge database based on the log identifier obtained in response to the log processing request to obtain a regular expression; process the target log based on the regular expression to obtain a target template; calculate the similarity between the target template and the candidate templates in the knowledge database to obtain the template similarity between the target template and the candidate templates; and take the logs of the candidate templates corresponding to the maximum template similarity greater than or equal to a preset similarity threshold as the similar logs.

[0070] Optionally, the generation module 350 is specifically used to: analyze the historical processing information based on the target log and the similar log, determine the parameter to be adjusted and the corresponding target value in the historical processing information; adjust the parameter value of the parameter to be adjusted to the target value to obtain the target processing information.

[0071] Optionally, the device further includes: a second acquisition module, configured to acquire historical logs, as well as log information and historical processing information corresponding to the historical logs; a first processing module, configured to process the historical logs based on regular expressions to obtain a log template and a corresponding log parameter list; a judgment module, configured to determine whether the log parameters have a corresponding threshold range; a second processing module, configured to, when the log parameters have a corresponding threshold range, input the log template and the corresponding log parameter list, the semantic information corresponding to the historical logs, and a first prompt word into a first intelligent agent for processing to obtain the target regular expression; and a storage module, configured to store the log information, the log template and the corresponding log parameter list, the regular expression, the target regular expression, and the historical processing information into the knowledge database.

[0072] Optionally, the device further includes: a third processing module, used to input the historical log and the second prompt word into a second intelligent agent for processing to obtain a historical template and historical parameters; a fourth processing module, used to input the historical log and the third prompt word into a third intelligent agent for processing to obtain log semantic information; and a fifth processing module, used to input the historical template, the historical parameters, the log semantic information, and the fourth prompt word into a fourth intelligent agent for processing to obtain the regular expression.

[0073] The log processing apparatus provided in this disclosure can execute the log processing method provided in this disclosure, and has the corresponding functional modules and beneficial effects for executing the method. Content not described in detail in the apparatus embodiments of this disclosure can be referred to the description in any method embodiment of this disclosure.

[0074] This disclosure also provides an electronic device, including a processor and a memory; the processor executes the steps of the aforementioned log processing method embodiments by calling programs or instructions stored in the memory. To avoid repetition, these steps will not be repeated here.

[0075] This disclosure also provides a computer-readable storage medium that is non-transitory and stores a program or instructions that cause a computer to perform the steps of the aforementioned log processing method embodiments. To avoid repetition, these steps will not be repeated here.

[0076] This disclosure also provides a computer program product for performing the steps of the aforementioned log processing method embodiments.

[0077] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0078] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A log processing method, characterized in that, include: In response to a log processing request sent by a vehicle, obtain the log to be processed and the target regular expression field; The parameter threshold range is determined based on the target regular expression corresponding to the target regular expression field, and the target log is obtained by searching the log to be processed based on the parameter threshold range. Based on the target log, a matching process is performed in the knowledge database to obtain similar logs corresponding to the target log, and historical processing information corresponding to the similar logs is obtained. Based on the target log, the similar log, and the historical processing information, target processing information is generated and sent to the vehicle; wherein, the target processing information is used to instruct the vehicle to perform the target operation.

2. The method according to claim 1, characterized in that, The step of responding to a log processing request sent by the vehicle by obtaining the log to be processed and the target regular expression field includes: In response to the log processing request, obtain the log identifier and candidate logs; Based on the log identifier, a query is performed in the knowledge database to obtain the candidate knowledge set and the target regular expression field; The log to be processed is obtained by searching the candidate log for each knowledge element in the candidate knowledge set.

3. The method according to claim 1, characterized in that, The process of determining a parameter threshold range based on the target regular expression corresponding to the target regular expression field, and then searching the logs to be processed based on the parameter threshold range to obtain the target logs, includes: Obtain the value of each parameter in the log to be processed; The log corresponding to the target parameter whose value is not in the corresponding parameter threshold range is taken as the target log.

4. The method according to claim 1, characterized in that, Based on the target log, a matching process is performed in the knowledge database to obtain similar logs corresponding to the target log, including: Based on the log identifier obtained in response to the log processing request, a regular expression is retrieved from the knowledge database. The target log is processed based on the regular expression to obtain the target template; The similarity between the target template and the candidate templates in the knowledge database is calculated to obtain the template similarity between the target template and the candidate templates; The logs of the candidate templates whose maximum similarity is greater than or equal to the preset similarity threshold are used as the similar logs.

5. The method according to claim 1, characterized in that, The process of generating target processing information based on the target log, the similar logs, and the historical processing information includes: Based on the target log and the similar log, the historical processing information is analyzed to determine the parameters to be adjusted and the corresponding target values ​​in the historical processing information; The parameter value of the parameter to be adjusted is adjusted to the target value to obtain the target processing information.

6. The method according to claim 1, characterized in that, The method further includes: Obtain historical logs, as well as the corresponding log information and historical processing information; The historical logs are processed using regular expressions to obtain log templates and corresponding log parameter lists; Determine whether the log parameters have a corresponding threshold range; When the log parameters have corresponding threshold ranges, the log template and the corresponding log parameter list, the semantic information corresponding to the historical logs and the first prompt word are input into the first intelligent agent for processing to obtain the target regular expression; The log information, the log template and the corresponding log parameter list, the regular expression, the target regular expression, and the historical processing information are stored in the knowledge database.

7. The method according to claim 6, characterized in that, The method further includes: The historical logs and the second prompt words are input into the second intelligent agent for processing to obtain the historical template and historical parameters; The historical logs and the third prompt words are input into a third intelligent agent for processing to obtain log semantic information; The historical template, the historical parameters, the log semantic information, and the fourth prompt word are input into the fourth intelligent agent for processing to obtain the regular expression.

8. A log processing device, characterized in that, The device includes: The response acquisition module is used to respond to the log processing request sent by the vehicle and obtain the log to be processed and the target regular expression field; The retrieval module is used to determine the parameter threshold range based on the target regular expression corresponding to the target regular expression field, and to retrieve the target log based on the parameter threshold range in the log to be processed. The matching module is used to match the target log in the knowledge database and obtain similar logs corresponding to the target log; The first acquisition module is used to acquire historical processing information corresponding to the similar logs; The generation module is used to process the target log, the similar log, and the historical processing information to generate target processing information; A sending module is used to send the target processing information to the vehicle; wherein the target processing information is used to instruct the vehicle to perform a target operation.

9. An electronic device, characterized in that, include: Processor and memory; The processor executes the log processing method as described in any one of claims 1 to 7 by invoking the program or instructions stored in the memory.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program or instructions that cause the computer to perform the log processing method as described in any one of claims 1 to 7.