Log management system and method of application program, electronic equipment and storage medium

By designing the application's log management system, including backend management, query and display modules, the problem of inefficient log management and analysis of the oil and gas exploration software platform is solved, and efficient and accurate log management and analysis is achieved.

CN120216474APending Publication Date: 2025-06-27CHINA NAT PETROLEUM CORP +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311798128.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the prior art, the analysis and management of the log files of the oil and gas exploration software platform are inefficient and prone to errors, which is difficult to meet the complex needs of different users.

Method used

Design a log management system for applications, including background management module, query module and display module. The background management module regularly obtains log files from the system directory of the target application and stores them in the log database; the query module retrieves log files from the database based on user query keywords; the display module displays or exports log files in a preset way.

Benefits of technology

It improves the efficiency and accuracy of log management and analysis of oil and gas exploration software platform, and meets the complex query and analysis needs of different users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216474A_ABST
    Figure CN120216474A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a log management system and method of an application program, electronic equipment and a storage medium. The log management system of the application program comprises a background management module, a query module and a display module, wherein the background management module is used for acquiring a target log file from a system directory of a target application program according to a preset time interval; the target log file is stored in a log database; the query module is used for responding to a received query instruction carrying a query keyword, obtaining a target log file corresponding to the query keyword from the log database, and taking the target log file as a to-be-displayed log file; the display module is used for displaying the to-be-displayed log file according to a preset display mode; and in response to a received log file exporting instruction, exporting the to-be-displayed log file according to a preset exporting mode.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of geophysical exploration technology, and in particular to a log management system, method, electronic device and storage medium for an application. Background Art

[0002] In the development and application of oil and gas exploration software, the analysis and management of system log files are particularly important. For example, in a certain oil and gas exploration software, the system has more than 400 functional modules. In actual application, it is difficult to select modules. Application personnel have an urgent need to use log files to count and manage the usage of modules. Log files record the interaction information between users and software, as well as the operating status and abnormal conditions of the system. This information is of great value for debugging, optimization, use and management of software. However, due to the large number of log files, inconsistent formats, and decentralized information distribution, the analysis and management of log files has always been a difficult problem.

[0003] In the existing technology, the analysis of log files mainly relies on manual operation, which is not only inefficient but also prone to errors. At the same time, since the format and content of log files are often complex, different users have different requirements for log files.

[0004] Therefore, how to improve the efficiency and accuracy of log management and analysis of oil and gas exploration software platforms is a technical problem that needs to be solved urgently. Summary of the invention

[0005] The embodiments of the present application provide a log management system, method, electronic device and storage medium for an application program, which are used to improve the efficiency and accuracy of log management and analysis of an oil and gas exploration software platform.

[0006] One of the embodiments of the present application provides a log management system for an application, the log management system comprising a background management module, a query module and a display module: the background management module is used to obtain a target log file from a system directory of a target application at a preset time interval; and store the target log file in a log database; the query module is used to, in response to receiving a query instruction carrying a query keyword, obtain the target log file corresponding to the query keyword from the log database and use it as the log file to be displayed; the display module is used to display the log file to be displayed in a preset display mode; and in response to receiving a log file export instruction, export the log file to be displayed in a preset export mode.

[0007] In some embodiments, obtaining the target log file from the system directory of the target application includes: using a log information statistical analysis tool to read all log files from the system directory; parsing all log files to obtain the log file containing the target information as the target file.

[0008] In some embodiments, the target application is a geophysical exploration software platform, and the target information includes processing job information and interactive interface application information; obtaining the target log file from the system directory of the target application includes: using a log information statistical analysis tool to read all log files from the system directory; parsing all log files to obtain the log file containing the processing job information or interactive interface application information as the target file.

[0009] In some embodiments, the log database is a sqlite lightweight database; storing the target log file in the log database includes: using the target log file as a data source to establish a data structure corresponding to the data source; associating the data structure with the sqlite lightweight database to obtain a target data model; using the target data model to store the target log file in the log database.

[0010] In some embodiments, the query module is further configured to display a filtering condition template in a first preset display area, where the filtering condition template includes multiple options, and each option corresponds to a query keyword; in response to receiving a query instruction carrying the query keyword, obtaining the target log file corresponding to the query keyword from the log database includes: in response to a user's selection operation on any option in the filtering condition template, obtaining the target log file corresponding to the query keyword from the log database based on the query keyword corresponding to the option.

