Log analysis method and system of robot, robot and medium
By using a multi-level filtering mechanism and predictive analysis, anomalies in robot log files are automatically located and analyzed, solving the problems of time-consuming and error-prone manual analysis and improving the efficiency and response speed of anomaly handling.
Patent Information
- Application Number
- CN202511037528.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-10-28
AI Technical Summary
When problems occur in the robot system, log files need to be analyzed manually, which is time-consuming and prone to errors.
An abnormal log file is obtained from multiple sources of robot log files using a multi-level filtering mechanism. Predictive analysis is performed using a preset solution rule base and/or a preset log analysis and prediction model to automatically locate and analyze the abnormal log file.
It enables automatic anomaly location and analysis of robot log files, improving anomaly handling efficiency and enhancing the timeliness of response to anomaly issues.
Smart Images

Figure CN120849232A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, and in particular to a method, system, robot, and medium for log analysis of a robot. Background Technology
[0002] In robotic systems, log files are crucial tools, used for tracking system operations, debugging programs, and troubleshooting—essential parts of computer system maintenance. However, when problems arise in a robotic system, manual analysis of log files is often required, leading to time-consuming and error-prone processes. Summary of the Invention
[0003] To address the aforementioned technical problems, this application provides a method, system, robot, and medium for analyzing robot logs.
[0004] In a first aspect, the present invention provides a method for analyzing robot logs, comprising: Obtain robot multi-source log files; An abnormal log file is obtained from the robot's multi-source log file using a multi-level filtering mechanism; Package the exception log files to obtain an exception log package; Based on a preset solution rule base and / or a preset log analysis prediction model, the abnormal log packets are predicted and analyzed to obtain a predicted anomaly resolution strategy.
[0005] In an optional implementation, the step of employing a multi-level filtering mechanism to determine abnormal log files from the robot's multi-source log files includes: The robot's multi-source log files are filtered according to their error levels to obtain logs with severe errors. The critical error level logs are matched with key information to obtain candidate log files containing key information, including error codes and / or exception keywords; The abnormal log file is determined from the candidate log files using a context extraction algorithm.
[0006] In an optional implementation, the critical information matching of the critical error level log includes: The candidate log files are obtained by matching the severity level using a regular expression engine with predefined error patterns.
[0007] In an optional implementation, determining the abnormal log file from the candidate log files using a context extraction algorithm includes: Obtain the target log timestamp, and determine the log filtering time range based on the target log timestamp and the log filtering time step; The candidate log files are filtered according to the specified log filtering time range to obtain the filtered log files; If session matching is enabled, the target log file with the same session identifier in the filtered log files is identified, and the target log file is identified as the abnormal log file.
[0008] In an optional implementation, the preset solution rule base includes anomaly identifiers and their corresponding anomaly resolution strategies. Predictive analysis of the anomaly log packets based on the preset solution rule base includes: Determine whether the exception identifier of the exception log packet is the same as the exception identifier in the preset solution rule base; If the target anomaly identifier exists, then the target anomaly resolution strategy corresponding to the target anomaly identifier is determined from the preset solution rule base, and the target anomaly resolution strategy is used as the predicted anomaly resolution strategy.
[0009] In an optional implementation, the abnormal log packets are predicted and analyzed according to a preset log analysis prediction model, including: If the target anomaly identifier does not exist, the anomaly log packet is input into the preset log analysis and prediction model; The abnormal log packets are vectorized through the input layer of the preset log analysis and prediction model to obtain a log sequence; The log sequence is predicted and analyzed by the prediction layer of the preset log analysis and prediction model to obtain the prediction anomaly resolution strategy.
[0010] In an optional implementation, the method further includes: using a dynamic hierarchical reporting mechanism to send the predicted anomaly resolution strategy to the user terminal; Receive log fault investigation data from the user terminal, and generate log verification results based on the log fault investigation data.
[0011] Secondly, the present invention provides a log analysis system for a robot, comprising: The acquisition module is used to acquire multi-source log files of the robot; An anomaly localization module is used to determine the anomaly log file from the robot's multi-source log files using a multi-level filtering mechanism; The log packaging module is used to package the exception log files to obtain an exception log package; The log analysis module is used to perform predictive analysis on the abnormal log packets based on a preset solution rule base and / or a preset log analysis prediction model to obtain a predicted anomaly resolution strategy.
[0012] Thirdly, the present invention provides a robot, the robot including a processor and a memory, the memory storing a computer program, the processor being used to execute the computer program to implement the log analysis method of the robot as described in any of the foregoing embodiments.
[0013] Fourthly, the present invention provides a computer storage medium storing a computer program, which, when executed on a processor, implements the log analysis method for a robot according to any one of the foregoing embodiments.
[0014] The embodiments of this application have the following beneficial effects: By acquiring multi-source robot log files; employing a multi-level filtering mechanism to identify abnormal log files from the multi-source robot log files; packaging the abnormal log files to obtain an abnormal log package; and performing predictive analysis on the abnormal log package based on a preset solution rule base and / or a preset log analysis and prediction model to obtain a predicted anomaly resolution strategy. This allows for the automatic location of abnormal log files using a multi-level filtering mechanism, and the automatic analysis and prediction of the corresponding anomaly resolution strategies. This avoids the cumbersome steps of traditional manual analysis and location, improves anomaly handling efficiency, and enhances the timeliness of response to anomalies. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and therefore should not be considered as a limitation on the scope of protection of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 A flowchart illustrating a robot log analysis method provided in an embodiment of this application is shown. Figure 2 This paper illustrates another flowchart of the robot log analysis method provided in an embodiment of the present application; Figure 3 This illustration shows yet another flowchart of the robot log analysis method provided in an embodiment of this application; Figure 4 This paper illustrates another flowchart of the robot log analysis method provided in an embodiment of this application; Figure 5 A schematic diagram of the robot log analysis system provided in an embodiment of this application is shown.
[0017] Icons: 500 - Robot log analysis system; 501 - Acquisition module; 502 - Anomaly location module; 503 - Log packaging module; 504 - Log analysis module. Detailed Implementation
[0018] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0019] The components of the embodiments of this application described and illustrated in the accompanying drawings can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of the embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0020] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.
[0021] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0022] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0023] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0024] This application provides a robot log analysis method, system, robot, and medium, which can automatically locate and analyze anomalies in robot log files, improve the efficiency of robot anomaly handling, and enhance the timeliness of response to anomaly issues.
[0025] See Figure 1The robot log analysis method provided in this embodiment includes steps S101-S104, and can be applied to robot log analysis systems. The steps are described below.
[0026] Step S101: Obtain the robot's multi-source log file.
[0027] In this embodiment, the robot's log analysis system may include an acquisition module, which includes a log data collector. This log data collector can collect multi-source log files from the robot in real time and can also use a fragmented compression storage technology on the collected multi-source log files, achieving a compression rate greater than 70%, thus saving storage space. The multi-source logs include system logs, application logs, database logs, etc., and are not limited thereto.
[0028] Step S102: Use a multi-level filtering mechanism to determine the abnormal log file from the robot's multi-source log files.
[0029] In this embodiment, the robot's log analysis system may further include an anomaly localization module. This module can perform anomaly localization on multi-source log files of the robot based on a multi-level filtering mechanism. After multi-level filtering, the scope is narrowed down from massive logs, improving data processing efficiency. This multi-level filtering mechanism can be a three-level filtering mechanism, including: Level 1: Log-level filtering; Level 2: Key information matching; Level 3: Context extraction. Exemplarily, in the Level 1 filtering process, regular expressions are used to match predefined data formats (such as error codes, timestamp formats, etc.). In the Level 2 filtering process, through structured parsing, Session IDs are directly extracted from fixed-format logs (such as JSON) by field. In the Level 3 filtering process, logs within the range [t0-5min, t0+5min] are extracted, centered on the anomaly occurrence time t. Here, (t0-5min) represents the 5 minutes before t0, and (t0+5min) represents the 5 minutes after t0, for a total range of 10 minutes.
[0030] The following is combined Figure 2 The three-stage filtering mechanism is explained. See [link / reference]. Figure 2 Step S102 includes steps S1021-S1023, and each step is explained below.
[0031] Step S1021: Filter the robot's multi-source log files according to the log error level to obtain critical error level logs.
[0032] In this step, filtering non-critical error level logs to obtain critical error level logs can reduce data processing volume by 90%, thereby reducing log volume and subsequent processing, achieving the effect of saving computing resources. Critical error levels include ERROR / CRITICAL levels. ERROR level: The system experiences a recoverable exception, but may affect current operations or some functions. CRITICAL level: A critical system component crashes, making the entire service or core function completely unavailable. Non-critical error levels include non-ERROR / CRITICAL levels, and non-ERROR / CRITICAL level logs include: DEBUG logs, INFO logs, WARNING logs, etc., without restriction here.
[0033] Step S1022: Perform key information matching on the critical error level logs to obtain candidate log files containing key information, including error codes and / or abnormal keywords.
[0034] In this embodiment, step S1022 includes: matching the severity error level using a predefined error pattern through a regular expression engine to obtain the candidate log file.
[0035] For example, the predefined error mode is ( / Timeout|Failed|Exception / i), where: Timeout: Interface response timeout, database lock timeout, locating performance bottlenecks or resource contention issues; Failed: Service call failure, resource allocation failure, identifying operation interruption or dependency failure; Exception: Java's NullPointerException, Python's KeyError, catching programming errors or data exceptions; i modifier: ignores capitalization, ensuring matching of Exception, exception, and other variants.
[0036] In this embodiment, error codes include, for example: 1003 (access denied); 5001 (data source type does not exist); and other error codes, which are not limited here. Exception keywords include: KeyError (missing dictionary key, e.g., `dict['undefined_key']`); TypeError (type operation error, e.g., `int + str`); ConnectionReset (network connection interrupted). Other exception keywords are also not limited here.
[0037] Step S1023: Use a context extraction algorithm to determine the abnormal log file from the candidate log files.
[0038] In this embodiment, step S1023 includes: obtaining the target log timestamp, and determining the log filtering time range based on the target log timestamp and the log filtering time step. The candidate log files are filtered according to the specified log filtering time range to obtain the filtered log files; If session matching is enabled, the target log file with the same session identifier in the filtered log files is identified, and the target log file is identified as the abnormal log file.
[0039] As an example, the context extraction algorithm can also be understood as an association factor extraction algorithm. A key code example of this context extraction algorithm is shown below: def extract_context(log, target_log, time_window=5, session_match=True): # Extract target log timestamp t0 t0 = parse_timestamp(target_log) # Filter logs within the range of [t0-5min, t0+5min] context_logs = [log for log in logs if abs(parse_timestamp(log) - t0)<= time_window] # If session matching is enabled, only logs with the same Session ID will be retained. if session_match: context_logs=filter(lambda log: log['session_id'] == target_log['session_id'], context_logs) return sort_by_time(context_logs) # Sort by timestamp and then package.
[0040] This three-tiered anomaly localization mechanism, through level filtering, key information matching, and context extraction, achieves accurate capture of non-isolated anomalies. It can automatically locate and analyze anomaly logs in the robot system log file, avoiding the tedious steps of traditional manual analysis and localization, thus improving anomaly handling efficiency.
[0041] Step S103: Package the exception log file to obtain an exception log package.
[0042] In this embodiment, the associated exception log files are sorted by time and compressed into structured data packets (such as JSON / Parquet).
[0043] Step S104: Perform predictive analysis on the abnormal log package according to the preset solution rule base and / or preset log analysis prediction model to obtain the predicted abnormal resolution strategy.
[0044] It is understandable that the predictive anomaly resolution strategy is a solution strategy proposed for anomaly log packages. It does not require manual analysis. Based on the preset solution rule base and / or preset log analysis prediction model, the corresponding predictive anomaly resolution strategy can be quickly obtained, thereby improving the timeliness of anomaly response.
[0045] In this embodiment, the preset solution rule base can be defined as a Frequently Asked Questions Repository (FAQ). The preset solution rule base stores solutions to known anomalies, such as the solution for error code 30013 being "memory overflow, service restart required." It can also include other anomalies and their corresponding solutions, without limitation. Predictive analysis is performed using the preset solution rule base and a preset log analysis and prediction model. The preset solution rule base provides solutions for known log anomalies, while the preset log analysis and prediction model covers unknown log anomalies, achieving self-evolution of analytical capabilities through incremental learning. The preset log analysis and prediction model can be trained based on a Long Short-Term Memory (LSTM) network, a special type of recurrent neural network (RNN) designed to address the long-term dependency problem of traditional RNNs. In this embodiment, the LSTM needs to be pre-trained, and the training data includes: sensor time-series data, system status logs, environmental and operational labels, etc. The model training process includes: data preprocessing, LSTM model construction and compilation, and training and tuning of the constructed LSTM.
[0046] In this embodiment, the located anomaly logs and corresponding predicted anomaly resolution strategies can be reported in real time. Once an anomaly occurs, it is immediately located, analyzed, and reported, enhancing the timeliness of problem response. Furthermore, by extracting key information and identifying anomalies, predictive anomaly resolution strategies are derived through intelligent analysis, reducing manual intervention. For new problems, manual feedback continuously improves the accuracy of analysis, gradually freeing up manpower needed for problem investigation.
[0047] In this embodiment, the preset solution rule base includes exception identifiers and their corresponding exception resolution strategies, wherein the exception identifier can be an error code. See also Figure 3The steps of predicting and analyzing the abnormal log package according to the preset solution rule base may include steps S1041-S1042, and each step is described below.
[0048] Step S1041: Determine whether the exception identifier of the exception log package and the exception identifier of the preset solution rule base have the same target exception identifier. Step S1042: If the target anomaly identifier exists, then determine the target anomaly resolution strategy corresponding to the target anomaly identifier from the preset solution rule base, and use the target anomaly resolution strategy as the predicted anomaly resolution strategy.
[0049] For example, if the exception log packet contains error code 30013, the preset solution rule base also contains error code 30013, and the solution corresponding to error code 30013 is "memory overflow, service needs to be restarted," then error code 30013 is the target exception identifier. Using "memory overflow, service needs to be restarted" as the target exception identifier means determining "memory overflow, service needs to be restarted" as the predicted exception resolution strategy. When the robot executes the service restart, the memory overflow exception problem can be resolved.
[0050] In this embodiment, see Figure 4 The step of performing predictive analysis on the abnormal log package according to the preset log analysis prediction model may include steps S1043-S1045.
[0051] Step S1043: If the target anomaly identifier does not exist, the anomaly log package is input into the preset log analysis and prediction model.
[0052] Step S1044: The abnormal log packet is vectorized through the input layer of the preset log analysis and prediction model to obtain a log sequence.
[0053] For example, if the exception identifier of the exception log package contains error code 30014, the exception identifier of the preset solution rule base contains error code 30013, and the solution corresponding to error code 30013 is "memory overflow, service needs to be restarted", and there is no error code 30014, it means that the preset solution rule base cannot provide an exception resolution strategy corresponding to error code 30014, and it is necessary to perform predictive analysis through the preset log analysis prediction model.
[0054] In this embodiment, log vectorization includes Word2Vec word embedding and timestamp normalization processes, which are described in detail below. Word2Vec word embedding refers to converting discrete words in log text into dense vectors while preserving semantic relevance. The specific steps of Word2Vec word embedding include: 1. Log word segmentation, for example, original log: 2023-07-01 08:05:23 ERROR Database connection timeout from 192.168.1.1; word vectors obtained after segmentation: ["ERROR", "Database", "connection", "timeout", "from", "192.168.1.1"]); 2. Training word vectors. Timestamp normalization is the conversion of timestamps of different formats into a unified format and unit. The vectorized log is in array format, such as ["ERROR", "timeout"]. After log vectorization, the corresponding log sequence is obtained.
[0055] Step S1045: The log sequence is predicted and analyzed by the prediction layer of the preset log analysis and prediction model to obtain the prediction anomaly resolution strategy.
[0056] In this embodiment, the prediction layer of the preset log analysis prediction model includes a prediction function, which includes the following formula: P(y|x)=softmax(W∙LSTM(x)+b), where x is the log sequence, y is the anomaly type label (such as "database connection timeout"), and P is the prediction probability. LSTM(x) extracts temporal features from the log sequence (such as the frequent occurrence of the "retry request" + "CPU spike" pattern before "database connection timeout"); the weight matrix W is the "knowledge base" of LSTM, storing long-term dependencies between features; the bias b is the "regulating valve" of the gating, dynamically adjusting the activation threshold to adapt to the data distribution. For example, if a certain log keyword (such as ERROR) frequently appears in the preceding events of a fault, the corresponding weight in W increases; if a certain log keyword (such as ERROR) rarely appears in the preceding events of a fault, the corresponding weight in W decreases. softmax is the normalization function of LSTM. In this embodiment, the prediction anomaly resolution strategy can be determined based on the prediction probability P.
[0057] In this embodiment, the log analysis method of the robot further includes: sending the predicted anomaly resolution strategy to the user terminal using a dynamic hierarchical reporting mechanism; receiving log fault investigation data from the user terminal; and generating log verification results based on the log fault investigation data.
[0058] In this embodiment, the preset log analysis and prediction model can be optimized by feeding back log fault diagnosis data, updating the weight matrix W of the preset log analysis and prediction model, and achieving adaptive adjustment of the learning rate. If a certain log keyword (such as ERROR) frequently appears in the preceding events of the fault, the corresponding weight in W is increased, making the input gate pay more attention to this type of signal. If the historical CPU load is irrelevant to the current fault, the corresponding weight in W approaches 0, causing it to be forgotten. The output can be adjusted by adjusting the bias b to improve accuracy. The initial value of b is 1 to ensure that all historical information is retained in the initial stage. b is gradually decreased in subsequent training to suppress the output of noisy logs and improve diagnostic accuracy.
[0059] It should be noted that the dynamic hierarchical reporting strategy can optimize the push path based on the anomaly level and historical processing efficiency, reducing invalid alarms by 60%. In this embodiment, anomalies can be classified, and different dynamic reporting mechanisms can be used for different levels to report the anomaly resolution strategy. The following is an example table of anomaly classification strategies.
[0060] Table 1. Example Table of Anomaly Classification Strategies
[0061] In this embodiment, a push optimization algorithm can also be provided, which can select recipients based on historical processing efficiency. For example, database anomalies can be prioritized for push notifications to the DBA team.
[0062] The following example illustrates a payment timeout failure in an e-commerce system: 1) Anomaly localization: Level 1: Capture ERROR log: 2025-05-21 10:05:23 [ERROR] Payment timeout,code=5008; Level 2: Matching the keyword "Payment"; Level 3: Extracting logs from the same session ID between 10:00:00 and 10:10:00 revealed an association anomaly: [WARN] Database connection pool exhausted.
[0063] 2) Intelligent Analysis: The default solution rule base (i.e., FAQ base) did not match code=408, triggering a prediction by the default log analysis and prediction model. The default log analysis and prediction model outputs the prediction result: "Database connection pool exhausted, causing payment failure; it is recommended to expand the connection pool." If the anomaly level of the prediction result is determined to be "high," the operations and maintenance personnel will be notified via email and instant messaging. The dynamically reported content includes: analysis conclusions, related log packages, and expansion operation guidelines. Upon receiving the message "Database connection pool exhausted, causing payment failure; it is recommended to expand the connection pool," the operations and maintenance personnel will perform log maintenance and troubleshooting, obtain log fault investigation data, generate log verification results based on the log fault investigation data, and feed the log verification results back to the default log analysis and prediction model. The default log analysis and prediction model will then perform incremental training based on the log verification results to optimize and adjust the weight matrix W and bias b in the prediction function P(y|x)=softmax(W∙LSTM(x)+b).
[0064] The robot log analysis method provided in this embodiment obtains multi-source robot log files; uses a multi-level filtering mechanism to identify abnormal log files from the multi-source robot log files; packages the abnormal log files to obtain an abnormal log package; and performs predictive analysis on the abnormal log package according to a preset solution rule base and / or a preset log analysis prediction model to obtain a predicted anomaly resolution strategy. This method can automatically locate abnormal log files and automatically analyze and predict the corresponding anomaly resolution strategies for robot log files using a multi-level filtering mechanism, avoiding the cumbersome steps of traditional manual analysis and location, improving anomaly handling efficiency, and enhancing the timeliness of response to anomalies.
[0065] In addition, this application provides a log analysis system for robots.
[0066] like Figure 5 As shown, the robot's log analysis system 500 includes: Module 501 is used to acquire multi-source log files of the robot; Anomaly localization module 502 is used to determine anomaly log files from the robot's multi-source log files using a multi-level filtering mechanism; Log packaging module 503 is used to package the exception log file to obtain an exception log package; The log analysis module 504 is used to perform predictive analysis on the abnormal log packets according to the preset solution rule base and / or the preset log analysis prediction model to obtain the predicted abnormal resolution strategy.
[0067] In one embodiment, the anomaly localization module 502 is further configured to filter the robot's multi-source log files according to the log error level to obtain a critical error level log. The critical error level logs are matched with key information to obtain candidate log files containing key information, including error codes and / or exception keywords; The abnormal log file is determined from the candidate log files using a context extraction algorithm.
[0068] In one embodiment, the anomaly location module 502 is further configured to match the severity error level using a predefined error pattern through a regular expression engine to obtain the candidate log file.
[0069] In one embodiment, the anomaly location module 502 is further configured to obtain the target log timestamp and determine the log filtering time range based on the target log timestamp and the log filtering time step. The candidate log files are filtered according to the specified log filtering time range to obtain the filtered log files; If session matching is enabled, the target log file with the same session identifier in the filtered log files is identified, and the target log file is identified as the abnormal log file.
[0070] In one embodiment, the preset solution rule base includes anomaly identifiers and their corresponding anomaly resolution strategies. The log analysis module 504 is also used to determine whether there is a target anomaly identifier in the anomaly identifier of the anomaly log packet and the anomaly identifier in the preset solution rule base. If the target anomaly identifier exists, then the target anomaly resolution strategy corresponding to the target anomaly identifier is determined from the preset solution rule base, and the target anomaly resolution strategy is used as the predicted anomaly resolution strategy.
[0071] In one embodiment, the log analysis module 504 is further configured to input the abnormal log packet into the preset log analysis prediction model if the target abnormal identifier does not exist. The abnormal log packets are vectorized through the input layer of the preset log analysis and prediction model to obtain a log sequence; The log sequence is predicted and analyzed by the prediction layer of the preset log analysis and prediction model to obtain the prediction anomaly resolution strategy.
[0072] In one embodiment, the robot's log analysis system includes: a sending module, used to send the predicted anomaly resolution strategy to the user terminal using a dynamic hierarchical reporting mechanism; Receive log fault investigation data from the user terminal, and generate log verification results based on the log fault investigation data.
[0073] The robot log analysis system 500 provided in this embodiment can implement the robot log analysis method described above. To avoid repetition, it will not be described again here.
[0074] The robot log analysis system provided in this embodiment acquires multi-source robot log files; uses a multi-level filtering mechanism to identify abnormal log files from these files; packages the abnormal log files into an abnormal log package; and performs predictive analysis on the abnormal log package based on a preset solution rule base and / or a preset log analysis prediction model to obtain a predicted anomaly resolution strategy. This system can automatically locate abnormal log files and automatically analyze and predict the corresponding anomaly resolution strategies using a multi-level filtering mechanism, avoiding the tedious steps of traditional manual analysis and location, improving efficiency, and enhancing the timeliness of response to anomalies.
[0075] Furthermore, this application provides a robot, including a memory and a processor. The memory stores a computer program, which, when run on the processor, executes the steps of the aforementioned robot log analysis method or performs the functions of various modules in the aforementioned robot log analysis system.
[0076] The robot provided in this embodiment can implement the log analysis method of the robot described above, or execute the functions of various modules in the log analysis system of the robot described above. To avoid repetition, it will not be described again here.
[0077] The processor can be an integrated circuit chip with signal processing capabilities. The processor can be a general-purpose processor, including at least one of a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Network Processor (NP), Digital Signal Processor (DSP), Application-Specific Integrated Circuit (ASIC), Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application.
[0078] The memory can be, but is not limited to, Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), etc. The memory is used to store computer programs, and the processor can execute the computer programs accordingly after receiving execution instructions.
[0079] This application also provides a computer storage medium for storing the computer program used in the robot described above. The computer storage medium can be a readable storage medium, a non-volatile storage medium, or a volatile storage medium. For example, the computer storage medium may include, but is not limited to, various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0080] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, in alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0081] In addition, the functional modules or units in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0082] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a robot to execute all or part of the steps of the methods described in the various embodiments of this application.
[0083] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A method for analyzing robot logs, characterized in that, include: Obtain robot multi-source log files; An abnormal log file is obtained from the robot's multi-source log file using a multi-level filtering mechanism; Package the exception log files to obtain an exception log package; Based on a preset solution rule base and / or a preset log analysis prediction model, the abnormal log packets are predicted and analyzed to obtain a predicted anomaly resolution strategy.
2. The robot log analysis method according to claim 1, characterized in that, The step of using a multi-level filtering mechanism to determine abnormal log files from the robot's multi-source log files includes: The robot's multi-source log files are filtered according to their error levels to obtain logs with severe errors. The critical error level logs are matched with key information to obtain candidate log files containing key information, including error codes and / or exception keywords; The abnormal log file is determined from the candidate log files using a context extraction algorithm.
3. The robot log analysis method according to claim 2, characterized in that, The critical information matching of the critical error level logs includes: The candidate log files are obtained by matching the severity level using a regular expression engine with predefined error patterns.
4. The robot log analysis method according to claim 2, characterized in that, The step of using a context extraction algorithm to determine the abnormal log file from the candidate log files includes: Obtain the target log timestamp, and determine the log filtering time range based on the target log timestamp and the log filtering time step; The candidate log files are filtered according to the specified log filtering time range to obtain the filtered log files; If session matching is enabled, the target log file with the same session identifier in the filtered log files is identified, and the target log file is identified as the abnormal log file.
5. The robot log analysis method according to claim 2, characterized in that, The preset solution rule base includes anomaly identifiers and their corresponding anomaly resolution strategies. Predictive analysis of the anomaly log packets is performed based on the preset solution rule base, including: Determine whether the exception identifier of the exception log packet is the same as the exception identifier in the preset solution rule base; If the target anomaly identifier exists, then the target anomaly resolution strategy corresponding to the target anomaly identifier is determined from the preset solution rule base, and the target anomaly resolution strategy is used as the predicted anomaly resolution strategy.
6. The robot log analysis method according to claim 5, characterized in that, The abnormal log packets are predicted and analyzed according to a preset log analysis and prediction model, including: If the target anomaly identifier does not exist, the anomaly log packet is input into the preset log analysis and prediction model; The abnormal log packets are vectorized through the input layer of the preset log analysis and prediction model to obtain a log sequence; The log sequence is predicted and analyzed by the prediction layer of the preset log analysis and prediction model to obtain the prediction anomaly resolution strategy.
7. The robot log analysis method according to any one of claims 1-6, characterized in that, Also includes: A dynamic hierarchical reporting mechanism is used to send the predicted anomaly resolution strategy to the user terminal. Receive log fault investigation data from the user terminal, and generate log verification results based on the log fault investigation data.
8. A log analysis system for a robot, characterized in that, include: The acquisition module is used to acquire multi-source log files of the robot; An anomaly localization module is used to determine the anomaly log file from the robot's multi-source log files using a multi-level filtering mechanism; The log packaging module is used to package the exception log files to obtain an exception log package; The log analysis module is used to perform predictive analysis on the abnormal log packets based on a preset solution rule base and / or a preset log analysis prediction model to obtain a predicted anomaly resolution strategy.
9. A robot, characterized in that, The robot includes a processor and a memory, the memory storing a computer program, and the processor executing the computer program to implement the log analysis method of the robot according to any one of claims 1-7.
10. A computer storage medium, characterized in that, It stores a computer program that, when executed on a processor, implements the log analysis method for the robot according to any one of claims 1-7.