Log query method, system, computing device and medium

By using a message queue between the query system server and the application server, directly searching logs in the application server, the problem of difficulty in querying logs in a large number of servers is solved, and analysis efficiency is improved and query difficulties caused by database logging failure is avoided.

CN112765100BActive Publication Date: 2025-02-28INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110028023.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-08
Publication Date
2025-02-28
Estimated Expiration
2041-01-08

AI Technical Summary

Technical Problem

Querying logs in a large number of servers is difficult, and due to the need to query the database, the analysis efficiency is reduced and logging failed leads to problems such as inability to query the log.

Method used

The query system server receives the query request from the terminal device, writes the query request information and keywords into the message queue, so that the application server can obtain it through the message queue and directly search the log in the application server, generates query results and sends them to the query system server, and finally sends the result to the terminal device.

Benefits of technology

The steps for querying logs are simplified, the difficulty of direct querying in a large number of servers is avoided, analysis efficiency is improved, and the problem of inability to query logs due to failure of database logging is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present disclosure provides a method for querying logs executed by a number-checking system server, which can be used in the financial field or other fields. The method includes: receiving a number-checking request for a target log from a terminal device, wherein the number-checking request includes number-checking requirement information and keywords; writing the number-checking requirement information and keywords in the number-checking request into a message queue, so that the application server obtains the number-checking requirement information and keywords through the message queue, and queries the target log according to the number-checking requirement information and keywords; receiving the query result of the target log from the application server; and sending the query result to the terminal device. The present disclosure also provides a method for querying logs executed by an application server, a system for querying logs, a computing device, and a computer storage medium.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the financial field, and more specifically, to a method and system for querying logs, a computing device, and a computer storage medium. Background Art

[0002] With the rapid development of the Internet, related technologies use physical deployment methods such as distributed and cloud computing to deploy application systems. For various application systems that are directly facing customers and need to support large concurrency or a large number of customers online at the same time, the benefit of using physical deployment methods such as distributed and cloud computing is that the pressure of transaction requests can be dispersed to various service nodes through hard loads (such as F5 devices) or soft loads (such as ngix), effectively improving system performance and capacity. However, this method requires the deployment of hundreds or even thousands of servers. When a problem occurs in a transaction, it is very difficult to query logs in hundreds or even thousands of servers to determine the problem. Summary of the invention

[0003] One aspect of the present disclosure provides a method for querying logs executed by a number-checking system server, comprising: receiving a number-checking request for a target log from a terminal device, wherein the number-checking request includes number-checking requirement information and keywords; writing the number-checking requirement information and keywords in the number-checking request into a message queue, so that an application server obtains the number-checking requirement information and the keywords through the message queue, and queries the target log according to the number-checking requirement information and the keywords; receiving a query result for the target log from the application server; and sending the query result to the terminal device.

[0004] Optionally, writing the number-checking requirement information and the keyword in the number-checking request into a message queue comprises: generating a number-checking request message according to the number-checking requirement information and the keyword; and writing the number-checking request message into the message queue.

[0005] Optionally, the method further includes: storing the query result in the number-checking system server; and in response to receiving a number-checking request for the target log again, obtaining a query result corresponding to the target log from the number-checking system server.

[0006] Optionally, the method further includes: obtaining the storage time of each query result in the number-checking system server in the number-checking system server; and deleting the query results whose storage time exceeds a preset time.

[0007] Another aspect of the present disclosure provides a method for querying logs executed by an application server, comprising: obtaining number-checking requirement information and keywords from a message queue; determining whether a target log matching the number-checking requirement information and keywords is stored in the application server based on the obtained number-checking requirement information and keywords; generating a query result based on information of the target log when the target log is stored in the application server; and sending the query result to a number-checking system server.

[0008] Optionally, the message queue includes at least one number-checking request message; obtaining the number-checking requirement information and keywords from the message queue includes: obtaining the at least one number-checking request message from the message queue in a preset order; and parsing the obtained number-checking request message to obtain the number-checking requirement information and the keywords.