[0011] In some embodiments, displaying the log file to be displayed in a preset display manner includes: displaying the log file to be displayed on a second preset display interface; displaying the parsing result information of the log file to be displayed on a third preset display interface.

[0012] In some embodiments, exporting the log file to be displayed in a preset export manner includes: exporting the log file to be displayed in one or more of a text format and / or a spreadsheet format.

[0013] One embodiment of the present application provides a method for statistical analysis of application logs. The method includes: obtaining a target log file from the system directory of a target application at a preset time interval; and storing the target log file in a log database; in response to receiving a query instruction carrying a query keyword, obtaining from the log database the target log file corresponding to the query keyword and using it as a log file to be displayed; displaying the log file to be displayed in a preset display manner; and in response to receiving a log file export instruction, exporting the log file to be displayed in a preset export manner.

[0014] An embodiment of the present application provides an electronic device. The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor runs the program, it executes the method described above.

[0015] An embodiment of the present application provides a storage medium for storing a computer-readable program. When the computer-readable program is run, it executes the method described above.

[0016] The above technical solutions provided by the embodiments of the present application have at least the following advantages compared with the prior art:

[0017] In the embodiment provided by the present application, a target log file is obtained from the system directory of a target application at a preset time interval; and the target log file is stored in a log database; in response to receiving a query instruction carrying a query keyword, the target log file corresponding to the query keyword is obtained from the log database and used as a log file to be displayed; the log file to be displayed is displayed in a preset display manner; and in response to receiving a log file export instruction, the log file to be displayed is exported in a preset export manner. Thereby, the efficiency and accuracy of log management and analysis of the oil and gas exploration software platform can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The present application will be further described by way of exemplary embodiments, which will be described in detail through the drawings. These embodiments are not restrictive. In these embodiments, the same numbers represent the same structures, where:

[0019] Figure 1 is an exemplary schematic diagram of a log management system of an application according to some embodiments of the present application;

[0020] Figure 2 is an exemplary flowchart of a log management method of an application according to some embodiments of the present application;

[0021] Figure 3 is an application scenario diagram of a log management system of an application according to some embodiments of the present application;

[0022] Figure 4 It is an exemplary schematic diagram of the log file processing flow of the log management system of an application according to some embodiments of the present application;

[0023] Figure 5 It is an exemplary structural schematic diagram of an electronic device according to some embodiments of the present application. Detailed implementation manners

[0024] To more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some examples or embodiments of the present application. For those of ordinary skill in the art, without creative efforts, the present application can also be applied to other similar scenarios based on these drawings. Unless obvious from the language context or otherwise stated, the same reference numerals in the drawings represent the same structure or operation.

[0025] It should be understood that the "system", "device", "unit" and / or "module" used herein is a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.

[0026] As shown in the present application and the claims, unless the context clearly indicates an exceptional situation, words such as "a", "an", "one" and / or "the" are not specifically singular and may also include the plural. Generally speaking, the terms "including" and "comprising" only indicate the inclusion of the steps and elements that have been clearly identified, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0027] Flowcharts are used in the present application to illustrate the operations performed by the systems according to the embodiments of the present application. It should be understood that the previous or subsequent operations are not necessarily executed precisely in sequence. On the contrary, the steps can be processed in reverse order or simultaneously. At the same time, other operations can also be added to these processes, or one or several steps can be removed from these processes.

[0028] For ease of understanding, the technical solutions of the present application will be introduced below in conjunction with the accompanying drawings and embodiments.

[0029] Figure 1 It is an exemplary schematic diagram of the log management system of an application according to some embodiments of the present application. As Figure 1 shown, the log management system of the application includes a background management module, a query module, and a display module.

[0030] Among them, the background management module is used to obtain the target log file from the system directory of the target application at a preset time interval.

[0031] The target application is an application that needs to analyze the log information it generates. Only as an example, the target application is a geophysical exploration software platform, such as the GeoEast-iEco platform.

[0032] The preset time interval can be determined according to actual application requirements and is not limited by the description in this specification.

[0033] The target log file is a log file that needs to be collected and analyzed. For example, the target log file can be a log file that records processing job information and a log file that records interactive interface application information of the geophysical exploration software platform.

[0034] In the specific implementation process, the directory where the target application stores log files can be obtained according to the system variables of the target application, and then all directories storing log files can be traversed to obtain the target log files.

[0035] In the initial stage of establishing the log management system, all target log files already generated by the target application can be obtained. Subsequently, the incremental acquisition function of log files can be started regularly to automatically obtain all target log files generated during the use of the target application.

[0036] In the specific implementation process, a log information statistical analysis tool can be used to read all log files from the system directory of the target application; all log files are parsed to obtain the log files containing target information as target files.

[0037] In some embodiments, the target application is a geophysical exploration software platform that stores two types of log files, list and log, which record processing job information and interactive interface application information respectively. The target information includes processing job information and interactive interface application information. A log information statistical analysis tool can be used to read all log files from the system directory; all log files are parsed to obtain the log files containing processing job information or interactive interface application information as target files.

[0038] In the specific implementation process, the log information statistical analysis tool can traverse the file directories, databases, disk directories, etc. where the target application stores log files, analyze and filter out the target log files from them, and record the hash value of each target log file to avoid repeated reading. After obtaining the target log files, effective information integration can be performed on the low-density data with non-concentrated distribution of key information in the target log files.

[0039] After obtaining the target log files by the above method, the target log files can be stored in the log database.

[0040] In some embodiments, the log database is a lightweight sqlite database. The target log file can be used as a data source to establish a data structure corresponding to the data source; the data structure is associated with the lightweight sqlite database to obtain a target data model (i.e., a table in sqlite, for example, a job information data model and an interactive interface application information data model); the target log file is stored in the log database using the target data model.

[0041] In the specific implementation process, the background management module runs as a single node and a single instance. For the multi-node case, a file lock is used to limit the single-node startup program and control the single startup. The log information statistical analysis tool uses the incremental crawling function to grab data, compares the hash value of the grabbed data with the hash value of the log file stored in the log database, and removes duplicates, effectively reducing the repetitive workload and working hours. The "start_gelogdsh" timing program tool is used: to implement the timed task to be executed in a loop at 00:00. The tool is more automated, grabs data during idle time, automatically avoids forgetting, is traceable, and the log-style process tracking reduces the system load.

[0042] Among them, the query module is used to, in response to receiving a query instruction carrying a query keyword, obtain the target log file corresponding to the query keyword from the log database and use it as the log file to be displayed.

[0043] In some embodiments, the query module is further used to display a filtering condition template in a first preset display area. The filtering condition template includes multiple options, and each option corresponds to a query keyword.

[0044] Merely by way of example, the target application program is a geophysical exploration software platform, and the query keywords may include, but are not limited to: "by module", "by user", "by project", "by job", etc. Merely by way of example, the filtering condition template displays a first-level menu: "by module", "by user", "by project", "by job". After the user selects the "by project" option, the system continues to display a second-level menu: "Project A", "Project B", "Project C"...

[0045] After receiving the user's selection operation on any option in the filtering condition template, the target log file corresponding to the query keyword can be obtained from the log database based on the query keyword corresponding to the option.

[0046] In some embodiments, a "custom" query keyword can also be designed, and an externally extensible SQL query statement interface can be used to perform personalized customized queries according to different requirements proposed by different users.

[0047] Among them, the display module is used to display the log file to be displayed according to a preset display method. For example, the log file to be displayed obtained by the query module can be displayed in a table and / or an image on a human-computer interaction interface (such as a monitor, etc.).

[0048] In some embodiments, the log file to be displayed can be displayed on a second preset display interface; the parsing result information of the log file to be displayed can be displayed on a third preset display interface. The parsing result information of the log file can include but is not limited to: the usage of users, jobs, modules, etc. statistically analyzed according to the target log file, or the probabilities of error-prone hosts, users, jobs, modules, etc.

[0049] The display module is also used to export the log file to be displayed according to a preset export method after receiving an export instruction for the log file.

[0050] In a specific implementation process, the log file to be displayed can be exported in one or more of a text (such as a txt text) format and / or a spreadsheet (such as Excel) format.

[0051] The log management system of the application provided by the present application uses a background management module to obtain a target log file from the system directory of the target application at a preset time interval; and stores the target log file in a log database; uses a query module to, in response to receiving a query instruction carrying a query keyword, obtain the target log file corresponding to the query keyword from the log database and use it as the log file to be displayed; uses a display module to display the log file to be displayed according to a preset display method; and in response to receiving an export instruction for the log file, exports the log file to be displayed according to a preset export method. Thus, a large number of different types of data stored in the log file can be browsed or edited as required by the user, realizing efficient analysis of messy and low-density log data, and achieving the goal of various visual analyses of the usage frequencies of modules and jobs and various unified format exports. As Figure 3 and Figure 4 shown, by using the log management system of the application provided by the present application, the following can be achieved:

