CN110659349A - Log query method, device, equipment and computer readable storage medium - Google Patents

Log query method, device, equipment and computer readable storage medium Download PDF

Info

Publication number
CN110659349A
CN110659349A CN201910903316.4A CN201910903316A CN110659349A CN 110659349 A CN110659349 A CN 110659349A CN 201910903316 A CN201910903316 A CN 201910903316A CN 110659349 A CN110659349 A CN 110659349A
Authority
CN
China
Prior art keywords
log
query
log query
operation instruction
page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910903316.4A
Other languages
Chinese (zh)
Inventor
卢道和
杨军
陈广胜
陈翼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
WeBank Co Ltd
Original Assignee
WeBank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN201910903316.4A priority Critical patent/CN110659349A/en
Publication of CN110659349A publication Critical patent/CN110659349A/en
Priority to PCT/CN2020/112212 priority patent/WO2021057383A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/338Presentation of query results

Abstract

The invention relates to the technical field of financial technology (Fintech), and discloses a log query method, which comprises the following steps: when a log query request is received, acquiring a first query dimension corresponding to the log query request; calling a preset data interface to query a preset log database, and acquiring a log corresponding to the first query dimension through the preset data interface; generating a log query page containing the log according to the log fed back by the preset data interface; and receiving an operation instruction triggered based on the log query page, and executing the operation instruction to complete the log query operation. The invention also discloses a log query device, equipment and a computer readable storage medium. The invention improves the convenience of log query operation.

Description