[0009] Optionally, the count requirement information includes one or more of a generation date requirement, a log type requirement, a query location requirement, and a query path requirement; determining whether a target log matching the count requirement information and the keyword is stored in the application server based on the acquired count requirement information and the keyword includes: querying the application server for a target log containing the keyword based on the count requirement information.

[0010] Optionally, a resident program is deployed in the application server, and the log query method is executed by the resident program.

[0011] Another aspect of the present disclosure provides a system for querying logs, including: a counting system server and an application server; wherein the counting system server includes: a first receiving module, used to receive a counting request for a target log from a terminal device, wherein the counting request includes counting requirement information and keywords; a writing module, used to write the counting requirement information and keywords in the counting request into a message queue; a second receiving module, used to receive a query result of the target log from the application server; and a first sending module, used to send the query result to the terminal device; the application server includes: an acquisition module, used to acquire the counting requirement information and keywords from the message queue; a retrieval module, used to determine whether a target log matching the counting requirement information and keywords is stored in the application server according to the acquired counting requirement information and keywords; a generation module, used to generate a query result according to information of the target log when the target log is stored in the application server; and a second sending module, used to send the query result to the counting system server.

[0012] Another aspect of the present disclosure provides a computing device, including: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described above.

[0013] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.

[0014] Another aspect of the present disclosure provides a computer program, which includes computer executable instructions, and the instructions are used to implement the method described above when executed.

[0015] According to the method or system for querying logs of the embodiments of the present disclosure, logs can be directly searched in each application server without querying the database, and the steps are simple, which solves the problem that it is difficult to query logs in a large number of servers. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] For a more complete understanding of the present disclosure and its advantages, reference will now be made to the following description taken in conjunction with the accompanying drawings, in which:

[0017] Figure 1 A schematic diagram of a distributed system structure according to an embodiment of the present disclosure is shown;

[0018] Figure 2 A schematic diagram of a method for obtaining logs in the related art is shown schematically;

[0019] Figure 3 The application scenarios of the method for querying logs and the system for querying logs according to the embodiments of the present disclosure are schematically shown;

[0020] Figure 4 A flowchart of a method for querying logs according to an embodiment of the present disclosure is schematically shown;

[0021] Figure 5 A block diagram of a system for querying logs according to an embodiment of the present disclosure is schematically shown;

[0022] as well as

[0023] Figure 6 A block diagram of a computer system suitable for implementing the method described in the embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0024] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0025] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0026] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0027] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0028] Some block diagrams and / or flow charts are shown in the accompanying drawings. It should be understood that some boxes or combinations thereof in the block diagrams and / or flow charts can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that these instructions can create a device for implementing the functions / operations described in these block diagrams and / or flow charts when executed by the processor. The technology of the present disclosure can be implemented in the form of hardware and / or software (including firmware, microcode, etc.). In addition, the technology of the present disclosure can take the form of a computer program product on a computer-readable storage medium storing instructions, which can be used by an instruction execution system or used in conjunction with an instruction execution system.

[0029] The embodiment of the present disclosure provides a method for querying logs and a system for querying logs that can apply the method. The method includes: a query system server receives a query request for a target log from a terminal device, wherein the query request includes query requirement information and keywords; the query requirement information and keywords in the query request are written into a message queue, so that an application server obtains the query requirement information and keywords through the message queue, and queries the target log according to the query requirement information and keywords; the query system server receives a query result for the target log from the application server; and the query result is sent to the terminal device.

[0030] It should be noted that the method and device for querying logs according to the embodiments of the present disclosure can be used in the financial field, and can also be used in any field other than the financial field. The present disclosure does not limit the application field of the method and device for querying logs.

[0031] Figure 1 A schematic diagram of the distributed system structure according to an embodiment of the present disclosure is shown schematically.

