Methods, systems, media, and computer program products for obtaining a log
By acquiring messages from the production system and determining the storage pool and log blocks based on keywords, and then searching for relevant log blocks in a loop, the problem of time-consuming troubleshooting in the production system is solved, achieving the effect of quickly obtaining fault logs. This method is suitable for upgrading and building new production lines.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BMW BRILLIANCE AUTOMOTIVE
- Filing Date
- 2021-04-26
- Publication Date
- 2026-04-24
AI Technical Summary
In production systems, obtaining fault-related logs during troubleshooting is time-consuming and labor-intensive, affecting the normal operation of the production line.
By obtaining the first message, determining the storage pool based on the string in the message, searching for the log block containing the message in the associated log file, and using keywords to determine the next storage pool and message, this process is repeated until the termination condition is met, thus obtaining all logs related to the problem.
Quickly and easily obtain production system fault logs, reduce troubleshooting time, assist in production system fault recovery, and are suitable for continuously upgraded production systems and newly established production lines.
Smart Images

Figure CN115248801B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to information processing, and more particularly to methods, systems, media, and computer program products for obtaining logs. Background Technology
[0002] Production systems, especially vehicle production systems, involve the coordinated operation of multiple complex modules. These systems are designed to support uninterrupted production line operation. However, production systems sometimes experience problems or malfunctions, requiring prompt repair to minimize disruption to the production line. Troubleshooting production system failures can be time-consuming and labor-intensive; therefore, it is essential to quickly and easily obtain and analyze all logs related to the failures to aid in production system recovery. Summary of the Invention
[0003] According to a first aspect of this disclosure, a method for obtaining logs is provided, comprising obtaining a first message; determining a first storage pool based on a string contained in the first message; determining a first log block containing the first message in a log file associated with the first storage pool; and determining a second storage pool and a second message using log records of the first log block based on a first keyword and the first storage pool.
[0004] According to some embodiments of this disclosure, in the above method, determining the second storage pool and the second message further includes: determining a first log record having a first keyword and a first storage pool within a first log block, the first log record including the second storage pool, wherein the second storage pool is the next storage pool to which the first message is sent; and extracting the second message from log records following the first log record, wherein the second message is a message generated based on the first message and received by the second storage pool.
[0005] According to some embodiments of this disclosure, the method further includes: determining a second log block containing a second message in a log file associated with a second storage pool; determining a third storage pool using log records of the second log block based on a second keyword and a second storage pool, wherein the third storage pool is the next storage pool to which the second message is sent; and determining a third message, wherein the third message is a message received by the third storage pool based on the second message.
[0006] According to some embodiments of this disclosure, the method further includes determining a fourth storage pool based on a third keyword and a first storage pool, using records from a first log block, wherein the fourth storage pool is the previous storage pool from which the first message originated.
[0007] According to some embodiments of this disclosure, the method further includes returning the determined message and storage pool to the front end in response to one of the following: the second key for determining the third storage pool does not exist in the second log block; the string Telegram End exists in the second log block; or the third storage pool is the same as the first storage pool.
[0008] According to some embodiments of this disclosure, in the above method, determining the first log block containing the first message includes: searching for a first log block containing a unique identifier of the first message in a log file associated with the first storage pool; or searching for a first log block containing the full text of the first message in a log file associated with the first storage pool.
[0009] According to some embodiments of this disclosure, in the above method, the first keyword is used to determine the second storage pool, and the first keyword is specific to the first storage pool, including one or more of the following: received from, senten, partner_name, and KM_Receive.
[0010] According to some embodiments of this disclosure, in the above method, the second keyword is used to determine the third storage pool and is specific to the second storage pool, including one or more of the following: Waiting for the next, received from, Sending telegram to, and partner.
[0011] According to some embodiments of this disclosure, in the above method, the third keyword is used to determine the fourth storage pool, and the third keyword is specific to the first storage pool. The third keyword includes one or more of the following: eigener_name and received from.
[0012] According to some embodiments of this disclosure, the first keyword is configurable in the above method.
[0013] According to some embodiments of this disclosure, the method further includes: obtaining logs with corresponding determined messages from log files associated with each determined storage pool, based on the determined messages and storage pools; and highlighting error messages in the obtained logs.
[0014] According to another aspect of this disclosure, a computer system for acquiring logs is provided, comprising: one or more processors, and a memory coupled to the one or more processors, the memory storing computer-readable program instructions, which, when executed by the one or more processors, cause the one or more processors to perform the method as described above.
[0015] According to another aspect of this disclosure, a non-transitory computer-readable storage medium for acquiring logs is provided, the non-transitory computer-readable medium having computer-readable program instructions stored thereon, the instructions causing the one or more processors to perform the method as described above when executed by one or more processors.
[0016] According to another aspect of this disclosure, a computer program product for acquiring logs is provided, including computer-readable program instructions that, when executed by one or more processors, cause the one or more processors to perform any of the methods described herein.
[0017] Using the method and system disclosed herein, when a problem occurs in a production system, each process related to the flow of that first message in the entire production system can be extracted from the first message. This allows for quick and easy acquisition of all logs related to the problem, enabling rapid tracking and location of the problem logs, reducing troubleshooting time, and thus assisting in the recovery of the production system from failure. Furthermore, the method and system disclosed herein can be flexibly configured and applied to continuously upgraded production systems and newly established production lines, exhibiting flexibility and scalability.
[0018] Other features and advantages of this disclosure will become clear from the following description with reference to the accompanying drawings. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the present disclosure and, together with the specification, serve to explain the principles of the disclosure without limitation. In the figures, similar reference numerals are used to denote similar items.
[0020] Figure 1 This illustrates a system architecture for implementing embodiments of the present disclosure.
[0021] Figure 2 This is a schematic diagram illustrating message flow according to embodiments of the present disclosure.
[0022] Figure 3 This is a flowchart illustrating a method for obtaining logs according to an embodiment of the present disclosure.
[0023] Figure 4 This is a flowchart illustrating a method for obtaining logs according to another embodiment of the present disclosure.
[0024] Figure 5 This is a flowchart illustrating a method for obtaining logs according to another embodiment of the present disclosure.
[0025] Figure 6 This is a schematic diagram illustrating a general hardware environment in which a system according to embodiments of the present disclosure can be implemented.
[0026] Figure 7 This is a screenshot showing an example user interface used to determine the log block containing the first message.
[0027] Figure 8 This is a screenshot of an example user interface showing a log record containing the first message.
[0028] Figure 9 This is a screenshot of an example user interface showing the logging of another log block.
[0029] Figure 10 This is a screenshot of an example user interface showing the logging of another log block. Detailed Implementation
[0030] In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the exemplary embodiments described. However, it will be apparent to those skilled in the art that the described embodiments can be practiced without some or all of these specific details. In the exemplary embodiments described, well-known structures or processing steps are not described in detail to avoid unnecessarily obscuring the concepts of this disclosure.
[0031] The blocks within each of the block diagrams shown below can be implemented using hardware, software, firmware, or any combination thereof to achieve the principles of this disclosure. Those skilled in the art will understand that the blocks described in each block diagram can be combined or divided into sub-blocks to achieve the principles of this disclosure.
[0032] The steps of the method presented in this disclosure are intended to be illustrative. In some embodiments, the method may be performed with one or more additional steps not described and / or without the one or more steps discussed. Furthermore, the order in which the steps of the method are illustrated and described is not intended to be limiting.
[0033] Embodiments of this disclosure relate to methods, systems, computer-readable media, and computer program products for acquiring logs. The method for acquiring logs according to embodiments of this disclosure includes: acquiring a first message; determining a first storage pool based on a string contained in the first message; determining a first log block containing the first message in a log file associated with the first storage pool; and determining a second storage pool and a second message using log records in the first log block based on a first keyword and the first storage pool.
[0034] Using the method and system disclosed herein, when a problem occurs in a production system, each process related to the flow of that first message in the entire production system can be extracted from the first message. This allows for quick and easy acquisition of all logs related to the problem, enabling rapid tracking and location of the problem logs, reducing troubleshooting time, and thus assisting in the recovery of the production system from failure. Furthermore, the method and system disclosed herein can be flexibly configured and applied to continuously upgraded production systems and newly established production lines, exhibiting flexibility and scalability.
[0035] Figure 1 This illustrates a system architecture 100 for implementing embodiments of the present disclosure. This system architecture may include at least the following components: access 101, services 102, storage 103, public services 104, and production system 105.
[0036] Users can access the system's service 102 through access 101. Access 101 can be an access interface displayed on mobile devices, computers, web pages, etc., used to log in or access the system or server.
[0037] System-related data or programs can be stored in storage 103, for example, using an Oracle database to store the data.
[0038] Service 102 can utilize the data of production system 105 and provide corresponding services to production system 105. For example, service 102 can capture logs of production system 105. Production system 105 may include, for example, a final assembly workshop, equipment quality management, etc.
[0039] Public service 104 may include services that provide authentication and authorization functions for user access.
[0040] Service 102 may include at least the following components: message flow 106, analysis 107, and statistics 108. Message flow 106 may involve types such as storage pool 109, process 110, and event definition module (ZPI) 111. A storage pool, also known as a spool, can also be a storage block or storage unit, where data follows a first-in, first-out (FIFO) principle. Analysis 107 may include at least tracing 112 and querying 113 for tracking and querying logs; tracing 112 may be associated with a message protocol. Statistics 108 may include at least the following information: user behavior 114, analysis results 115, and usage status 116.
[0041] The system architecture 100 can be used to implement embodiments according to this disclosure. Note that the system architecture 100 of this disclosure is merely an example and is not limited to the above parts, nor is it limited to being composed according to the above architecture, as long as it can implement the method according to this disclosure.
[0042] Figure 2 This is a schematic diagram 200 illustrating message flow according to an embodiment of the present disclosure. The arrows exemplarily illustrate the process of message flow between 201 and 206.
[0043] In this example diagram, the message flow starts from 201, flows through 202, 203, and 204 in sequence, and returns to 201. In addition, the message also flows from 201 to 205 and 206 respectively, and then the flow ends.
[0044] In one example, 201 could be ADP_BS, then correspondingly 202 would be TEL_ADPB, 203 would be PESIR152, 204 would be PEXTKB52, 205 would be ZPI_TELE, and 206 would be VTSND_BS.
[0045] In one example, 201 could be ADP_PS, then correspondingly 202 would be TEL_ADPP, 203 would be PESTOC52, 204 would be PEXTOF52, and 205 would be ZPI_TELE.
[0046] Note that, Figure 2 This is merely one possible example of message flow. The number of storage pools a message flows through and which / which storage pools it passes through are not limited to this; message flow is not limited to this. Figure 2 The diagram shown is shown below.
[0047] The following text will combine Figure 2 The example message flow further illustrates the embodiments of this disclosure.
[0048] Figure 3 This is a flowchart illustrating a method 300 for obtaining logs according to an embodiment of the present disclosure.
[0049] like Figure 3 As shown, method 300 includes obtaining the first message in operation 301. When a problem occurs in the production system, the first message related to the problem can be determined first, for example, it could be 382SIR1_382SIR1_PLABRU_ATRAN010452382SIR1_PLABRU_AIR100000002953026#OKAYIR15220210326105507A00. This first message can be determined by the user or captured by the system. Note that the content and acquisition of the first message are not limited to this.
[0050] Continuing with method 300, the method further includes, in operation 302, determining the first storage pool based on the string contained in the first message. For example, based on the aforementioned message, the corresponding storage pool can be determined to be ADP_BS, such as... Figure 2 As shown in 201.
[0051] Continuing with method 300, the method further includes, in operation 303, identifying a first log block containing the first message in a log file associated with the first storage pool.
[0052] In some embodiments, operation 303 may be to locate a first log block containing the unique identifier of the first message in a log file associated with the first storage pool. For example, refer to... Figure 7 In the user interface, select the plant as Lydia, the system as PPE, and the spool as ADP_BS. Search all logs associated with ADP_BS (including archived logs, but excluding the large number of logs in Network Attached Storage (NAS) disks) for log blocks containing the unique identifier ABRU or PLABRU_ATRA. These log blocks can be identified by the keyword KM_Receive at the beginning and end. A portion of the found logs can be found, for example, in the following example... Figure 8 Note that unique identifiers are not limited to those listed above, and the identifiers at the beginning and end of log blocks are not limited to those listed above either.
[0053] In other embodiments, operation 303 may involve searching for a first log block containing the full text of the first message in a log file associated with the first storage pool. For example, the corresponding log block can be found by searching the entire 382SIR1_382SIR1_PLABRU_ATRAN010452382SIR1_PLABRU_AIR100000002953026#OKAYIR15220210326105507A00. Note that the operation of determining the first log block containing the first message is not limited to the above.
[0054] Method 300 also includes, in operation 304, determining the second storage pool and the second message using the log records of the first log block based on the first key and the first storage pool. Below, we will first further explain the key, and then combine it with... Figure 8 The following example illustrates operation 304.
[0055] The first keyword is used to identify the second storage pool, and may be specific to the first storage pool, although in some embodiments it may not be specific to the first storage pool. For each storage pool, there may be a specific set of keywords to identify the next / previous storage pool. In the case that the first storage pool is ADP_BS, the first keyword may include one or more of the following: received from, senten, partner_name, and KM_Receive.
[0056] Furthermore, when the storage pool is GEN, the corresponding keywords can include one or more of the following: Send telegram, Start, Bytes received, and End. When the storage pool is ORP, the corresponding keywords can include one or more of the following: KM-Receive, partner_name, Incoming telegram, paramtele*, and Waiting for next. When the storage pool is ZPI, the corresponding keywords can include one or more of the following: Waiting for the next, received from, Sending telegram to, and partner. Additionally, keywords used to determine the next / previous storage pool can also include, for example, from sender, spool, Sent telegram, Received telegram, and Sending telegram, etc.
[0057] Additionally, keywords can be nested sets of keywords. For example, you could first search for or match "from sender" within a log block, and then search for or match the keyword "spool".
[0058] One possible code example is as follows:
[0059]
[0060] Note that the keywords are not limited to the examples above. In other embodiments, the keywords may not be fixed, but may be flexibly configurable, as long as they can be used to determine another storage pool related to message flow. This other storage pool is not necessarily the next storage pool immediately following the current storage pool, but may be the previous storage pool, or even a storage pool that is more than one space away from the current storage pool.
[0061] In some embodiments, operation 304 may, for example, be determining a first log record having a first keyword and a first storage pool within a first log block, the first log record including a second storage pool, wherein the second storage pool is the next storage pool to which the first message is sent; and extracting a second message from subsequent log records of the first log record, wherein the second message is a message generated based on the first message and received by the second storage pool.
[0062] Using the aforementioned message as an example, the first key specific to the first storage pool ADP_BS could be, for example, partner_name. (See reference...) Figure 8Within the log block shown, based on ADP_BS and partner_name, the following log record was determined: FQAL_tel_senden:eigener_name:[ADP_BS]partner_name:[TEL_ADPB]FQAL_tel_senden:eigener_name:[ADP_BS]partner_name:[ZPI_TELE]
[0063] Based on the content of these two log records, the next storage pool to which the aforementioned message is destined can be determined. The two flows are to TEL_ADPB and ZPI_TELE, respectively. Subsequently, according to the ADP_BS log structure, the log records following each of the above log records include the generated second message. For example, the second message going to TEL_ADPB is 382SIR1_382SIR1_PESVORGBKEIN0104IR15220210326105507A00. The second message going to ZPI_TELE is (see...) Figure 8 (Lines 3-5 from the bottom) ADP_BS ADP_BS ADP_TELEKEIN0001ADP_BS52382SIR1_PLABRU_AIR100000002953026OINSERT20210326105507029.
[0064] The above operations 303-304 can be executed repeatedly to continuously determine the next storage pool or the next message until the termination condition is met.
[0065] The cyclic process may include: identifying a second log block containing the second message in a log file associated with the second storage pool; determining a third storage pool based on the second keyword and the second storage pool, using the log records of the second log block, wherein the third storage pool is the next storage pool to which the second message is sent; and determining a third message, wherein the third message is a message generated based on the second message and received by the third storage pool.
[0066] For example, in the second storage pool is Figure 2 In the case of TEL_ADPB shown, the message flow to PESIR152 can be determined based on the corresponding keyword and TEL_ADPB.
[0067] For example, in the second storage pool for Figure 2In the case of ZPI_TELE shown, message flow can be located using one or more keywords from Waiting for the next, received from, Sending telegram to, and partner, along with ZPI_TELE. In this example, no matching keywords were found, and the message flow ended at ZPI_TELE.
[0068] Termination conditions may include, but are not limited to, one or more of the following: the current log block does not contain a keyword for determining the next storage pool; the current log block contains the string "Telegram End"; or the determined next storage pool is the same as the first storage pool.
[0069] The following text will combine Figure 4 The cyclic process of operations 303-304 is further described.
[0070] Furthermore, the method disclosed herein is not limited to determining the next storage pool or the next message, but can also be used to determine the previous storage pool or the previous message, in combination with... Figure 5 The method described herein can also be used to determine both the previous storage pool and the next storage pool.
[0071] Figure 4 This is a flowchart illustrating a method 400 for obtaining logs according to another embodiment of the present disclosure. Operations 301-302 in method 400 are similar to the corresponding operations in method 300, and will not be described again here.
[0072] like Figure 4 As shown, after operations 301-302, method 400 continues, which also includes operation 401, in which the first message is regarded as the current message and the first storage pool is regarded as the current storage pool.
[0073] Continuing with method 400, the method further includes, in operation 402, identifying the current log block containing the current message in the log file associated with the current storage pool. Operation 402 can be performed similarly to the example of operation 303.
[0074] Continuing with method 400, operation 403 further includes determining whether a string indicating the end of message flow, such as Telegram End, exists in the current log block. Telegram End indicates a normal end to message flow. If yes, operations 408-410 are executed; otherwise, operation 404 is executed.
[0075] Continuing with method 400, this also includes, in operation 404, determining whether any key exists within the current log block for determining the next storage pool. If yes, proceed to operation 405; otherwise, execute operations 408-410. (See reference) Figure 9 Taking the ZPI_TELE log file as an example, if keywords such as "Sendingtelegram to" and "partner" cannot be matched or found after receiving a message in this log block, it is considered that the message flow has ended.
[0076] Continuing with method 400, operation 405 further includes determining the next storage pool and the next message using the log record of the current log block, based on the key used to determine the next storage pool and the current storage pool. Operation 405 can be performed similarly to operation 304.
[0077] Continuing with method 400, the process further includes, in operation 406, determining whether the next storage pool identified in 405 is the same as the first storage pool. If yes, operations 408-410 are executed; otherwise, operation 407 is executed. (See reference) Figure 10 Taking ADP_PS as the first storage pool as an example, after the packet flows to PEXTOF52, it returns to ADP_PS. According to "IPS responsetelegram",<IPABRU_R> If the message is identified as "recognized", and both the starting storage pool (first storage pool) and the ending storage pool (next storage pool) are identified as ADP_PS, then the message flow is considered to have ended.
[0078] Continuing with method 400, the process further includes updating the current message with the next message determined in 405 and updating the current storage pool with the next storage pool determined in 405 in operation 407, and then returning to execute operation 402 to continue the loop process.
[0079] Method 400 also includes, in operation 408, returning the various storage pools and corresponding messages identified during operations 401-407, for example, to the front end for processing. Next, in operation 409, based on the identified messages and storage pools, retrieving logs containing the corresponding identified messages from the log files associated with each identified storage pool. Then, in operation 410, highlighting error messages in the retrieved logs, for example, highlighting errors.
[0080] Figure 5 This is a flowchart illustrating a method for obtaining logs according to another embodiment of the present disclosure. Operations 301-304 in method 500 are similar to the corresponding operations in method 300, and will not be described again here.
[0081] like Figure 5As shown, method 500 further includes operation 501, in which a fourth storage pool is determined using records from the first log block based on a third key and the first storage pool, wherein the fourth storage pool is the previous storage pool from which the first message originated. The third key is used to determine the fourth storage pool and is specific to the first storage pool. In some examples, the third key may include one or more of the following: eigener_name and received from.
[0082] Using the method and system disclosed herein, when a problem occurs in a production system, each process related to the flow of that first message in the entire production system can be extracted from the first message. This allows for quick and easy acquisition of all logs related to the problem, enabling rapid tracking and location of the problem logs, reducing troubleshooting time, and thus assisting in the recovery of the production system from failure. Furthermore, the method and system disclosed herein can be flexibly configured and applied to continuously upgraded production systems and newly established production lines, exhibiting flexibility and scalability.
[0083] Figure 6 This is a schematic diagram illustrating a general hardware environment in which a system according to embodiments of the present disclosure can be implemented.
[0084] Now for reference Figure 6 The diagram illustrates an example of compute node 600. Compute node 600 is merely one example of a suitable compute node and is not intended to imply any limitation on the scope of use or functionality of the embodiments described herein. In any case, compute node 600 is capable of implementing and / or performing any of the functions set forth above.
[0085] Within compute node 600, there is a computer system / server 4012 that can operate with a wide variety of other general-purpose or special-purpose computing system environments or configurations. Examples of well-known computing systems, environments, and / or configurations suitable for use with computer system / server 4012 include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputer systems, mainframe computer systems, and distributed cloud computing environments that include any of the aforementioned systems or devices, etc.
[0086] Computer system / server 4012 can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Generally, program modules can include routines, programs, objects, components, logic, data structures, etc., that perform specific tasks or implement specific abstract data types. Computer system / server 4012 can be implemented in a distributed cloud computing environment, where tasks are performed by remote processing devices linked via a communication network. In a distributed cloud computing environment, program modules can reside on both local and remote computer system storage media, including memory storage devices.
[0087] like Figure 6 As shown, the computer system / server 4012 in compute node 600 is illustrated in the form of a general-purpose computing device. Components of the computer system / server 4012 may include, but are not limited to: one or more processors or processing units 4016, system memory 4028, and a bus 4018 that couples the various system components, including the system memory 4028, to the processing unit 4016.
[0088] Bus 4018 represents any one or more of several types of bus architectures, including memory buses or memory controllers, peripheral buses, accelerated graphics ports, processors, or local buses using any of the various bus architectures. As an example and not a limitation, these architectures include, but are not limited to, Industry Standard Architecture (ISA) buses, Microchannel Architecture (MAC) buses, Enhanced ISA buses, Video Electronics Standards Association (VESA) local buses, Peripheral Component Interconnect (PCI) buses, Peripheral Component Interconnect High Speed (PCIe) buses, and Advanced Microcontroller Bus Architecture (AMBA).
[0089] Computer system / server 4012 typically includes various computer system readable media. These media can be any available media accessible by computer system / server 4012, including volatile and non-volatile media, removable and non-removable media.
[0090] System memory 4028 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 4030 and / or cache memory 4032. Computer system / server 4012 may also include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, a storage system 4034 may be provided for reading from and writing to a non-removable non-volatile magnetic medium (not shown, and generally referred to as a "hard disk drive"). Although not shown, a disk drive may be provided for reading from and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive may be provided for reading from and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM, or other optical media). In these cases, each may be connected to bus 4018 via one or more data media interfaces. As will be further described and illustrated below, memory 4028 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of embodiments of this disclosure.
[0091] By way of example and not limitation, a program / utility 4040 having a set (at least one) of program modules 4042, along with an operating system, one or more application programs, other program modules, and program data, may be stored in memory 4028. Each of the operating system, one or more application programs, other program modules, and program data, or some combination thereof, may include an implementation of a network environment. Program modules 4042 generally perform functions and / or methods as described in the embodiments herein.
[0092] The computer system / server 4012 can also communicate with one or more external devices 4014 (such as a keyboard, indicating device, display 4024, etc.), one or more devices that enable a user to interact with the computer system / server 4012, and / or any device that enables the computer system / server 4012 to communicate with one or more other computing devices (e.g., a network interface card, modem, etc.). This communication can occur via input / output (I / O) interface 4022. Furthermore, the computer system / server 4012 can communicate with one or more networks (such as a local area network (LAN), a general area network (WAN), and / or a public network (e.g., the Internet)) via network adapter 4020. As depicted, network adapter 4020 communicates with other components of the computer system / server 4012 via bus 4018. It should be understood that, although not shown, other hardware and / or software components can be used in conjunction with the computer system / server 4012. Examples include, but are not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archiving storage systems.
[0093] This disclosure can be implemented as a system, method, and / or computer program product. The computer program product may include one or more computer-readable storage media having computer-readable program instructions thereon for causing a processor to perform aspects of this disclosure.
[0094] Computer-readable storage media can be tangible devices capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example (but not limited to), electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes the following: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital universal disc (DVD), memory sticks, floppy disks, mechanical encoding devices (such as punch cards or recessed protrusions storing instructions thereon), and any suitable combination of the foregoing. As used herein, computer-readable storage media is not to be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.
[0095] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network (e.g., the Internet, local area network, wide area network, and / or wireless network) to an external computer or external storage device. The network may include copper cables, fiber optic cables, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to computer-readable storage media within the respective computing / processing device.
[0096] Computer-readable program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages (such as Smalltalk, C++, etc.) and conventional procedural programming languages (such as the "C" programming language or similar programming languages). The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network (including a local area network (LAN) or a wide area network (WAN)), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, including, for example, programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), may be personalized by utilizing state information from the computer-readable program instructions to perform aspects of this disclosure.
[0097] This document describes aspects of the present disclosure with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0098] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine, such that, when executed by the processor of the computer or other programmable data processing apparatus, these instructions create means for implementing the functions / behaviors specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions may also be stored in a computer-readable storage medium that can instruct a computer, programmable data processing apparatus, and / or other device to operate in a particular manner, thereby including an article of manufacture comprising instructions for implementing aspects of the functions / behaviors specified in one or more blocks of the flowchart and / or block diagram.
[0099] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus, or other device to produce a computer-implemented process, thereby causing the instructions to be executed on the computer, other programmable apparatus, or other device to perform the functions / behaviors specified in one or more boxes of a flowchart and / or block diagram.
[0100] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a portion of a module, segment, or instruction containing one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the figures. For example, depending on the functions involved, two consecutive blocks may actually be executed substantially in parallel, or these blocks may sometimes be executed in reverse order. It will also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified function or behavior or executes a combination of dedicated hardware and computer instructions.
[0101] Those skilled in the art should also understand that the various operations illustrated in sequence in the embodiments of this disclosure do not necessarily have to be performed in the illustrated order. Those skilled in the art can adjust the order of operations as needed. They can also add more operations or omit some operations as needed.
[0102] Various embodiments of this disclosure have been described for illustrative purposes, but are not intended to be exhaustive or limiting of the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles of the embodiments, their practical application, or technical improvements to technologies found in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for obtaining logs, comprising: Obtain the first message associated with the problem occurring in the production system; The first storage pool is determined based on the string contained in the first message; In the log file associated with the first storage pool, identify the first log block containing the first message; Within the first log block, a first log record with a first key and a first storage pool is determined. This first log record includes a second storage pool, where the second storage pool is the next storage pool to which the first message is sent. Extract the second message from the log records following the first log record, wherein the second message is a message generated based on the first message and received by the second storage pool; In the log file associated with the second storage pool, identify the second log block containing the second message; Within the second log block, a second log record with a second key and a second storage pool is determined, wherein the second log record includes a third storage pool, and wherein the third storage pool is the next storage pool to which the second message is destined; Extract the third message from the log records following the second log record, wherein the third message is a message generated based on the second message and received by the third storage pool; as well as In response to one of the following, the identified message and storage pool are returned to the front end: The second key used to determine the third storage pool does not exist in the second log block; The second log block contains the string "Telegram End"; or The third storage pool is the same as the first storage pool.
2. The method according to claim 1, further comprising: Based on the third key and the first storage pool, the fourth storage pool is determined using the records of the first log block, where the fourth storage pool is the previous storage pool from which the first message originated.
3. The method according to claim 1, wherein, The first log block containing the first message is identified as including: In the log files associated with the first storage pool, locate the first log block containing the unique identifier of the first message; or In the log file associated with the first storage pool, locate the first log block containing the full text of the first message.
4. The method according to claim 1, wherein, The first key is used to identify the second storage pool, and the first key is specific to the first storage pool, including one or more of the following: received from, senten, partner_name, and KM_Receive.
5. The method according to claim 1, wherein, The second keyword is used to identify the third storage pool, and the second keyword is specific to the second storage pool, including one or more of the following: Waiting for the next, received from, Sending telegram to, and partner.
6. The method according to claim 2, wherein, The third key is used to identify the fourth storage pool, and the third key is specific to the first storage pool, including one or more of the following: eigener_name and received from.
7. The method according to claim 1, wherein, The first keyword is configurable.
8. The method of claim 1, further comprising: Based on the identified messages and storage pools, retrieve the logs with the corresponding identified messages from the log files associated with each identified storage pool; as well as Highlight the error messages in the retrieved logs.
9. A computer system for acquiring logs, comprising: One or more processors, and A memory coupled to the one or more processors, the memory storing computer-readable program instructions that, when executed by the one or more processors, cause the one or more processors to perform the method as described in any one of claims 1-8.
10. A non-transitory computer-readable medium for acquiring logs, the non-transitory computer-readable medium having computer-readable program instructions stored thereon, the instructions causing the one or more processors, when executed, to perform the method comprising any one of claims 1-8.
11. A computer program product for acquiring logs, comprising computer-readable program instructions that, when executed by one or more processors, cause the one or more processors to perform the method according to any one of claims 1-8.
Citation Information
Patent Citations
Logic log processing method and device and electronic equipment
CN111198861A
Log processing method and device, terminal equipment and storage medium
CN111352902A