Log query method, device, equipment and computer readable storage medium
Technical Field
The invention relates to the technical field of financial technology (Fintech), in particular to a log query method, a device, equipment and a computer readable storage medium.
Background
With the rapid development of internet technologies, especially internet financial technologies (Fintech), more and more technologies (big data, distributed, Blockchain, artificial intelligence, etc.) are applied in the financial field, and more financial service platforms are used.
The operation of the service platforms is inevitable to cause faults in the operation process, so that the service platforms record operation information in the form of logs, operation and maintenance personnel can perform fault troubleshooting by analyzing the logs, the current service platforms are related to each other, when one service platform fails, other service platforms related to the service platform are often influenced, the operation and maintenance personnel need to log in each service platform and inquire the logs generated by each service platform, and the log inquiry operation method is complex.
Disclosure of Invention
The invention mainly aims to provide a log query method, a log query device, log query equipment and a computer readable storage medium, and aims to solve the technical problem that user operation is complex in the current log query process.
In order to achieve the above object, the present invention provides a log query method, which comprises the following steps:
when a log query request is received, acquiring a first query dimension corresponding to the log query request;
calling a preset data interface to query a preset log database, and acquiring a log corresponding to the first query dimension through the preset data interface;
generating a log query page containing the log according to the log fed back by the preset data interface;
and receiving an operation instruction triggered based on the log query page, and executing the operation instruction to complete the log query operation.
In an embodiment, the log query method further includes:
when a log collection instruction is received, calling a preset collection interface to collect a log generated by a service platform, and obtaining the attribute of the log, wherein the attribute comprises collection time, a service platform identifier, a log source IP address and a log identifier;
and storing the log and the attribute association to a preset log database.
In an embodiment, before the step of generating, according to the log fed back by the preset data interface, a log query page including the log, the method includes:
when a display configuration request is received, outputting a display configuration prompt to prompt a user to configure display configuration information of a log query page;
acquiring display configuration information input based on the display configuration prompt;
the step of generating a log query page including the log according to the log fed back by the preset data interface includes:
generating a display template according to a display format in the display configuration information, and adding the log fed back by the preset data interface into the display template to obtain a log list;
and adding a functional component in a preset area of the log list, and generating a log query page containing the log.
In an embodiment, the receiving an operation instruction triggered based on the log query page, and executing the operation instruction to complete the log query operation includes:
receiving an operation instruction triggered based on the log query page, and judging whether the operation instruction contains keywords or not;
if the operation instruction contains a keyword, inquiring the log through the preset data interface to obtain a target log containing the keyword;
and updating the log query page according to the target log fed back by the preset data interface.
In an embodiment, after the step of receiving an operation instruction triggered based on the log query page and determining whether the operation instruction includes a keyword, the method includes:
if the operation instruction does not contain keywords, when the operation instruction is a page turning operation instruction, taking a page number corresponding to the page turning operation instruction as a second query dimension;
and acquiring a target log corresponding to the second query dimension through the preset data interface, and updating the log query page according to the target log fed back by the preset data interface.
In an embodiment, after the step of generating a log query page including the log according to the log fed back by the preset data interface, the method includes:
if the operation instruction triggered based on the log query page is not received within a preset time period, acquiring a user identifier of a current login user;
and obtaining historical operation behavior data corresponding to the user identification, determining an operation instruction according to the historical operation behavior data, and executing the operation instruction.
In an embodiment, before the step of obtaining a first query dimension corresponding to a log query request when the log query request is received, the method includes:
when an abnormal prompt sent by a service platform is received, a platform identification of the service platform is obtained as a first query dimension, and a log query request is triggered based on the first query dimension.
In addition, to achieve the above object, the present invention further provides a log query apparatus, including:
the request receiving module is used for acquiring a first query dimension corresponding to a log query request when the log query request is received;
the query acquisition module is used for calling a preset data interface to query a preset log database and acquiring a log corresponding to the first query dimension through the preset data interface;
the receiving and generating module is used for generating a log query page containing the log according to the log fed back by the preset data interface;
a first execution module, configured to receive an operation instruction triggered based on the log query page, execute the operation instruction, and complete a log query operation
In addition, to achieve the above object, the present invention further provides a log query device, including: the system comprises a memory, a processor and a log query program stored on the memory and capable of running on the processor, wherein the log query program realizes the steps of the log query method when being executed by the processor.
In addition, to achieve the above object, the present invention also provides a computer readable storage medium, on which a log query program is stored, and the log query program, when executed by a processor, implements the steps of the log query method as described above.
The invention provides a log query method, a log query device, log query equipment and a computer readable storage medium. According to the embodiment of the invention, the log query device queries the log database by calling the preset data interface, the preset data interface acquires the logs of each service platform and sends the logs to the log query device, and the log query device receives the logs of each service platform and generates the log query page containing the logs, so that operation and maintenance personnel can perform log query operation based on the log query page, the operation convenience of log query is improved, and the log query efficiency is further improved.
Drawings
FIG. 1 is a schematic diagram of an apparatus architecture of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a log querying method according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a log querying method according to a third embodiment of the present invention;
FIG. 4 is a flowchart illustrating a log querying method according to a fourth embodiment of the present invention;
fig. 5 is a functional block diagram of an embodiment of a log query device according to the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a schematic device structure diagram of a hardware operating environment according to an embodiment of the present invention.
The log query device of the embodiment of the invention can be a PC or a server.
As shown in fig. 1, the log query device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Those skilled in the art will appreciate that the configuration of the apparatus shown in fig. 1 is not intended to be limiting of the apparatus and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a log query program.
In the device shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; the processor 1001 may be configured to call a log query program stored in the memory 1005, and execute operations in the log query method described below, and the method implemented when the log query program executed on the processor is executed may refer to each embodiment of the log query method of the present invention, which is not described herein again.
Currently, an application program is deployed on a plurality of Linux servers, and an operation and maintenance person needs to search a log of a certain specific keyword of a certain application program, and a commonly adopted log search method includes: 1. the operation and maintenance personnel log in the Linux server one by one, jump to the corresponding log directory, open the log file by adopting Linux native commands such as less, vim and other commands, and input keywords to search the log keywords; 2. compiling Shell or Python scripts by operation and maintenance personnel, simulating and logging in a plurality of application servers through an appointed bastion, simultaneously handwriting a keyword log query command such as a grep command and the like of Linux, transmitting the matched keyword log back to the appointed bastion, and displaying the log content from the grep to a page; 3. and (4) the operation and maintenance personnel write the collected application logs into the logs of Elastic Search by means of an open-source ELK suite, and perform condition Search by means of a log Search interface provided by Kibana.
The existing log searching mode has the defects that 1, operation and maintenance personnel log in a plurality of Linux servers and obviously have low operation efficiency for searching logs, so that the problem of quick positioning is not facilitated; 2. the operation and maintenance personnel rely on the Shell or Python script to automatically log in a plurality of server search scripts, the operation and maintenance personnel need to edit a search command each time, the search threshold is high, errors are easy to occur, a plurality of application machines need to be logged in each time, and if a scene searched by a plurality of people at the same time is met, the pressure on the application servers is increased; 3. while the operation and maintenance personnel can see the search result by searching through the log interface of Kibana of ELK, the search dimension is limited, only the log corresponding to the keyword can be searched, further searching cannot be carried out, and the log except the search result cannot be seen.
Based on the hardware structure, the embodiment of the log query method is provided.
The first embodiment of the log query method of the invention comprises the following steps:
when a log query request is received, acquiring a first query dimension corresponding to the log query request;
calling a preset data interface to query a preset log database, and acquiring a log corresponding to the first query dimension through the preset data interface;
generating a log query page containing the log according to the log fed back by the preset data interface;
and receiving an operation instruction triggered based on the log query page, and executing the operation instruction to complete the log query operation.
The log query device in the embodiment can optionally install an Elastic Search engine which is a distributed, high-expansion and high-real-time Search and data analysis engine based on Lucene and is realized based on a RESTful web interface (the implementation step of the Elastic Search engine comprises the steps of submitting data to an Elastic Search database, segmenting words of corresponding sentences through a word controller, storing the weights and segmentation results into the data, ranking the results according to the weights when a user searches the data, scoring, and returning and presenting the results to the user).
In the embodiment of the invention, the logs generated by the service platforms are searched based on the Elastic Search, specifically, the Elastic Search collects log information of each service platform, stores the collected logs into a distributed cluster of the Elastic Search, and then analyzes and processes the collected logs, specifically, the operations of word segmentation, weight increase and the like are performed on the logs, and the feature information in the logs is extracted, when the Elastic Search receives a Search instruction sent by an operation and maintenance worker, the Elastic Search obtains keywords in the Search instruction, compares the keywords with the feature information of each log, and outputs a log Search result.
However, in the existing Search process, if the Search result fed back by the Elastic Search is inaccurate, the user can only change the keyword to perform multiple searches, and if the user needs to check other logs except the Search result for the Elastic Search, the user needs to log in other pages of the service platform again or log in other platforms to perform the query, which is complicated.
For example, the service platform a, the service platform B, and the service platform C are service platforms associated with each other, when the service platform a gives an alarm when the service platform a is abnormal, if a user wants to input "error" at an interface of an Elastic Search, so as to Search logs corresponding to the service platform a, the service platform B, and the service platform C, and obtain a log including "error" that is only a log generated by the service platform a, the data of the service platform B and the service platform C cannot be queried, and if the user needs to query logs corresponding to the service platform B and the service platform C, so as to determine whether the service platform B and the service platform C are affected, the user needs to log in the service platform B and the service platform C, and input a corresponding query instruction, so that the user can perform a query.
The embodiment of the present invention is an improvement made in view of the above circumstances, and the log query method in this embodiment is applied to a log query device, where the log query device is in communication connection with a cluster of an Elastic Search, and the cluster of the Elastic Search is in communication connection with a plurality of service platforms through interfaces, so that the log query device can query logs of the plurality of service platforms (service subsystems), and before the log query operation, the log query device performs a log collection operation in advance, specifically, the log query method includes:
when a log collection instruction is received, a preset collection interface is called to collect logs generated by a service platform, attributes of the logs are obtained, and the logs and the attributes are stored in a preset log database in a correlated mode.
The log query device receives a log acquisition instruction, a trigger mode of the log acquisition instruction is not particularly limited, when the log query device receives the log acquisition instruction, the log query device calls a preset acquisition interface (the preset acquisition interface can be a preset Elastic Search log acquisition interface or an interface developed again by operation and maintenance personnel) to acquire logs generated by a service platform and acquire attributes of each log, wherein the attributes comprise acquisition time, service platform identification (the service platform identification is identification information of the unique service platform, such as a service platform name or a service platform number), a log source IP address and a log identification; the log query device stores the log and the attribute association corresponding to the log to a preset log database, wherein the preset log database is a preset database for storing log information, and the preset log database can be arranged in a distributed cluster.
In this embodiment, the log query device acquires logs of each service platform by calling a preset acquisition interface, and stores the logs and attribute associations corresponding to the logs in a preset log database, and when receiving a log query request, the log query device queries the preset log database to obtain logs of different service platforms, so that a user does not need to log in multiple service platforms, specifically:
referring to fig. 2, fig. 2 is a schematic flowchart of a first embodiment of a log query method according to the present invention, where the log query method includes:
step S10, when receiving the log query request, obtaining a first query dimension corresponding to the log query request.
In this embodiment, the log query device receives the log query request, and a trigger mode of the log query request is not specifically limited, that is, the log query request may be actively triggered by a user, for example, the user inputs a log for querying a xxx service platform on a display interface corresponding to the log query device to trigger the log query request; in addition, the log query request may also be automatically triggered by the log query device, for example, the log query device presets a log query condition: the log query is automatically carried out every morning, and the log query request is automatically triggered when the log query equipment arrives at the morning.
When the log query device receives the log query request, the log query device obtains a first query dimension corresponding to the log query request, where the first query dimension may be a time dimension of log collection, a space dimension of log storage, a space dimension of log generation, and the like.
Step S20, a preset data interface is called to query a preset log database, and a log corresponding to the first query dimension is obtained through the preset data interface.
The log query device calls a preset data interface (the preset data interface refers to a data interface for a preset user to query logs of each service platform, for example, the preset data interface can be understood as a data interface corresponding to a cluster of Elastic Search) to query a preset log database, specifically, the preset data interface is associated with a data analysis script, and the preset data interface obtains logs corresponding to a first query dimension in the preset log database by running the data analysis script.
For example, the first query dimension is a log generated by a xxx service platform, and the service query equipment calls a preset data interface to query a preset log database to obtain the log generated by the xxx service platform in the log database; for another example, the first query dimension is 2019, 9, 10, and the service query device calls a preset data interface to query a preset log database to obtain logs collected in the log database at 2019, 9, 10.
The preset data interface feeds the log corresponding to the first query dimension back to the log query device, so that the log query device processes the log, specifically:
step S30, according to the log fed back by the preset data interface, generating a log query page containing the log.
The log query device receives logs fed back by the preset data interface, typesets the logs and generates a log query page containing the logs.
The embodiment provides a specific implementation manner of typesetting a log by a log query device to generate a log query page, and specifically includes:
step a1, when receiving the display configuration request, outputting a display configuration prompt to prompt the user to configure the display configuration information of the log inquiry page;
and a step a2, acquiring the display configuration information input based on the display configuration prompt.
In this embodiment, the display configuration information is preset in the log query device, and the display configuration information may be understood as format information of the log query page, that is, the log query device receives the display configuration request, a trigger manner of the display configuration request is not specifically limited, and when the log query device receives the display configuration request, the log query device outputs a display configuration prompt to prompt a user to configure the display configuration information of the log query page, for example, the user may set, based on the display configuration prompt: the typesetting format is 10 logs per page, and the log query equipment acquires display configuration information input based on the display configuration prompt.
The log query device generates a log query page based on the set display configuration information, and specifically includes:
b1, generating a display template according to the display format in the display configuration information, and adding the log fed back by the preset data interface into the display template to obtain a log list;
step b2, adding functional components in the preset area of the log list, and generating a log query page containing the log.
The log query equipment receives a log fed back by the Elastic Search data interface, acquires a display format in the display configuration information, and generates a display template according to the display format; for example, if the display format is n rows and 2 columns, the log query device generates a display template with n rows and 2 columns, the log query device sequentially inputs 300 logs into a first column of the display template, the log query device inputs 300 logs into a second column of the display template to obtain a log list, and adds functional components (the functional components include but are not limited to a page turning component, a scrolling component, a jumping component, a search component, and the like) in an edge area of the log list to generate a log query page including the logs.
Further, in order to improve flexibility of generating the log query page, the generating, by the log query device, the log query page based on the set display configuration information may further include:
generating a display template according to a display format in the display configuration information, and dividing the logs fed back by the preset data interface according to display dimensions in the display template to form a log subset;
filling all the log sub-sets into the display template in sequence to obtain a log list;
and adding a functional component in a preset area of the log list, and generating a log query page containing the log.
Wherein log display dimensions include, but are not limited to: the log display method comprises the steps of displaying logs according to the system types corresponding to the logs, log source IP and the like, and then combining display dimensions and a display template to display the logs, so that the flexibility of log display is improved, and the flexibility, accuracy and query efficiency of subsequent log query are also improved.
And step S40, receiving an operation instruction triggered based on the log query page, and executing the operation instruction to complete the log query operation.
The log query device receives an operation instruction triggered based on a log query page, namely, the log query page simultaneously provides a shortcut key function and comprises function components such as downward page turning, upward page turning, forward log jumping to the forefront of the log, final log jumping and searching for a next keyword, operation and maintenance personnel can trigger an operation request based on the function components in the log query page, and the log query device receives the operation instruction triggered based on the log query page and executes the operation instruction to complete log query operation. The operation instruction triggered by the log query page can be triggered in the log page to realize the log switching query of the page. In addition, the method can be triggered after one log is selected, and in this case, when switching operation is performed, the selected patent is queried upwards and downwards, so that the specific situation of the log can be traced.
That is to say, the log query device realizes the tracing of the logs based on the operation instruction, that is, the log query device realizes switching from one log to the log at the upper layer, the log at the lower layer, or the logs of other service platforms at the same service level according to the operation instruction, for example, the log query device is in communication connection with a service platform a and a service platform B, the service platform a is an upstream service system of the service platform B, and the user inputs the keyword in the log query page: and the log query page highlights an error log containing the error, wherein the error log can be generated by the service platform A or the service platform B, and the user jumps to a second log of the service platform B from the first log of the service platform A by a shortcut key.
It should be added that, in addition to providing the function components in the log query page, the embodiment of the present invention may also provide shortcut keys that meet the routine search of the operation and maintenance staff, and specifically, in the function components in the log query page, when it is detected that the mouse cursor is suspended to any one of the function components but is not clicked, prompt information that prompts the corresponding function of each shortcut key is output. For example, the output prompt information: shift + F represents turning the page to the new log; the Shift + B represents that the page is turned to the old journal (the journal can be scrolled back and forth through the two functions); shift + G represents jumping to the top of the log; the Shift + H represents jumping to the backmost of the log (by the cooperation of the two shortcut keys and forward and backward page turning, the quick browsing of the new and old logs can be realized); shift + N is matched with the search function of the keyword functional component, so that the one-by-one matching jump of keyword search can be realized (operation and maintenance personnel can search each matched keyword log and the context content of the log).
In addition, in order to improve the accuracy and efficiency of log query, other operations are supported in the log query page, for example, after a user selects a certain log, a small floating window is popped up in the log query page to prompt the user to slide left and right to turn pages up and down so as to turn pages to a previous log (realize tracing of a previous log reason) causing the log reason, click to jump to the forefront (realize tracing of a starting log reason of the log), double click to jump to the rearmost (realize previewing of a terminating log reason of the log), and the like; for another example, after the user selects the designated area of the log query page, the log query page may be locally zoomed according to an operation instruction (e.g., a scroll operation of sliding a mouse) of the user.
In the embodiment, the log query device queries the log database by calling the preset data interface, the preset data interface acquires the logs of each service platform and sends the logs to the log query device, and the log query device receives the logs of each service platform and generates the log query page containing the logs, so that operation and maintenance personnel can perform log query operation based on the log query page, the operation convenience of log query is improved, and the log query efficiency is further improved.
The technical scheme in the embodiment is applied to the financial field, for example, in a log query page of a deposit/loan product or a system of a banking institution, and provides a full-text search function conforming to log search habits of operation and maintenance personnel based on the full-text search capability of elastic search.
Further, based on the first embodiment of the log query method of the present invention, a second embodiment of the log query method of the present invention is provided.
This embodiment is a step before step S10 in the first embodiment, and a specific implementation manner of triggering a log query request is provided in this embodiment, and includes:
when an abnormal prompt sent by a service platform is received, a platform identification of the service platform is obtained as a first query dimension, and a log query request is triggered based on the first query dimension.
In this embodiment, a log query device monitors each service platform in real time, when an abnormality occurs in a service platform, an abnormality prompt sent by the service platform is sent to the log query device, the log query device detects the abnormality of the service platform, when the log query device detects the abnormality of the service platform, the log query device obtains a platform identifier of the service platform as a first query dimension, and the log query device triggers a log query request based on the first query dimension.
In this embodiment, the log query device automatically triggers the log query request by detecting the state of each service platform, so that the log query operation is more convenient.
Further, referring to fig. 3, a third embodiment of the log query method of the present invention is proposed based on the first embodiment of the log query method of the present invention.
This embodiment is a refinement of step S40 in the first embodiment, and is different from the first embodiment in that:
step S41, receiving an operation instruction triggered based on the log query page, and determining whether the operation instruction includes a keyword.
The log query device receives an operation instruction triggered based on a log query page, and judges whether the operation instruction contains a keyword, for example, a keyword input box is set in the log query page, if a user inputs the keyword in the keyword input box and clicks a search component of the log query page, the operation instruction contains the keyword; the user does not have the keywords input in the keyword input box, and directly clicks the jump component of the log query page, so that the operation instruction does not contain the keywords.
Step S42, if the operation instruction includes a keyword, querying the log through the preset data interface to obtain a target log including the keyword.
If the operation instruction includes a keyword, the log query device queries the log corresponding to the first query dimension through the preset data interface to obtain a target log including the keyword, in this embodiment, the log query device queries the log corresponding to the first query dimension through the preset data interface to obtain the target log including the keyword,
it can be understood that the log query operation is not substantially performed on the log query device, the log query device is a query operation process for displaying the preset data interface, so as to facilitate the user to view the log query device, and meanwhile, the log query device can send the operation instruction of the user to the preset data interface, so that the preset data interface is executed according to the operation instruction of the user.
And step S43, updating the log query page according to the target log fed back by the preset data interface.
The log query device receives a target log fed back by a preset data interface, and updates the log on a log query page to the target log.
For convenience of understanding, a hundred-degree search engine is taken as an example for explanation, a user inputs keywords in a data search field of a hundred degrees of a terminal, the hundred-degree search engine searches according to the keywords and sends a search result to the terminal, and in the process, the user cannot view a data source of the hundred-degree search engine, and the user can only see the search result. The log query device calls a preset data interface to query a log database, the preset data interface acquires logs of each service platform and sends the logs to the log query device, the log query device acquires the logs of each service platform, the log query device takes the logs of each service platform as a data source and simulates preset query operation, namely, the preset data interface sends target logs to the log query device, and the log query device receives the target logs fed back by the preset data interface and updates the logs on a log query page to the target logs.
Further, referring to fig. 4, a fourth embodiment of the log query method of the present invention is provided based on the above-mentioned embodiment of the log query method of the present invention.
This embodiment is a refinement of step S40 in the first embodiment, and this embodiment is a step after step S41 in the third embodiment, and the present embodiment is different from the above embodiments in that:
step S44, if the operation instruction does not include the keyword, when the operation instruction is a page-turning operation instruction, taking a page number corresponding to the page-turning operation instruction as a second query dimension.
If the operation instruction does not contain keywords, the log query device judges whether the operation instruction is a page turning operation instruction or not, and when the operation instruction is not the page turning operation instruction, the log query device determines the type of the operation instruction and determines a second query dimension according to the type of the operation instruction, for example, a user can click an xxxIP address in a log query page, and the log query device takes the xxxIP address as the second query dimension.
When the operation instruction is a page turning operation instruction, the log query device obtains a page number corresponding to the page turning operation instruction, and takes the page as a second query dimension. The triggering manner of the page turning operation instruction is not specifically limited, that is, the page turning operation instruction may be triggered when the user presses a shortcut key, a combination key, or inputs a preset operation in a floating widget of the page.
Step S45, obtaining a target log corresponding to the second query dimension through the preset data interface, and updating the log query page according to the target log fed back by the preset data interface.
The log query device queries the logs through a preset data interface, determines a target log corresponding to the second query dimension, the preset data interface sends the target log to the log query device, the log query device receives the target log, the log query device updates the logs in the log query page to the target log, namely, for example, the logs in the current log query page are items 1 to 10, and a user clicks in the log query page: and when the log is jumped to the end, the preset data interface inquires the log to determine the final target log, the preset data interface sends the final target log to the log inquiry equipment, and the log inquiry equipment receives the target log fed back by the preset data interface and updates the log in the log inquiry page into the target log.
In addition, the log query device determines a second query dimension through the operation instruction to limit a search range, and therefore faster and more accurate log search is achieved.
Further, based on the above embodiment of the log query method of the present invention, a fifth embodiment of the log query method of the present invention is provided.
This embodiment is a step after step S30 in the first embodiment, and is different from the first embodiment in that:
and if the operation instruction triggered based on the log query page is not received within a preset time period, acquiring the user identification of the current login user.
And obtaining historical operation behavior data corresponding to the user identification, determining an operation instruction according to the historical operation behavior data, and executing the operation instruction.
If the operation instruction triggered based on the log query page is not received within the preset time period, the log query device obtains a user identifier of the current login user (the user identifier refers to identification information for uniquely identifying the login user, for example, user account information).
The log query device acquires historical operation behavior data corresponding to the user identifier, wherein the historical operation behavior data comprises user browsing time, browsing frequency and the like; and the log query device determines an operation instruction according to the historical operation behavior data and executes the operation instruction.
The log query device determines the operation instruction according to the historical operation behavior data, and the operation instruction can be realized in different modes: the first method is as follows: the log query device takes the historical operation instruction with the highest frequency in the historical operation behavior data as an operation instruction; the second method comprises the following steps: the log query device determines the operation instruction according to the trigger time of each historical operation instruction in the historical operation behavior data, for example, the current time is 15 points, a user generally queries the log of the service platform a from 14 points to 16 points in the historical operation behavior data, and the log query device triggers the operation instruction of the log query of the service platform a.
According to the log query method and device, the log query device automatically triggers the operation instruction according to the historical operation behavior data of the user, so that the operation of the user can be effectively reduced, and the log query efficiency is improved.
Referring to fig. 5, an embodiment of the present invention further provides a log query apparatus, where the log query apparatus includes:
the request receiving module 10 is configured to, when a log query request is received, obtain a first query dimension corresponding to the log query request;
the query obtaining module 20 is configured to call a preset data interface to query a preset log database, and obtain a log corresponding to the first query dimension through the preset data interface;
the receiving and generating module 30 is configured to generate a log query page including the log according to the log fed back by the preset data interface;
and the first execution module 40 is configured to receive an operation instruction triggered based on the log query page, and execute the operation instruction to complete the log query operation.
In one embodiment, the log query apparatus includes:
the log acquisition module is used for calling a preset acquisition interface to acquire logs generated by a service platform and acquiring attributes of the logs when a log acquisition instruction is received, wherein the attributes comprise acquisition time, a service platform identifier, a log source IP address and a log identifier;
and the association storage module is used for associating and storing the log and the attribute to a preset log database.
In one embodiment, the log query apparatus includes:
the receiving and outputting module is used for outputting a display configuration prompt when receiving the display configuration request so as to prompt a user to configure display configuration information of the log query page;
the configuration acquisition module is used for acquiring display configuration information input based on the display configuration prompt;
the receiving and generating module 30 includes:
the display device comprises a first generating unit used for generating a display template according to a display format in the display configuration information, and a second generating unit used for adding the log fed back by the preset data interface into the display template to obtain a log list, adding a functional component in a preset area of the log list and generating a log query page containing the log.
In an embodiment, the first executing module 40 includes:
the receiving and judging unit is used for receiving an operation instruction triggered based on the log query page and judging whether the operation instruction contains keywords or not;
the query determining unit is used for querying the log through the preset data interface if the operation instruction contains a keyword, so as to obtain a target log containing the keyword;
and updating the log on the log query page into the target log according to the target log fed back by the preset data interface.
In an embodiment, the first executing module 40 includes:
the dimension acquiring unit is used for taking a page number corresponding to the page turning operation instruction as a second query dimension when the operation instruction is a page turning operation instruction if the operation instruction does not contain keywords;
and the log updating unit is used for acquiring the target log corresponding to the second query dimension through the preset data interface and updating the log query page according to the target log fed back by the preset data interface.
In an embodiment, the log query apparatus includes:
the identification acquisition module is used for acquiring the user identification of the current login user if the operation instruction triggered based on the log query page is not received within a preset time period;
and the second execution module is used for acquiring historical operation behavior data corresponding to the user identifier, determining an operation instruction according to the historical operation behavior data, and executing the operation instruction.
In an embodiment, the log query apparatus includes:
the request triggering module is used for acquiring a platform identifier of a service platform as a first query dimension when receiving an abnormal prompt sent by the service platform, and triggering a log query request based on the first query dimension.
The method executed by each program module can refer to each embodiment of the log query method of the present invention, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a server device (e.g., a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A log query method is characterized by comprising the following steps:
when a log query request is received, acquiring a first query dimension corresponding to the log query request;
calling a preset data interface to query a preset log database, and acquiring a log corresponding to the first query dimension through the preset data interface;
generating a log query page containing the log according to the log fed back by the preset data interface;
and receiving an operation instruction triggered based on the log query page, and executing the operation instruction to complete the log query operation.
2. The log querying method as claimed in claim 1, further comprising:
when a log collection instruction is received, calling a preset collection interface to collect a log generated by a service platform, and obtaining the attribute of the log, wherein the attribute comprises collection time, a service platform identifier, a log source IP address and a log identifier;
and storing the log and the attribute association to a preset log database.
3. The log query method of claim 1, wherein before the step of generating a log query page including the log according to the log fed back by the preset data interface, the method comprises:
when a display configuration request is received, outputting a display configuration prompt to prompt a user to configure display configuration information of a log query page;
acquiring display configuration information input based on the display configuration prompt;
the step of generating a log query page including the log according to the log fed back by the preset data interface includes:
generating a display template according to a display format in the display configuration information, and adding the log fed back by the preset data interface into the display template to obtain a log list;
and adding a functional component in a preset area of the log list, and generating a log query page containing the log.
4. The log query method as claimed in claim 1, wherein the step of receiving an operation instruction triggered based on the log query page, and executing the operation instruction to complete the log query operation comprises:
receiving an operation instruction triggered based on the log query page, and judging whether the operation instruction contains keywords or not;
if the operation instruction contains a keyword, inquiring the log through the preset data interface to obtain a target log containing the keyword;
and updating the log query page according to the target log fed back by the preset data interface.
5. The log query method according to claim 4, wherein after the step of receiving the operation command triggered based on the log query page and determining whether the operation command includes the keyword, the method comprises:
if the operation instruction does not contain keywords, when the operation instruction is a page turning operation instruction, taking a page number corresponding to the page turning operation instruction as a second query dimension;
and acquiring a target log corresponding to the second query dimension through the preset data interface, and updating the log query page according to the target log fed back by the preset data interface.
6. The log query method according to claim 1, wherein after the step of generating a log query page including the log according to the log fed back by the preset data interface, the method includes:
if the operation instruction triggered based on the log query page is not received within a preset time period, acquiring a user identifier of a current login user;
and obtaining historical operation behavior data corresponding to the user identification, determining an operation instruction according to the historical operation behavior data, and executing the operation instruction.
7. The log query method according to any one of claims 1 to 6, wherein before the step of obtaining the first query dimension corresponding to the log query request when the log query request is received, the method includes:
when an abnormal prompt sent by a service platform is received, a platform identification of the service platform is obtained as a first query dimension, and a log query request is triggered based on the first query dimension.
8. A log query apparatus, comprising:
the request receiving module is used for acquiring a first query dimension corresponding to a log query request when the log query request is received;
the query acquisition module is used for calling a preset data interface to query a preset log database and acquiring a log corresponding to the first query dimension through the preset data interface;
the receiving and generating module is used for generating a log query page containing the log according to the log fed back by the preset data interface;
and the first execution module is used for receiving an operation instruction triggered based on the log query page and executing the operation instruction so as to complete the log query operation.
9. A log query device, comprising: memory, a processor and a log query program stored on the memory and executable on the processor, the log query program when executed by the processor implementing the steps of the log query method as claimed in any one of claims 1 to 7.
10. A computer-readable storage medium, having a log query program stored thereon, which when executed by a processor implements the steps of the log query method according to any one of claims 1 to 7.
CN201910903316.4A 2019-09-23 2019-09-23 Log query method, device, equipment and computer readable storage medium Pending CN110659349A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910903316.4A CN110659349A (en) 2019-09-23 2019-09-23 Log query method, device, equipment and computer readable storage medium
PCT/CN2020/112212 WO2021057383A1 (en) 2019-09-23 2020-08-28 Log query method, apparatus, device, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910903316.4A CN110659349A (en) 2019-09-23 2019-09-23 Log query method, device, equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN110659349A true CN110659349A (en) 2020-01-07

Family

ID=69038821

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910903316.4A Pending CN110659349A (en) 2019-09-23 2019-09-23 Log query method, device, equipment and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN110659349A (en)
WO (1) WO2021057383A1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112115338A (en) * 2020-09-15 2020-12-22 平安信托有限责任公司 Page query request processing method, device, equipment and storage medium
CN112148700A (en) * 2020-10-12 2020-12-29 平安科技(深圳)有限公司 Log data processing method and device, computer equipment and storage medium
CN112416897A (en) * 2020-11-18 2021-02-26 青岛海尔科技有限公司 Log query method and device, storage medium and electronic device
CN112491602A (en) * 2020-11-17 2021-03-12 中国平安财产保险股份有限公司 Behavior data monitoring method and device, computer equipment and medium
WO2021057383A1 (en) * 2019-09-23 2021-04-01 深圳前海微众银行股份有限公司 Log query method, apparatus, device, and computer-readable storage medium
CN112835856A (en) * 2021-02-01 2021-05-25 长沙市到家悠享网络科技有限公司 Log data query method and device, equipment and medium
CN114495378A (en) * 2022-01-21 2022-05-13 浪潮卓数大数据产业发展有限公司 Cash withdrawal information acquisition and processing method and system based on ATM

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108319608A (en) * 2017-01-16 2018-07-24 中国移动通信集团湖南有限公司 The method, apparatus and system of access log storage inquiry
CN107291872A (en) * 2017-06-16 2017-10-24 郑州云海信息技术有限公司 A kind of platform blog search rendering method based on mass data
CN110245060A (en) * 2019-05-20 2019-09-17 北京奇艺世纪科技有限公司 Service monitoring method and equipment, service monitoring device and medium
CN110659349A (en) * 2019-09-23 2020-01-07 深圳前海微众银行股份有限公司 Log query method, device, equipment and computer readable storage medium

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021057383A1 (en) * 2019-09-23 2021-04-01 深圳前海微众银行股份有限公司 Log query method, apparatus, device, and computer-readable storage medium
CN112115338A (en) * 2020-09-15 2020-12-22 平安信托有限责任公司 Page query request processing method, device, equipment and storage medium
CN112148700A (en) * 2020-10-12 2020-12-29 平安科技(深圳)有限公司 Log data processing method and device, computer equipment and storage medium
WO2021189953A1 (en) * 2020-10-12 2021-09-30 平安科技(深圳)有限公司 Log data processing method and apparatus, computer device, and storage medium
CN112491602A (en) * 2020-11-17 2021-03-12 中国平安财产保险股份有限公司 Behavior data monitoring method and device, computer equipment and medium
CN112491602B (en) * 2020-11-17 2023-09-26 中国平安财产保险股份有限公司 Behavior data monitoring method and device, computer equipment and medium
CN112416897A (en) * 2020-11-18 2021-02-26 青岛海尔科技有限公司 Log query method and device, storage medium and electronic device
CN112416897B (en) * 2020-11-18 2023-07-21 青岛海尔科技有限公司 Log query method and device, storage medium and electronic device
CN112835856A (en) * 2021-02-01 2021-05-25 长沙市到家悠享网络科技有限公司 Log data query method and device, equipment and medium
CN114495378A (en) * 2022-01-21 2022-05-13 浪潮卓数大数据产业发展有限公司 Cash withdrawal information acquisition and processing method and system based on ATM

Also Published As

Publication number Publication date
WO2021057383A1 (en) 2021-04-01

Similar Documents

Publication Publication Date Title
CN110659349A (en) Log query method, device, equipment and computer readable storage medium
US11698900B2 (en) Leveraging search query history in a search interface
JP4093012B2 (en) Hypertext inspection apparatus, method, and program
US9336279B2 (en) Hidden text detection for search result scoring
US10963138B1 (en) Webpage testing tool
US8533173B2 (en) Generating search query suggestions
CN103098051A (en) Search engine optmization assistant
EP2994842A1 (en) Recommending context based actions for data visualizations
US9195761B2 (en) System and method for navigating documents
US9870279B2 (en) Analysis apparatus and analysis method
US20110238653A1 (en) Parsing and indexing dynamic reports
JP2011034399A (en) Method, device and program for extracting relevance of web pages
CN111866158B (en) Routing method, routing device, computer equipment and storage medium
CN113760763A (en) Software testing method, device, server and system
US20090204577A1 (en) Saved Search and Quick Search Control
US8290976B2 (en) Systems and methods for executing a navigation query
WO2000074193A1 (en) User support system and method
US9176939B2 (en) Alert driven interactive interface to a website mining system
CN112100074A (en) Interface diagnosis method, device, terminal and computer readable storage medium
CN105808623A (en) Search-based page access event association method and device
US20120150899A1 (en) System and method for selectively generating tabular data from semi-structured content
CN114595391A (en) Data processing method and device based on information search and electronic equipment
CN113032078A (en) Page display method and device, electronic equipment and computer readable storage medium
US8321458B2 (en) Related contact and record recommendation for product design
CN113886132B (en) Intelligent web-side error repairing method and device and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination