Log diagnosis method and device applied to chemical process simulation software, equipment and medium
By extracting and matching key features from log data in chemical process simulation software, and combining this with a pre-trained log diagnostic library and system architecture, the problems of low efficiency and insufficient accuracy in log diagnosis of chemical process simulation software are solved, enabling rapid and accurate fault location and diagnosis.
Patent Information
- Application Number
- CN202411488673.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2024-11-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing log diagnostic methods for chemical process simulation software are inefficient and prone to misjudgment. Automated tools lack a deep understanding of specific system environments, resulting in insufficient accuracy of diagnostic results.
By acquiring target log data from chemical process simulation software, key features such as timestamps, exception codes, and keywords are extracted using a keyword library. These features are then matched and combined with a pre-trained log diagnostic library to determine the matching results and prompts. Finally, the diagnostic results are determined, and fault location is performed in conjunction with the system architecture and business processes.
It improves the diagnostic efficiency and accuracy of log data, accurately locates the location and cause of anomalies, reduces operation and maintenance costs, and improves operation and maintenance efficiency.
Smart Images

Figure CN119003312A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to a log diagnosis method, device, equipment and medium applied to chemical process simulation software. Background Art
[0002] In the chemical industry, chemical process simulation software plays a vital role. It can help engineers design and optimize chemical process flows, predict process performance and product quality, etc. When chemical process simulation software fails or experiences an abnormality during operation, the location of the failure can be determined by analyzing the logs.
[0003] Traditional log anomaly diagnosis methods mostly rely on manual analysis and empirical judgment. For complex information systems, the log volume is huge, the information is redundant and messy, which makes the diagnosis process inefficient and prone to misjudgment. In addition, although some existing automated diagnosis tools can improve efficiency, they often lack in-depth understanding of specific system environments, and the accuracy of diagnosis results needs to be improved.
[0004] Therefore, how to provide a technical solution that can quickly and accurately diagnose log data is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention
[0005] The present application provides a log diagnosis method, device, equipment and medium applied to chemical process simulation software, which improves the diagnostic efficiency and accuracy of log data by combining and matching key features in the log data.
[0006] According to one aspect of the present application, a log diagnosis method applied to chemical process simulation software is provided, the method comprising: acquiring target log data of the chemical process simulation software, and extracting key features in the target log data based on a keyword library; wherein the key features include at least one of a timestamp, an exception code and a keyword; matching the key features with a pre-trained log diagnosis library to obtain matching items, and combining the matching items to obtain combined items; matching the combined items based on the log diagnosis library to determine a matching result and a prompt message corresponding to the matching result; and determining a diagnostic result of the target log data according to the prompt message.
[0007] Furthermore, obtaining target log data of the chemical process simulation software includes: obtaining a log configuration file according to a preset path; and obtaining target log data of the chemical process simulation software according to the log configuration file.
[0008] Furthermore, according to the log configuration file, the target log data of the chemical process simulation software is obtained, including: determining the storage path of the target log data according to the log configuration file; reading from the last read node according to the storage path, obtaining the target log data of the chemical process simulation software, and recording the current reading node.
[0009] Furthermore, after obtaining the target log data of the chemical process simulation software, the method includes: cleaning the target log data to obtain valid data; and standardizing the valid data to obtain standardized data.
[0010] Furthermore, the training method of the log diagnosis library includes: obtaining historical log data with labels; wherein the labels are fault categories; and using the historical log data to train an initial model to obtain a log diagnosis library.
[0011] Furthermore, after determining the diagnostic result of the target log data according to the prompt information, the method also includes: if the diagnostic result is an abnormality, locating the fault according to the diagnostic result, system architecture and business process to determine the fault point; and generating a diagnostic report based on the diagnostic result.
[0012] Furthermore, after generating a diagnosis report according to the diagnosis result, the method further includes: sending the diagnosis report and the fault point to a target early warning address.
[0013] According to another aspect of the present application, a log diagnosis device applied to chemical process simulation software is provided, and the device includes: a log acquisition module, which is used to acquire target log data of the chemical process simulation software, and extract key features in the target log data based on a keyword library; wherein the key features include at least one of a timestamp, an exception code and a keyword; a feature extraction module, which is used to match the key features with a pre-trained log diagnosis library to obtain matching items, and combine each of the matching items to obtain a combination item; a feature matching module, which is used to match the combination item based on the log diagnosis library, determine the matching result and the prompt information corresponding to the matching result; and a log diagnosis module, which is used to determine the diagnosis result of the target log data according to the prompt information.
[0014] According to another aspect of the present application, an electronic device is provided, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the log diagnosis method applied to chemical process simulation software described in any embodiment of the present application.
[0015] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the log diagnosis method applied to chemical process simulation software described in any embodiment of the present application when executed.
[0016] The technical solution provided by the present application obtains the target log data of the chemical process simulation software, and extracts the key features in the log data based on the keyword library; wherein the key features include at least one of the timestamp, the exception code and the keyword; the key features are matched with the pre-trained log diagnosis library to obtain matching items, and the matching items are combined to obtain combination items; the combination items are matched based on the log diagnosis library to determine the matching results and the prompt information corresponding to the matching results; the diagnostic results of the target log data are determined according to the prompt information. The present technical solution improves the diagnostic efficiency and accuracy of the log data by combining and matching the key features in the log data.
[0017] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 A flow chart of a log diagnosis method applied to chemical process simulation software provided in Example 1 of the present application.
[0020] Figure 2 A flow chart of a log diagnostic method applied to chemical process simulation software provided in Example 2 of the present application.
[0021] Figure 3 A structural schematic diagram of a log diagnostic device applied to chemical process simulation software provided in Example 3 of the present application.
[0022] Figure 4 It is a structural schematic diagram of a device for implementing a log diagnosis method applied to chemical process simulation software in an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "target", "history", "preset", "effective", "standardized", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] Embodiment 1
[0026] Figure 1 This is a flow chart of a log diagnostic method applied to chemical process simulation software provided in Example 1 of the present application. This embodiment can be applied to the situation of diagnosing the system operation log of chemical process simulation software. The method can be executed by a log diagnostic device applied to chemical process simulation software. The log diagnostic device applied to chemical process simulation software can be implemented in the form of hardware and / or software. The log diagnostic device applied to chemical process simulation software can be configured in a device with data processing capabilities. Figure 1 As shown, the method includes:
[0027] S110, acquiring target log data of chemical process simulation software, and extracting key features in the target log data based on a keyword library.
[0028] The key feature includes at least one of a timestamp, an abnormal code and a keyword.
[0029] The target log data may be the record information generated by the chemical process simulation software during operation. The record information may include timestamp, event type, operation details, error information, and other information reflecting the operation status and user behavior. Specifically, the log file may be read directly, obtained through the API interface of the log management system, or collected centrally using log collection tools.
[0030] The keyword library may be a predefined vocabulary set, for example, the error keyword "Error", the operation failure keyword "Failure", the high latency keyword "Latency", the user access denied keyword "Access denied", and so on.
[0031] Keywords are usually associated with specific business needs, problem types or key features. For example, in the chemical industry, there are keywords related to chemical production, such as initial conditions, material properties, process parameters, output, and energy consumption; in the e-commerce field, there are keywords related to the order payment process, such as "Order canceled" and "Refund requested"; in the social field, there are keywords related to social interaction, such as "Message sent" and "Friend request sent", and keywords related to user management, such as "User blocked"; in the game field, there are keywords related to the game process, such as "Level up" and "Quest completed", and keywords related to game play and pricing, such as "In-game purchase" and "Multiplayer match started".
[0032] Therefore, this application can pre-set the corresponding default keywords according to specific business needs, problem types or key features. During the operation of the system, new keywords will be continuously learned and added, and keywords in log information will be extracted through the keyword library. If a keyword does not exist in the keyword library, it can be reversely inserted into the keyword library. For example, if a keyword appears multiple times and is accompanied by a system crash log at the same time, the keyword can be defined as a system failure keyword.
[0033] The timestamp can be the time when an event occurred, which can be used to analyze the order of fault occurrence, determine the time period when the fault occurred, and analyze the operation trend. For example, in a log data, a record is found as "2020-01-01 10:30:15 [Error] Connection timed out." Here, "2020-01-01 10:30:15" is the timestamp, which clearly indicates the specific time when the connection timeout error occurred.
[0034] The exception code is a specific code generated by the system when an abnormal situation occurs, which is used to indicate the type and nature of the problem. For example, in the log data of a financial application, a record "ERROR_CODE_1001: Insufficient balance" is found. The exception code 1001 indicates that the user account balance is insufficient.
[0035] In this application, a keyword library can be built according to specific analysis needs, historical data and business scenarios; the target log data can be compared with the keyword library using string matching algorithms, regular expressions and other technologies to find records containing keywords; for log records that match the keywords, further analysis and extraction of key features are performed, such as extracting relevant time information, user information, event types, error codes, etc. The extraction rules and methods can be defined according to specific needs.
[0036] Optionally, obtaining target log data of the chemical process simulation software includes: obtaining a log configuration file according to a preset path; and obtaining target log data of the chemical process simulation software according to the log configuration file.
[0037] The preset path can be a path determined during the development phase of the application or when the system is deployed. The preset path can be a relative path, relative to the installation directory or running directory of the application; or it can be an absolute path, which clearly specifies the specific location in the file system.
[0038] For example, the preset path of a Java application is " / opt / app / config / log.properties", which means that the "log.properties" file in the " / opt / app / config" directory on the server is the log configuration file. For another example, based on the log4net log library, the target log data of the chemical process simulation software can be obtained by reading the system's log configuration file log4net.config.
[0039] The log configuration file may be a file that defines important parameters such as the log storage location, content structure, log level, retention time, and output format. The log data may be divided into debug logs, fatal logs, error logs, warning logs, and information logs according to the log level. For example, if the log level is specified as "INFO" in the log configuration file, it means that only logs above the information level will be recorded.
[0040] Specifically, if the log is stored in the local file system, the target log data of the chemical process simulation software can be obtained through file reading operations; if the log is stored in the database, the log data can be obtained through database connection and query statements.
[0041] Optionally, according to the log configuration file, the target log data of the chemical process simulation software is obtained, including: according to the log configuration file, determining the storage path of the target log data; reading from the last read node according to the storage path, obtaining the target log data of the chemical process simulation software, and recording the current reading node.
[0042] Specifically, the log configuration file may be parsed to obtain parameters of the log configuration file, thereby determining a storage path for target log data.
[0043] In order to ensure the integrity and continuity of the target log data, and at the same time avoid repeated reading of processed log data and improve data processing efficiency, this application obtains the target log data of the chemical process simulation software by reading from the last read node.
[0044] The read node can be a byte offset or a row number, which is stored in a separate file, database table, or memory variable.
[0045] For example, a monitoring system needs to read server logs in real time to detect abnormal situations. The system determines that the logs are stored in " / data / logs / server.log" based on the log configuration file. When reading for the first time, the system starts from the beginning of the file and records the initial read node as byte offset 0. After processing a part of the log, the system records the current read node as byte offset 1024. At the next startup, the system will continue to read log data from byte offset 1024 to ensure that the part that has been read is not processed repeatedly.
[0046] Optionally, after acquiring target log data of the chemical process simulation software, the method includes: cleaning the target log data to obtain valid data; and standardizing the valid data to obtain standardized data.
[0047] The target log data may contain some erroneous records, duplicate entries, irrelevant system information, etc. In order to make the subsequent data analysis and processing more accurate and efficient, this application cleans the target log data.
[0048] Specifically, for records with incorrect formats, you can check whether the format of the log data meets expectations, such as whether the timestamp is correct, whether the field separators are consistent, etc. If the format is incorrect, you can discard it or try to repair it; for duplicate data, you can identify and remove duplicate data by comparing the key information of the records; for irrelevant information, you can determine the irrelevant information in the target log data based on specific analysis needs and filter it out of the target log data; for missing values, you can use default values to fill in missing fields, or ignore them during analysis.
[0049] After cleaning, valid data may still have problems such as inconsistent formats and inconsistent units. This application standardizes the valid data to convert it into a unified format and standard to improve the quality and reusability of the data, so that log data from different sources can be better integrated and processed.
[0050] Specifically, for time format, the ISO 8601 standard format can be used. This makes it easy to perform time series analysis and comparison; for field naming and types, the field names or data types of the same information can be unified; for units, unit conversion can be used to achieve unit unification, for example, all length data can be converted to meters, and all time data can be converted to seconds; for data encoding, all text data can be converted to a unified encoding format, such as UTF-8.
[0051] For example, for the log data of a certain Web server, first clean it to remove records with incorrect formats, repeated requests, and irrelevant system internal logs. Then, standardize the valid data after cleaning, unify the time format to "YYYY-MM-DD HH:MM:SS", convert the request status code to integer type, and convert the request size to byte unit. The standardized data processed in this way can be more convenient for data analysis and mining, such as counting the number of requests in different time periods, analyzing the distribution of request response time, etc.
[0052] S120: Match the key features with a pre-trained log diagnosis library to obtain matching items, and combine the matching items to obtain combined items.
[0053] The log diagnosis library can be a knowledge base built by analyzing and learning a large amount of historical log data, and can contain various known problem patterns, abnormal situations, and corresponding solutions. The log diagnosis library can exist in the form of a database, file system, or other data storage. For example, it can be a relational database, in which each record represents a fault mode, including fields such as fault characteristics, fault categories, solutions, and prompt information.
[0054] In the present application, key features extracted from the target log data, such as timestamps, exception codes, and keywords, can be compared one by one with the contents in the log diagnostic library; when the comparison is successful, the matching key features and the corresponding contents in the log diagnostic library are recorded, and the corresponding contents of the log diagnostic library are used as matching items.
[0055] Specifically, the match can be based on one or more of the following methods: exact match, fuzzy match, or pattern match. For example, if the exception code in the key feature is exactly the same as a known exception code in the log diagnosis library, it is an exact match; if the keyword has a certain degree of semantic similarity with some descriptions in the log diagnosis library, it is a fuzzy match.
[0056] Since a single match can only provide partial information, this application combines multiple matches to construct more complex problem scenarios. For example, multiple different key features may point to a specific system failure, and by combining these features, the problem can be diagnosed more accurately.
[0057] In the present application, combination can be performed based on the logical relationship between key features. For example, if multiple log records with similar timestamps match the same exception code or keyword, these matching items can be combined together. Combination can also be performed based on the hierarchical structure of the problem. For example, low-level key features are first combined into middle-level combination items, and then the middle-level combination items are further combined into higher-level problem descriptions. Each matching item can also be combined in sequence in a recursive manner. For example, if there are three matching items a, b and c, they can be combined into four combination items ab, ac, bc and abc in sequence.
[0058] During the combination process, data structures such as lists, dictionaries, or custom data objects can be used to store the combined items for subsequent analysis and processing.
[0059] Optionally, the training method of the log diagnosis library includes: obtaining historical log data with labels; wherein the labels are fault categories; and using the historical log data to train an initial model to obtain a log diagnosis library.
[0060] Among them, historical log data can be collected from server logs, application logs, database logs, etc. For example, a company's server may record a large number of system operation logs, including request processing time, error information, access logs, etc., and the above data can be used as historical log data. Tags can be the annotations of fault categories in historical log data, which are usually determined by manual annotation or automation.
[0061] The initial model can be a machine learning algorithm or a deep learning model, and the specific choice depends on the characteristics of the log data and the analysis requirements. Common models include decision trees, random forests, support vector machines, neural networks, etc. For example, if the log data has high dimensions and complex feature relationships, a neural network model can be selected as the initial model; if the data volume is small and the features are more obvious, a decision tree or random forest is selected as the initial model.
[0062] Specifically, the labeled historical log data can be divided into a training set and a test set. The training set is used to train the model, and the test set is used to evaluate the performance of the model. For the selected initial model, the training set is used for training to adjust the parameters of the model so that the model can predict the fault category of the log data as accurately as possible.
[0063] During model training, various optimization algorithms and evaluation indicators can be used to improve model performance. For example, the cross entropy loss function is used as the optimization target, and the model parameters are adjusted through the gradient descent algorithm; the accuracy, recall rate, F1 value and other indicators are used to evaluate the performance of the model.
[0064] The trained model can be used as the core part of the log diagnosis library to predict the fault category of log data and provide a basis for fault diagnosis. In addition to the model itself, the log diagnosis library can also include some auxiliary information, such as characteristic descriptions of common faults, solution suggestions, etc., which can be obtained through the analysis and summary of historical log data.
[0065] S130: Match the combination items based on the log diagnosis library to determine a matching result and prompt information corresponding to the matching result.
[0066] Specifically, the combination item can be matched with the content in the log diagnosis library based on exact matching, fuzzy matching or pattern matching to determine the matching result. The matching result can be a Boolean value, which is used to indicate whether the match is successful; or a matching degree value, which is used to indicate the similarity between the combination item and the record in the log diagnosis library.
[0067] The prompt information may include a description of the problem, possible cause analysis, and suggested steps to solve the problem. For example, if the matching result is a database connection error, the prompt information may be "The connection error may be caused by a database server failure or a network problem. Please check the database server status and network connection, and try to reconnect to the database."
[0068] The generation of prompt information can be pre-defined or automatically generated based on historical data through machine learning algorithms. For example, natural language generation technology can be used to automatically generate prompt information based on the matched fault mode.
[0069] S140: Determine a diagnosis result of the target log data according to the prompt information.
[0070] In the present application, warning levels can be pre-divided for different prompt information, the warning level can be determined according to the prompt information corresponding to the combination item matching result, and the warning level can be compared with the preset threshold to determine whether there is an abnormality in the target log data.
[0071] The embodiment of the present invention provides a log diagnosis method applied to chemical process simulation software, which obtains the target log data of the chemical process simulation software and extracts the key features in the log data based on the keyword library; wherein the key features include at least one of the timestamp, the exception code and the keyword; the key features are matched with the pre-trained log diagnosis library to obtain matching items, and the matching items are combined to obtain combination items; the combination items are matched based on the log diagnosis library to determine the matching results and the prompt information corresponding to the matching results; and the diagnostic results of the target log data are determined according to the prompt information. This technical solution improves the diagnostic efficiency and accuracy of the log data by combining and matching the key features in the log data, thereby improving the operating efficiency of the chemical process simulation software.
[0072] Embodiment 2
[0073] Figure 2 This is a flow chart of a log diagnostic method for chemical process simulation software provided in Example 2 of this application. This embodiment is optimized based on the above embodiment. Figure 2 As shown, the method of this embodiment specifically includes the following steps:
[0074] S210, obtaining target log data of chemical process simulation software, and extracting key features in the target log data based on a keyword library.
[0075] The key feature includes at least one of a timestamp, an abnormal code and a keyword.
[0076] S220: Match the key features with a pre-trained log diagnosis library to obtain matching items, and combine the matching items to obtain combined items.
[0077] S230: Match the combination items based on the log diagnosis library to determine a matching result and prompt information corresponding to the matching result.
[0078] S240: Determine a diagnosis result of the target log data according to the prompt information.
[0079] S250: If the diagnosis result shows that an abnormality exists, the fault is located according to the diagnosis result, system architecture and business process to determine the fault point.
[0080] The system architecture may include the functions of each component, their relationships with each other, and the data flow. Specifically, the interaction between components can be analyzed based on the system architecture to determine the communication link between components where the anomaly may occur. For example, in a microservice architecture, different services communicate through the network. If an anomaly occurs in a service, it may affect other services that depend on it. Through the system architecture diagram, the dependency relationship between services can be clearly seen, so that the services that may be affected can be quickly determined.
[0081] The business process may include user operations, system processing steps, data flow, etc. For example, in an e-commerce system, the business process may include user ordering, payment, inventory management, delivery, etc. If an exception occurs after the user places an order, the fault point and the impact on subsequent links can be checked along the business process.
[0082] In this application, the system architecture and business processes can be combined to use graph algorithms or causal reasoning algorithms and other technologies to locate the detected anomalies, determine the specific fault points, and the fault points that may occur soon.
[0083] Exemplarily, a graph algorithm can be used to convert the system architecture and business process into a directed graph for representation, where nodes represent the components of the system or the links of the business process, and edges represent the dependencies between components or the flow direction of the business process. When an anomaly is detected, a graph algorithm can be used to analyze the propagation path of the anomaly in the system dependency graph. For example, a breadth-first search or depth-first search algorithm can be used to start from the node where the anomaly occurs and explore the nodes that may be affected along the edges. Through propagation path analysis, the scope of possible impact of the anomaly can be determined, thereby determining the fault point.
[0084] As another example, a causal inference method can be used to establish a causal relationship model between various events in the system. For example, a model such as a Bayesian network or a causal graph can be used to represent the causal relationship between various events in the system. When an anomaly is detected, the events related to the anomaly in the causal model can be analyzed to determine the events that may have caused the anomaly. For example, if the anomaly is a database connection failure, the causal inference algorithm can analyze the reasons that may have caused the database connection failure, such as network problems, database server failures, database configuration errors, etc.
[0085] S260: Generate a diagnosis report according to the diagnosis result.
[0086] The diagnostic report may include a description of the fault and suggested solutions.
[0087] Specifically, a diagnosis report template may be preset, and the diagnosis report template may be automatically filled in according to the diagnosis result to generate a diagnosis report for the target log data.
[0088] Optionally, after generating a diagnosis report according to the diagnosis result, the method further includes: sending the diagnosis report and the fault point to a target early warning address.
[0089] The target warning address can be the contact information of the system administrator, operation and maintenance team, development team, relevant business manager, etc., who need to know the fault situation in time and take corresponding measures. For example, the target warning address can be the email address of the system administrator, the instant messaging group of the operation and maintenance team, the notification channel in the project management tool of the development team, etc.
[0090] The target warning address can be in various forms, such as an email address, SMS receiving number, instant messaging account, system internal notification interface, etc. Select the appropriate warning address type based on the recipient's preferences and actual situation. For example, if a quick response is required, an instant messaging tool can be used; if a record needs to be kept for subsequent reference, an email can be used.
[0091] Specifically, key content in the diagnostic report can be extracted, such as the time and location of the fault (such as specific system components, server names, code modules, etc.) and manifestations (such as error codes, abnormal behaviors, etc.).
[0092] In the present application, the output format may be a system plug-in. Whenever a system fault is detected, a message reminder box will pop up in the lower right corner of the system, briefly listing the fault points and displaying a hyperlink to a detailed diagnostic report.
[0093] The embodiment of the present invention provides a log diagnosis method applied to chemical process simulation software, which obtains the target log data of the chemical process simulation software and extracts the key features in the log data based on the keyword library; wherein the key features include at least one of the timestamp, the exception code and the keyword; the key features are matched with the pre-trained log diagnosis library to obtain matching items, and the matching items are combined to obtain combination items; the combination items are matched based on the log diagnosis library to determine the matching results and the prompt information corresponding to the matching results; the diagnosis result of the target log data is determined according to the prompt information; if the diagnosis result is that there is an abnormality, the fault is located according to the diagnosis result, the system architecture and the business process to determine the fault point; and a diagnosis report is generated according to the diagnosis result. This technical solution provides a clear solution for operation and maintenance personnel by conducting in-depth analysis of abnormal log data, accurately locating the location and cause of the abnormality, reducing the operation and maintenance cost, and improving the operation and maintenance efficiency.
[0094] Embodiment 3
[0095] Figure 3This is a schematic diagram of the structure of a log diagnostic device applied to chemical process simulation software provided in Example 3 of the present application. Figure 3 As shown, the device comprises:
[0096] The log acquisition module 310 is used to acquire target log data of the chemical process simulation software and extract key features in the target log data based on the keyword library; wherein the key features include at least one of a timestamp, an exception code and a keyword;
[0097] The feature extraction module 320 is used to match the key features with the pre-trained log diagnosis library to obtain matching items, and combine the matching items to obtain combined items;
[0098] A feature matching module 330 is used to match the combination item based on the log diagnosis library, and determine a matching result and prompt information corresponding to the matching result;
[0099] The log diagnosis module 340 is used to determine the diagnosis result of the target log data according to the prompt information.
[0100] The embodiment of the present invention provides a log diagnosis device applied to chemical process simulation software, which obtains the target log data of the chemical process simulation software and extracts the key features in the log data based on the keyword library; wherein the key features include at least one of the timestamp, the exception code and the keyword; the key features are matched with the pre-trained log diagnosis library to obtain matching items, and the matching items are combined to obtain combination items; the combination items are matched based on the log diagnosis library to determine the matching results and the prompt information corresponding to the matching results; and the diagnostic results of the target log data are determined according to the prompt information. This technical solution improves the diagnostic efficiency and accuracy of the log data by combining and matching the key features in the log data.
[0101] Furthermore, the log acquisition module 310 includes:
[0102] A configuration file acquisition unit, used to acquire a log configuration file according to a preset path;
[0103] The log data acquisition unit is used to acquire target log data of the chemical process simulation software according to the log configuration file.
[0104] Furthermore, the log data acquisition unit includes:
[0105] A storage path determination subunit, used to determine the storage path of target log data according to the log configuration file;
[0106] The log data acquisition subunit is used to read from the last read node according to the storage path, obtain the target log data of the chemical process simulation software, and record the current read node.
[0107] Furthermore, the device comprises:
[0108] A data cleaning module is used to clean the target log data of the chemical process simulation software to obtain valid data after acquiring the target log data;
[0109] The data standardization module is used to perform standardization processing on the valid data to obtain standardized data.
[0110] Furthermore, the training method of the log diagnosis library includes:
[0111] Acquire historical log data with labels; wherein the labels are fault categories;
[0112] The historical log data is used to train the initial model to obtain a log diagnosis library.
[0113] Furthermore, the device also includes:
[0114] A fault location module is used to determine the diagnosis result of the target log data according to the prompt information, and if the diagnosis result is abnormal, locate the fault according to the diagnosis result, system architecture and business process to determine the fault point;
[0115] A diagnosis report generating module is used to generate a diagnosis report according to the diagnosis result.
[0116] Furthermore, the device also includes:
[0117] The fault warning module is used to generate a diagnosis report according to the diagnosis result and then send the diagnosis report and the fault point to a target warning address.
[0118] A log diagnostic device applied to chemical process simulation software provided in an embodiment of the present application can execute a log diagnostic method applied to chemical process simulation software provided in any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.
[0119] Embodiment 4
[0120] Figure 4A schematic diagram of a device 10 that can be used to implement an embodiment of the present application is shown. The device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0121] like Figure 4 As shown, the device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the device 10 can also be stored. The processor 11, ROM 12 and RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0122] A number of components in the device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0123] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a log diagnosis method applied to chemical process simulation software.
[0124] In some embodiments, the log diagnostic method applied to chemical process simulation software can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the log diagnostic method applied to the chemical process simulation software described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the log diagnostic method applied to the chemical process simulation software in any other appropriate manner (for example, by means of firmware).
[0125] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0126] The computer programs for implementing the methods of the present application may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer programs are executed by the processor, the functions / operations specified in the flow charts and / or block diagrams are implemented. The computer programs may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0127] In the context of the present application, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0128] To provide interaction with a user, the systems and techniques described herein may be implemented on a device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0129] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0130] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0131] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.
[0132] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A log diagnosis method applied to chemical process simulation software, characterized in that: The method comprises: Obtain target log data of chemical process simulation software, and extract key features in the target log data based on a keyword library; wherein the key features include at least one of a timestamp, an exception code, and a keyword; Matching the key features with a pre-trained log diagnosis library to obtain matching items, and combining the matching items to obtain combined items; Matching the combination items based on the log diagnosis library, and determining a matching result and prompt information corresponding to the matching result; The diagnosis result of the target log data is determined according to the prompt information.
2. The log diagnosis method applied to chemical process simulation software according to claim 1, characterized in that: Obtain target log data for chemical process simulation software, including: Get the log configuration file according to the preset path; According to the log configuration file, target log data of the chemical process simulation software is obtained.
3. The log diagnosis method applied to chemical process simulation software according to claim 2 is characterized in that: According to the log configuration file, target log data of the chemical process simulation software is obtained, including: Determine the storage path of the target log data according to the log configuration file; According to the storage path, reading is started from the last read node, the target log data of the chemical process simulation software is obtained, and the current read node is recorded.
4. The log diagnosis method applied to chemical process simulation software according to claim 1, characterized in that: After obtaining target log data of chemical process simulation software, the method includes: Cleaning the target log data to obtain valid data; The effective data is standardized to obtain standardized data.
5. The log diagnosis method applied to chemical process simulation software according to claim 1, characterized in that: The training method of the log diagnosis library includes: Acquire historical log data with labels; wherein the labels are fault categories; The historical log data is used to train the initial model to obtain a log diagnosis library.
6. The log diagnosis method applied to chemical process simulation software according to claim 1, characterized in that: After determining the diagnosis result of the target log data according to the prompt information, the method further includes: If the diagnosis result shows that there is an abnormality, the fault is located according to the diagnosis result, system architecture and business process to determine the fault point; A diagnosis report is generated according to the diagnosis result.
7. The log diagnosis method applied to chemical process simulation software according to claim 6 is characterized in that: After generating a diagnosis report according to the diagnosis result, the method further includes: The diagnostic report and the fault point are sent to a target early warning address.
8. A log diagnostic device applied to chemical process simulation software, characterized in that: The device comprises: A log acquisition module, used to acquire target log data of chemical process simulation software, and extract key features in the target log data based on a keyword library; wherein the key features include at least one of a timestamp, an exception code and a keyword; A feature extraction module, used for matching the key features with a pre-trained log diagnosis library to obtain matching items, and combining the matching items to obtain combined items; A feature matching module, used to match the combination item based on the log diagnosis library, and determine a matching result and prompt information corresponding to the matching result; The log diagnosis module is used to determine the diagnosis result of the target log data according to the prompt information.
9. An electronic device, characterized in that: The device comprises: At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the log diagnosis method applied to chemical process simulation software as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the log diagnosis method applied to chemical process simulation software according to any one of claims 1 to 7 when executed.
Citation Information
Patent Citations
Log monitoring method and device, terminal and computer readable storage medium
CN110362545A
Log monitoring method and device, computer equipment and storage medium
CN114398239A
Page exception processing method and device
CN115934396A
Fault processing method and device, fault analysis model training method and device and semantic matching model training method and device
CN117273145A
Artificial intelligence-based appliance management device and appliance management method
WO2021006369A1
Cited By
Log information processing method and device, electronic equipment and storage medium
CN119311548A
Production line abnormity diagnosis method, device, equipment and medium
CN121880903A