[0032] like Figure 1 As shown, illustratively, the distributed system is divided into two service nodes (also referred to as server groups), node 1 and node 2. Node 1 includes APPsrv 1, APPsrv 2, ... APPsrv N, WEBsrv 1, WEBsrv 2, ... WEBsrv N and database server 1, and node 2 includes APPsrv 21, APPsrv 22, ... APPsrv 2N, WEBsrv 21, WEBsrv 22, ... WEBsrv 2N and database server 2. The APPsrv (application server) and WEBsrv (network server) in each node are one-to-one corresponding. APPsrv and WEBsrv in a service node can be expanded horizontally, but the upper limit of the database link is constant due to factors such as the performance of the database server and the authorization level. Therefore, there is an upper limit value for the horizontal expansion of servers in a service node in theory. When the capacity of the server in a node reaches the upper limit, it is necessary to expand the service node horizontally. Theoretically, the service node can be expanded to n (n is a positive integer). Generally speaking, when n reaches about 20, the number of servers in the entire system may reach thousands.

[0033] To locate problematic transactions among hundreds or even thousands of servers, you need to first locate the server where the customer transaction occurred based on the user ID and approximate transaction time (such as date, hour), and then find the corresponding log file based on the server IP to further analyze and locate the problem.

[0034] The log acquisition method used in the relevant technology is divided into the following two steps:

[0035] In the first step, according to the customer ID and transaction date and time, the database log is retrieved in the database, and the problem feedback description is compared with the database log records to locate the specific transaction and then find the server where the transaction occurred.

[0036] In the second step, based on the located server, obtain the relevant log files of the corresponding date and time, then find the user logs in these log files, restore the user operation steps and scenarios, so as to analyze, locate and solve the problem.

[0037] Figure 2 The following is a schematic diagram of a method for obtaining logs in the related art.

[0038] like Figure 2 As shown, the developer (or problem analyst) initiates a query request for transaction records through the query terminal device. The first step is to directly traverse the database of each node through the query system server (for example, directly query through the JDBC link) to obtain the records that meet the conditions in all node databases. The second step is to find the IP address of the target server involved in the transaction record in these records, and then directly obtain the relevant log files from the target server through the link through the query system according to the IP address in a quasi-FTP manner.

[0039] The core of the above solution is how to accurately find the server involved, and the process of finding the server involved is subject to at least the following factors.

[0040] First, based on the principle of isolating production data from developers, the problem analysis process of developers needs to go through multiple steps of approval by the system before they can perform database query operations to obtain usable results. This approval process is subject to the work schedule of the approver and may take from minutes to hours, affecting the efficiency of problem analysis.

[0041] Secondly, the recording process of the database log involves calling public components. In the process of calling public components, the recording may fail due to excessive field length or various exceptions. At this time, it is almost impossible to locate the server through the database log.

[0042] Figure 3 The application scenarios of the method for querying logs and the system for querying logs according to the embodiments of the present disclosure are schematically shown. It should be noted that: Figure 3 The examples shown are merely scenarios in which the embodiments of the present disclosure can be applied, to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.

[0043] like Figure 3As shown, the application scenario 300 according to this embodiment may include a user terminal device 301, a network 302, a network device 303, a network server 304, an application server 305, a database server 306, a number-checking terminal device 307, a number-checking system server 308 and a message queue server 309.

[0044] The network 302 is used to provide a medium for a communication link between the user terminal device 301 and the application server 305. The network 302 may include various connection types, such as wired or wireless communication links or optical fiber cables.

[0045] The user can use the user terminal device 301 to interact with the application server 305 through the network 302 to receive or send messages, etc. Various communication client applications can be installed on the user terminal device 301, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0046] The user terminal device 301 may be any electronic device having a display screen and supporting web browsing, including but not limited to a smart phone, a tablet computer, a laptop computer, a desktop computer, and the like.

[0047] The application server 305 can analyze and process the received user request (eg, transaction request) and other data, and feed back the processing result (eg, web page, information, or data obtained or generated according to the user request) to the terminal device.

[0048] The network device 303 and the network server 304 are used to provide services such as data transfer between the user terminal device 301 and the application server 305. The database server 306 is used to store data received or generated by the application server 305.