[0052] Unified management and unified storage of log information, improving the traceability of information usage.

[0053] Flexible, convenient, and efficient querying, statistics, analysis, and display of log information.

[0054] Updating the usage of the current host, user, job, module, etc., and reasonably allocating the use of the new platform.

[0055] Providing information support for job scheduling, software management, software applications, system management, etc.

[0056] Input automation.

[0057] Intelligent visual display and unified format export analysis.

[0058] Figure 2 It is an exemplary flowchart of a log management method for an application program shown in some embodiments of the present application. As Figure 2 shown, the method includes the following steps:

[0059] Step S210, obtain a target log file from the system directory of the target application program at a preset time interval, and store the target log file in a log database.

[0060] Step S220, in response to receiving a query instruction carrying a query keyword, obtain the target log file corresponding to the query keyword from the log database, and use it as the log file to be displayed.

[0061] Step S230, display the log file to be displayed in a preset display manner, and in response to receiving a log file export instruction, export the log file to be displayed in a preset export manner.

[0062] In the embodiments of the above application program log statistical analysis method, the specific processing of each step and the technical effects brought by it can be respectively referred to the relevant descriptions in the corresponding system embodiments, and will not be elaborated here.

[0063] Figure 5 It is an exemplary structural schematic diagram of an electronic device shown in some embodiments of the present application.

[0064] As Figure 5 shown, the electronic device includes: at least one processor 501, at least one communication interface 502, at least one memory 503, and at least one communication bus 504; optionally, the communication interface 502 may be an interface of a communication module, such as an interface of a GSM module; the processor 501 may be a processor CPU, or a specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present invention. The memory 503 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory. Among them, the memory 503 stores a program, and the processor 501 calls the program stored in the memory 503 to execute some or all of the above method embodiments.

[0065] The present application relates to a storage medium for storing a computer-readable program, which, when run, executes some or all of the above method embodiments.

[0066] Optionally, the storage medium may be a non-transitory computer-readable storage medium. For example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0067] Based on the same inventive concept, an embodiment of the present application further provides a computer program product, including a computer program, which when executed by a processor, implements some or all of the above method embodiments.

[0068] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only an example and does not constitute a limitation to the present application. Although not explicitly stated here, those skilled in the art may make various modifications, improvements, and corrections to the present application. Such modifications, improvements, and corrections are proposed in the present application, so such modifications, improvements, and corrections still belong to the spirit and scope of the exemplary embodiments of the present application.

[0069] Meanwhile, the present application uses specific terms to describe the embodiments of the present application. Such as "one embodiment", "an embodiment", and / or "some embodiments" mean a certain feature, structure, or characteristic related to at least one embodiment of the present application. Therefore, it should be emphasized and noted that "an embodiment" or "one embodiment" or "an alternative embodiment" mentioned twice or more at different positions in the present application does not necessarily refer to the same embodiment. In addition, certain features, structures, or characteristics in one or more embodiments of the present application can be appropriately combined.

[0070] In addition, unless explicitly stated in the claims, the order of the processing elements and sequences, the use of numerical letters, or the use of other names in the present application is not used to limit the order of the processes and methods of the present application. Although some currently useful inventive embodiments are discussed through various examples in the above disclosure, it should be understood that such details only serve the purpose of illustration. The appended claims are not limited to the disclosed embodiments. On the contrary, the claims are intended to cover all modifications and equivalent combinations that conform to the essence and scope of the embodiments of the present application. For example, although the system components described above can be implemented by hardware devices, they can also be implemented only through software solutions, such as installing the described system on an existing server or mobile device.

[0071] Similarly, it should be noted that, in order to simplify the description disclosed in this application and thus help the understanding of one or more embodiments of the invention, in the foregoing description of the embodiments of this application, multiple features are sometimes grouped into one embodiment, drawing, or description thereof. However, this disclosure method does not mean that the features required by the subject matter of this application are more than those mentioned in the claims. In fact, the features of the embodiments are fewer than all the features of the single embodiment disclosed above.