[0049] Database server 306 is for example Figure 3 The database server 1 and the database server 2 in the application server 305 are as follows: Figure 3 APPsrv 1, APPsrv 2, ... APPsrv N, WEBsrv 1, WEBsrv 2, APPsrv 21, APPsrv22, ... APPsrv 2N. The network server 304 is for example Figure 3WEBsrv 1, WEBsrv 2, ... WEBsrv N, WEBsrv 21, WEBsrv 22, ... WEBsrv 2N in. Application server 305 and network server 304 can be set in a PAAS (Platform as a Service) cloud, or can be set only in an IAAS (Infrastructure as a Service) cloud. Among them, APPsrv 1, APPsrv 2, ... APPsrv N, WEBsrv 1, WEBsrv 2, ... WEBsrv N and database server 1 belong to node 1. APPsrv 21, APPsrv 22, ... APPsrv 2N, WEBsrv 21, WEBsrv 22, ... WEBsrv 2N and database server 2 belong to node 2. The developer can send a count request to the count system server 308 through the count terminal device 307 to request the count system server 308 to perform a log query. The counting system server 308 generates a counting request message according to the counting request and sends it to the message queue server 309. The message queue server 309 passes the counting request message into the message queue. Each application server 305 obtains the counting request message from the message queue respectively, and performs log query according to the counting request message to determine whether there is a target log corresponding to the counting request. In the case where the target log is stored in the application server 305, a query result is generated according to the information of the target log, and the query result is sent to the counting system server 308. The counting system server 308 feeds the query result back to the counting terminal device 307. The counting terminal device 307 can display the query result at the front end for reference by developers.

[0050] It should be understood that Figure 3 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0051] Figure 4 The flowchart of the method for querying logs according to an embodiment of the present disclosure is schematically shown.

[0052] like Figure 4 As shown, the method includes operations S410 to S480. The method can be applied to a distributed system.

[0053] In operation S410, a query request for a target log is received from a terminal device through a query system server.

[0054] According to an embodiment of the present disclosure, a user may send a query request to a query system server through a terminal device to request to search for a target log. The query request includes query requirement information and keywords. The query requirement information may include, for example, a generation date requirement, a log type requirement, a query location requirement, a query path requirement, etc. Keywords may include, for example, a user ID or a transaction code, etc.

[0055] According to an embodiment of the present disclosure, the target log may be, for example, a log of an application system, such as a file-type log and a structured log recorded in a database. Exemplarily, a file-type log may include, for example, systemout.log, systemerr.log, and other .log files recorded by log4j. A structured log may include, for example, a server IP, a container ID, a transaction code, a user identifier (e.g., a user ID, such as a user name, a mobile phone number, etc.), a transaction date and time (e.g., YYYYMMDDHHMMSS, where YYYY represents year, MM represents month, DD represents day, HH represents hour, MM represents minute, and SS represents second), an operation step name, an operation step result (e.g., success, failure, error code, etc.), and other core fields.

[0056] In operation S420, the number-checking system server writes the number-checking requirement information and the keyword in the number-checking request into the message queue.

[0057] According to an embodiment of the present disclosure, the number-checking system server can be used as a message producer, and the application server can be used as a message consumer. The number-checking system server generates a message and passes it into a message queue, and then the application server obtains the message from the message queue, that is, consumes the message. Based on this, operation S420 can, for example, include generating a number-checking request message according to the number-checking requirement information and keywords, and then writing the number-checking request message into the message queue.

[0058] According to an embodiment of the present disclosure, the message queue may be set in the number-checking system server. According to other embodiments of the present disclosure, a message queue server independent of the number-checking system server may also be set, and the message queue may be set in the message queue server.

[0059] According to other embodiments of the present disclosure, the message queue may also be set in a distributed cache or an FTP shared folder.

[0060] In operation S430, the application server obtains the query request information and the keyword from the message queue.

[0061] According to the disclosed embodiment, the message queue may include one or more number-checking request messages. When there are multiple number-checking request messages in the message queue, these number-checking request messages will be sorted according to a preset order and distributed to each application server in sequence. The preset order may be, for example, the time order of writing to the message queue, with the first message written in front and the later message written in the back. Based on this, operation S430 may, for example, include obtaining at least one number-checking request message from the message queue according to the preset order, and then parsing the obtained number-checking request message to obtain the number-checking requirement information and keywords.

[0062] According to an embodiment of the present disclosure, the application server may subscribe to messages in a message queue and receive push messages from the message queue to obtain a number-checking request message. Alternatively, the application server may also actively obtain a number-checking request message in a message queue. For example, the application server may periodically query the message queue to obtain a number-checking request message newly added to the message queue since the last query operation.

[0063] In operation S440, it is determined whether a target log matching the number-checking requirement information and the keyword is stored in the application server according to the acquired number-checking requirement information and the keyword.

[0064] According to an embodiment of the present disclosure, based on this, operation S440 may include, for example: searching the application server for a target log containing the keyword according to the query requirement information.

[0065] In operation S450, when the target log is stored in the application server, a query result is generated according to information of the target log.

[0066] According to an embodiment of the present disclosure, the query result may include, for example, information related to the target log, such as the container ID, user ID, transaction code, date and time stamp corresponding to the target log, etc. In addition, the query result may also include the IP address of the application server.

[0067] In operation S460, the query result is sent to the number-checking system server through the application server.

[0068] According to an embodiment of the present disclosure, a resident program is deployed in the application server, and the resident program has read permission for the corresponding log path. Operations S430 to S460 can be performed by the resident program. According to an embodiment of the present disclosure, operations S430 to S460 can also be performed by a thread of the application program, and the thread has read permission for the corresponding log path.

[0069] According to an embodiment of the present disclosure, before sending the query result to the number-checking system server, the query result may be structured into classes through the application server, and then the structured query result may be sent to the number-checking system server.

[0070] According to the disclosed embodiment, there may be one or more application servers. In the case of multiple application servers, the multiple application servers may belong to the same server node (or server group) or to different server nodes (or server groups), and each application server performs operations S430 to S460 respectively.

[0071] In operation S470, the query system server receives the query result of the target log from the application server.

[0072] In operation S480, the query result is sent to the terminal device.

[0073] According to an embodiment of the present disclosure, after the query result is sent to the terminal device, the terminal device can be instructed to display the query result to the user at the front end. For example, the number-checking system server can add the query result to the number-checking result interface displayed by the terminal device through the append method.

[0074] According to the embodiments of the present disclosure, users can locate application servers with target logs based on query results, obtain target logs from these application servers, and then perform subsequent processes such as problem diagnosis based on the target logs.

[0075] According to the method for querying logs in the embodiment of the present disclosure, logs can be directly searched in each application server without querying the database. The steps are simple and convenient, which solves the problem that it is difficult to query logs in a large number of servers. In addition, since there is no need to query the database, the problem of reduced analysis efficiency caused by multi-level approval of query permissions can be saved. In addition, the problem of being unable to query logs due to failure of database log recording is also solved.

[0076] According to an embodiment of the present disclosure, after receiving the query result of the target log from the application server, the query result can also be stored in the counting system server, for example, the query result can be stored in the local database of the counting system server. When the counting system server receives the counting request for the target log again, the query result corresponding to the target log can be obtained from the counting system server without issuing the counting request message to each application server. By persistently storing the counting result, the counting result can be reused, reducing the transaction request of the entire counting system and saving system resources.

[0077] In addition, the storage time of each query result in the number-checking system server can also be obtained, and the query results whose storage time exceeds the preset time can be deleted. This reduces the storage space occupied. The preset time can be determined according to actual needs. For example, in this embodiment, the preset time can be one week.

[0078] Figure 5 A block diagram of a system for querying logs according to an embodiment of the present disclosure is schematically shown.

[0079] like Figure 5 As shown, the system 500 for querying logs includes a query system server 510 and an application server 520. The system 500 for querying logs can execute the above reference Figure 4 Describe the method.

[0080] Specifically, the number-checking system server 510 may include:

[0081] The first receiving module 511 may be configured to receive a query request for a target log from a terminal device, wherein the query request includes query requirement information and keywords.

[0082] The writing module 512 may be used to write the number query requirement information and keywords in the number query request into the message queue.

[0083] The second receiving module 513 may be configured to receive a query result of the target log from the application server.

[0084] The first sending module 514 may be configured to send the query result to a terminal device.

[0085] The application server 520 may include:

[0086] The acquisition module 521 can be used to acquire the query requirement information and keywords from the message queue.

[0087] The search module 522 may be used to determine whether a target log matching the query requirement information and the keyword is stored in the application server according to the acquired query requirement information and the keyword.

[0088] The generating module 523 may be used to generate a query result according to information of the target log when the target log is stored in the application server.

[0089] The second sending module 524 can be used to send the query result to the number-checking system server.

[0090] According to the system for querying logs in the embodiment of the present disclosure, logs can be directly searched in each application server without querying the database, and the steps are simple, which solves the problem that it is difficult to query logs in a large number of servers. In addition, since there is no need to query the database, the problem of reduced analysis efficiency caused by multi-level approval of query permissions can be saved. In addition, the problem of being unable to query logs due to failure of database log recording is also solved.

[0091] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.

[0092] For example, any multiple of the first receiving module 511, the writing module 512, the second receiving module 513, and the first sending module 514, or any multiple of the obtaining module 521, the retrieving module 522, the generating module 523, and the second sending module 524 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first receiving module 511, the writing module 512, the second receiving module 513 and the first sending module 514, or at least one of the acquisition module 521, the retrieval module 522, the generation module 523 and the second sending module 524 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application-specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or by any one of the three implementation methods of software, hardware and firmware or by an appropriate combination of any of them. Alternatively, at least one of the first receiving module 511, the writing module 512, the second receiving module 513 and the first sending module 514, or at least one of the acquisition module 521, the retrieval module 522, the generation module 523 and the second sending module 524 can be at least partially implemented as a computer program module, and when the computer program module is run, the corresponding function can be performed.

[0093] Figure 6The block diagram of a computer system suitable for implementing the method described above according to an embodiment of the present disclosure is schematically shown. Figure 6 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0094] like Figure 6 As shown, the computer system 600 includes a processor 610 and a computer-readable storage medium 620. The computer system 600 can execute the method according to the embodiment of the present disclosure.

[0095] Specifically, the processor 610 may include, for example, a general-purpose microprocessor, an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 610 may also include an onboard memory for cache purposes. The processor 610 may be a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0096] The computer-readable storage medium 620 may be, for example, a non-volatile computer-readable storage medium, and specific examples include but are not limited to: a magnetic storage device, such as a magnetic tape or a hard disk (HDD); an optical storage device, such as a compact disk (CD-ROM); a memory, such as a random access memory (RAM) or flash memory; and the like.

[0097] The computer-readable storage medium 620 may include a computer program 621 , which may include code / computer-executable instructions that, when executed by the processor 610 , cause the processor 610 to perform a method according to an embodiment of the present disclosure or any variation thereof.

[0098] The computer program 621 may be configured to have, for example, a computer program code including a computer program module. For example, in an example embodiment, the code in the computer program 621 may include one or more program modules, for example, including 621A, module 621B, ... It should be noted that the division method and number of modules are not fixed, and those skilled in the art may use appropriate program modules or program module combinations according to actual conditions, and when these program module combinations are executed by the processor 610, the processor 610 may execute the method according to the embodiment of the present disclosure or any variation thereof.

[0099] According to an embodiment of the present invention, at least one of the first receiving module 511, the writing module 512, the second receiving module 513 and the first sending module 514, or at least one of the obtaining module 521, the retrieving module 522, the generating module 523 and the second sending module 524 can be implemented as a reference. Figure 6The computer program modules described herein, when executed by the processor 610, can implement the corresponding operations described above.