[0072] In some embodiments, numbers are used to describe components and attribute quantities. It should be understood that such numbers used in the description of the embodiments are modified by the modifiers "about", "approximate", or "substantially" in some examples. Unless otherwise specified, "about", "approximate", or "substantially" indicate that the said numbers allow a variation of ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, and such approximate values may change according to the characteristics required by individual embodiments. In some embodiments, the numerical parameters should consider the specified significant digits and adopt the method of retaining the general number of digits. Although the numerical ranges and parameters used in some embodiments of this application to confirm the breadth of their scope are approximate values, in specific embodiments, the setting of such numerical values is as precise as possible within the feasible range.

[0073] For each patent, patent application, patent application publication, and other materials cited in this application, such as articles, books, specifications, publications, documents, etc., their entire contents are hereby incorporated into this application by reference. Except for the application history documents that are inconsistent with or conflict with the content of this application, and except for the documents that limit the broadest scope of the claims of this application (currently or subsequently appended to this application). It should be noted that if there are inconsistencies or conflicts between the descriptions, definitions, and / or uses of terms in the attached materials of this application and the content described in this application, the descriptions, definitions, and / or uses of terms in this application shall prevail.

[0074] Finally, it should be understood that the embodiments described in this application are only used to illustrate the principles of the embodiments of this application. Other variations may also fall within the scope of this application. Therefore, by way of example and not limitation, alternative configurations of the embodiments of this application may be considered to be consistent with the teachings of this application. Accordingly, the embodiments of this application are not limited to the embodiments explicitly introduced and described in this application.

Claims

1. A log management system for an application, characterized in that, The log management system includes a background management module, a query module, and a display module: The background management module is used to obtain target log files from the system directory of the target application at preset time intervals; And Store the target log files in a log database; The query module is used to, in response to receiving a query instruction carrying a query keyword, obtain from the log database the target log file corresponding to the query keyword and use it as the log file to be displayed; The display module is used to display the log file to be displayed in a preset display manner; And In response to receiving a log file export instruction, export the log file to be displayed in a preset export manner.

2. The log management system according to claim 1, characterized in that The obtaining of the target log files from the system directory of the target application includes: Using a log information statistical analysis tool to read all log files from the system directory; Parsing all log files to obtain a log file containing target information as the target file.

3. The log management system according to claim 2, wherein The target application is a geophysical exploration software platform, and the target information includes processing operation information and interactive interface application information; The obtaining of the target log files from the system directory of the target application includes: Using a log information statistical analysis tool to read all log files from the system directory; Parsing all log files to obtain a log file containing processing operation information or interactive interface application information as the target file.

4. The log management system according to claim 3, wherein The log database is a sqlite lightweight database; The storing of the target log files in the log database includes: Taking the target log files as data sources and establishing a data structure corresponding to the data sources; Associating the data structure with the sqlite lightweight database to obtain a target data model; Using the target data model to store the target log files in the log database.

5. The log management system according to claim 4, wherein The query module is further used to display a filtering condition template in a first preset display area, and the filtering condition template includes multiple options, and each option corresponds to a query keyword; The obtaining of the target log file corresponding to the query keyword from the log database in response to receiving a query instruction carrying the query keyword includes: In response to a user's selection operation on any option in the filtering condition template, obtaining from the log database the target log file corresponding to the query keyword based on the query keyword corresponding to the option.

6. The log management system according to claim 5, wherein The displaying of the log file to be displayed in a preset display manner includes: Displaying the log file to be displayed on a second preset display interface; Displaying the parsing result information of the log file to be displayed on a third preset display interface.

7. The log management system according to claim 6, wherein The exporting of the log file to be displayed in a preset export manner includes: Exporting the log file to be displayed in one or more of a text format and / or a spreadsheet format.

8. A method for log management of an application, characterized in that, The method includes: Obtaining target log files from the system directory of the target application at preset time intervals; and Storing the target log files in the log database; In response to receiving a query instruction carrying a query keyword, obtain a target log file corresponding to the query keyword from the log database, and use it as the log file to be displayed; Display the log file to be displayed in a preset display manner; and In response to receiving a log file export instruction, export the log file to be displayed in a preset export manner.

9. An electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and when the processor runs the program, it executes the method according to claim 8.

10. A storage medium for storing a computer-readable program, when the computer-readable program is run, it executes the method according to claim 8.