[0100] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0101] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: 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), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0102] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0103] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0104] Although the present disclosure has been shown and described with reference to specific exemplary embodiments of the present disclosure, it should be understood by those skilled in the art that various changes in form and details may be made to the present disclosure without departing from the spirit and scope of the present disclosure as defined by the appended claims and their equivalents. Therefore, the scope of the present disclosure should not be limited to the above-mentioned embodiments, but should be determined not only by the appended claims, but also by the equivalents of the appended claims.

Claims

1. A method for querying logs executed by a number-checking system server, comprising: Receiving a query request for a target log from a terminal device, wherein the query request includes query requirement information and a keyword; Writing the number query requirement information and the keyword in the number query request into a message queue, so that the application server obtains the number query requirement information and the keyword through the message queue, and queries the target log according to the number query requirement information and the keyword; receiving a query result of the target log from the application server; and Sending the query result to the terminal device; Wherein, the number checking system server includes: A first receiving module, configured to receive a number query request for a target log from a terminal device, wherein the number query request includes number query requirement information and a keyword; A writing module, used for writing the number query requirement information and keywords in the number query request into a message queue; A second receiving module, configured to receive a query result of the target log from the application server; and The first sending module is used to send the query result to the terminal device.

2. The method according to claim 1, wherein: The step of writing the number query requirement information and the keyword in the number query request into the message queue comprises: Generate a number-checking request message according to the number-checking requirement information and the keyword; and The number-checking request message is written into the message queue.

3. The method according to claim 1, further comprising: The query result is stored in the number-checking system server; as well as In response to receiving a query request for the target log again, a query result corresponding to the target log is obtained from the query system server.

4. The method according to claim 3, further comprising: Obtaining the storage time of each query result in the number-checking system server in the number-checking system server; as well as Delete the query results whose storage time exceeds the preset time.

5. A method for querying logs executed by an application server, comprising: Get the query request information and keywords from the message queue; Determine, based on the acquired query requirement information and keywords, whether the application server stores a target log matching the query requirement information and keywords; In the case where the target log is stored in the application server, generating a query result according to information of the target log; as well as Sending the query result to the number-checking system server; Wherein, the number checking system server includes: A first receiving module, configured to receive a query request for a target log from a terminal device, wherein the query request includes query requirement information and a keyword; A writing module, used for writing the number query requirement information and keywords in the number query request into a message queue; A second receiving module is used to receive a query result of the target log from the application server; and The first sending module is used to send the query result to the terminal device.

6. The method according to claim 5, wherein: The slave message queue includes at least one query request message; the obtaining the query requirement information and keywords from the message queue includes: Obtaining the at least one query request message from the message queue in a preset order; and The obtained number-checking request message is parsed to obtain the number-checking requirement information and the keyword.

7. The method according to claim 5, wherein: The query requirement information includes one or more of a generation date requirement, a log type requirement, a query location requirement, and a query path requirement; The determining, based on the acquired number-checking requirement information and the keyword, whether the application server stores a target log that matches the number-checking requirement information and the keyword includes: According to the query request information, the target log containing the keyword is searched in the application server.

8. The method according to claim 5, wherein: A resident program is deployed in the application server, and the log query method is executed by the resident program.

9. A system for querying logs, comprising: Query system server and application server; Wherein, the number checking system server includes: A first receiving module, configured to receive a query request for a target log from a terminal device, wherein the query request includes query requirement information and a keyword; A writing module, used for writing the number query requirement information and keywords in the number query request into a message queue; A second receiving module is used to receive a query result of the target log from the application server; and A first sending module, used for sending the query result to the terminal device; The application server comprises: The acquisition module is used to obtain the query requirement information and keywords from the message queue; A retrieval module, used to determine whether the application server stores a target log matching the query requirement information and the keyword according to the acquired query requirement information and the keyword; a generating module, configured to generate a query result according to information of the target log when the target log is stored in the application server; and The second sending module is used to send the query result to the number-checking system server.

10. A computing device comprising: one or more processors; a memory for storing one or more computer programs, When one or more computer programs are executed by one or more processors, the one or more processors are caused to implement the method of any one of claims 1 to 8.

11. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to implement the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Log query processing method and device, computer equipment and storage medium

    CN110990362A