CN109033280A - Blog search method, system, computer equipment and storage medium - Google Patents
Blog search method, system, computer equipment and storage medium Download PDFInfo
- Publication number
- CN109033280A CN109033280A CN201810756846.6A CN201810756846A CN109033280A CN 109033280 A CN109033280 A CN 109033280A CN 201810756846 A CN201810756846 A CN 201810756846A CN 109033280 A CN109033280 A CN 109033280A
- Authority
- CN
- China
- Prior art keywords
- log
- information
- unique identification
- solicited message
- request
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Storage Device Security (AREA)
- Debugging And Monitoring (AREA)
Abstract
The present invention relates to daily record data processing technology field more particularly to a kind of blog search method, system, computer equipment and storage mediums.Wherein blog search method include: server back end intercept and acquisition request information, by call be preset in server back end UUID generator generate unique identification, will solicited message and unique identification deposit log recording MDC tool in.Log frame is preset in server back end, the log information of log frame output is intercepted, is stored after log information is split.At server front end page preset search interface, log information is shown in the form of a list.The present invention is based on the log collection schemes of MDC technology, can mitigate the search problem of log significantly, improve the search efficiency of error log.
Description
Technical field
The present invention relates to daily record data processing technology fields more particularly to a kind of blog search method, system, computer to set
Standby and storage medium.
Background technique
Journal file is the network equipment, system and service routine etc., the logout of the log generated in running,
Every a line log all recites the description of the relevant operations such as date, time, user and movement.It can all be set in each type operating system
Various journal files are counted, such as application log, security log, system log, Scheduler serve log, FTP days
Will, WWW log, dns server log etc..When carrying out some operations in system, these journal files would generally be remembered user
The lower some related contents that we operate of record, these contents are quite useful to system security officer.For example user is to system
IPC detection is carried out, system will promptly write down IP used when surveyor's detection, time, user name in security log
Deng IP, time, user name used in detection etc. will be write down in FTP log after being detected with FTP.Log in journal file
Data are very big for the value for realizing network security, and developer can carry out various according to the error log in daily record data
Judgement and analysis.
But when the clustered node of the increasing project of a certain project is more and more, if entire inline system
There are certain unknown problems, developer needs to go for error log, and the day of mistake into the journal file of every equipment
Will be not also it is continuous, may a problem need repeatedly look for error log several times, the efficiency solved the problems, such as is relatively low, operation
Also comparatively laborious.
Summary of the invention
In view of this, it is necessary to which the record for error log is not continuous, and the same trouble-shoots are cumbersome asks
Topic provides a kind of blog search method, system, computer equipment and storage medium.
A kind of blog search method, includes the following steps:
Client request is intercepted in server back end, obtains the solicited message in the client request, it is pre- by calling
The unique identifier UUID generator for being located at the server back end generates the corresponding unique identification of the client request, by institute
It states in solicited message and unique identification deposit log recording MDC tool;
The server back end preset log frame, the log frame contain including request time, solicited message and
Configuration information including unique identification, by the MDC tool the solicited message and unique identification be assigned to the log
The solicited message and unique identification in frame;
The log information for intercepting log frame output, by the log information split into request time, solicited message,
Unique identification and log content call application programming interface API to store the log information after fractionation;
At server front end page preset search interface, search condition field, described search are set on described search interface
In condition field containing at least one of the corresponding field information of the solicited message, include the field information when receiving
After searching request, the log information of storage is searched for, and the corresponding log information of the field information is searched described
Rope interface is shown in the form of a list.
It is described in one of the embodiments, to intercept client request in server back end, obtain the client request
In solicited message, be preset in the unique identifier UUID generator of the server back end by calling, generate the client
Corresponding unique identification is requested at end, will include: in the solicited message and unique identification deposit log recording MDC tool
By calling the filter method of preset spring program to intercept client request, the client request is obtained
In include the address URL, required parameter, the solicited message of requesting host IP and the corresponding project name of the client;
The UUID generator is called to generate the unique identification;
The solicited message and the unique identification are stored using MDC.put method into MDC tool.
In one of the embodiments, when the log frame output journal information, the log frame is matched according to
After setting the solicited message and the unique identification in MDC tool described in acquisition of information, when the log frame output includes request
Between, the log information of the solicited message and the unique identification.
The log information for intercepting the log frame output in one of the embodiments, by the log information
Splitting into request time, the solicited message, the unique identification and log content includes:
Aop method section by calling preset spring program intercepts the log information of the log frame output;
By call the split method of the preset spring program by the log information split into request time,
Solicited message, unique identification and log content.
The calling application programming interface API is by the log information after fractionation in one of the embodiments,
When being stored, using following steps:
Log recording table is set in the database, and setting splits field, the fractionation field in the log recording table
Including request time field, solicited message field, unique identification field and log content field;
It calls the API to execute SQL script, the log information after fractionation is sequentially inserted into the fractionation field,
Complete the storage of log information.
The calling application programming interface API is by the log information after fractionation in one of the embodiments,
When being stored, using following steps:
The API uses search engine Elasticsearch, the Elasticsearch is called, described in after fractionation
Log information is stored in the Elasticsearch.
A kind of blog search system, including such as lower unit:
Client request unit is intercepted, for intercepting client request in server back end, obtains the client request
In solicited message, by calling the unique identifier UUID generator for being preset in the server back end to generate the client
Corresponding unique identification is requested, it will be in the solicited message and unique identification deposit log recording MDC tool;
Default log frame unit, for presetting log frame in the server back end, the log frame contains packet
The configuration information including request time, solicited message and unique identification is included, by the solicited message in the MDC tool and only
The solicited message and unique identification that one mark is assigned in the log frame;
Log information unit is stored, for intercepting the log information of the log frame output, the log information is torn open
It is divided into request time, solicited message, unique identification and log content, calls application programming interface API by the institute after fractionation
Log information is stated to be stored;
Search unit, at server front end page preset search interface, search condition to be arranged on interface in described search
Field, in described search condition field containing at least one of the corresponding field information of the solicited message, include when receiving
After the searching request of the field information, the log information of storage is searched for, and by the field information corresponding day
Will information is shown in the form of a list at described search interface.
The interception client request unit includes: in one of the embodiments,
Blocking module, for obtaining by calling the filter method of preset spring program to intercept client request
It include the address URL, required parameter in the client request, requesting host IP and the corresponding project name of the client are asked
Seek information;
Unique identification module is generated, for calling the UUID generator to generate the unique identification;
Memory module, for being stored the solicited message and the unique identification using MDC.put method to MDC tool
In.
A kind of computer equipment, including memory and processor are stored with computer-readable instruction in the memory, institute
When stating computer-readable instruction and being executed by the processor, so that the step of processor executes above-mentioned blog search method.
A kind of storage medium being stored with computer-readable instruction, the computer-readable instruction are handled by one or more
When device executes, so that the step of one or more processors execute above-mentioned blog search method.
Above-mentioned blog search method, apparatus, computer equipment and storage medium are included in server back end and intercept client
Request obtains the solicited message in client request, by calling the unique identifier UUID for being preset in server back end to generate
Device generates the corresponding unique identification of client request, will be in solicited message and unique identification deposit log recording MDC tool;It is taking
Log frame is preset in business device rear end, and log frame, which contains, matches confidence including request time, solicited message and unique identification
Breath, by MDC tool solicited message and unique identification be assigned to solicited message and unique identification in log frame;Intercept day
The log information of will frame output, splits into request time, solicited message, unique identification and log content for log information, adjusts
The log information after fractionation is stored with application programming interface API;At server front end page preset search interface,
Search condition field is set on search interface, contains at least one corresponding field information of solicited message in search condition field,
When receive include the searching request of field information after, search for the log information of storage, and by the corresponding log of field information
Information is shown in the form of a list in search interface.The present invention is based on the log collection schemes of MDC technology, each client
It holds all log collections of request together and records unique identification, developer looks into after can directly being searched for by front end page
See log, the present invention can mitigate the search problem of log significantly, improve the search efficiency of error log.
Detailed description of the invention
By reading the following detailed description of the preferred embodiment, various other advantages and benefits are common for this field
Technical staff will become clear.The drawings are only for the purpose of illustrating a preferred embodiment, and is not considered as to the present invention
Limitation.
Fig. 1 is the flow chart of the blog search method in one embodiment of the invention;
Fig. 2 is step S1 flow chart in Fig. 1;
Fig. 3 is the structure chart of the blog search system in one embodiment of the invention;
Fig. 4 is the module diagram of the interception client request unit in Fig. 3.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
Those skilled in the art of the present technique are appreciated that unless expressly stated, singular " one " used herein, " one
It is a ", " described " and "the" may also comprise plural form.It is to be further understood that being arranged used in specification of the invention
Diction " comprising " refer to that there are the feature, integer, step, operation, element and/or component, but it is not excluded that in the presence of or addition
Other one or more features, integer, step, operation, element, component and/or their group.
Fig. 1 is the flow chart of the blog search method in one embodiment of the invention, as shown in Figure 1, blog search method
Include the following steps:
Step S1 intercepts client request: intercepting client request in server back end, obtains asking in client request
Information is sought, it is corresponding unique by calling the unique identifier UUID generator for being preset in server back end to generate client request
Mark, will be in solicited message and unique identification deposit log recording MDC tool.
Client generally comprises the address URL, required parameter, requesting host IP and client pair from the request that browser is sent
The solicited message for the project name answered.The server of this step can be the server of log processing platform.In server back end
Above-mentioned solicited message is intercepted, in order to distinguish client request, log processing platform binds a unique mark to each request
Know.When unique identification generates, using the UUID generator for being preset in server back end is called, UUID is Universally Unique Identifier
The abbreviation of (Universally Unique Identifier) is a kind of standard of software construction, is also Open Software Foundation
Group is woven in a part in distributed computing environment field.Its purpose is all elements allowed in distributed system, can be had unique
Identification information in this case, be not required to consider number without doing the specified of identification information by central control terminal
Title replication problem when being created according to library.Therefore this step is corresponding unique by each client request of UUID generator generation
Mark guarantees the uniqueness requested every time.
Log recording MDC tool is a kind of function of convenience record log under the conditions of multithreading, i.e., using multithreading
Mode handles the request of multiple users.Such as in Web Application Server, when user accesses some page, application service
Device will create a new thread to handle the request, or existing thread is multiplexed from thread pool.In the meeting of a user
The duration is talked about, there are the requests that multiple thread process cross the user.This, which to compare, is difficult to differentiate between corresponding to different user
Log.It, will be very troublesome when needing to track the related log record of some user in systems.And in this step
MDC tool can solve the above problems, and MDC tool can regard the Hash table of one with current thread binding as, can be thereto
Add key-value pair.The content for including in MDC tool can be accessed by the code executed in same thread.The sub-line of current thread
Journey can inherit the content of the MDC tool in his father's thread.When needing record log, it is only necessary to needed for being obtained in MDC tool
Information.The content of MDC tool then is saved in due course by program.For a Web application, usually
It is to request processed most to start to save these data.Ensure under multi-process is in the value of MDC tool storage between process
There is no reciprocal influence.The advantages of this step is recorded based on the transaction log of MDC tool, will request after obtaining client request
In information and unique identification deposit MDC tool, for the use of subsequent log frame output journal information.
Step S2, default log frame: when server back end presets log frame, and log frame contains including request
Between, the configuration information including solicited message and unique identification, by MDC tool solicited message and unique identification be assigned to log
Solicited message and unique identification in frame.
Preset log frame includes the logs frame such as log4j or log4j2 in the server.Log4j and log4j2 are
An open source projects of Apache can control the destination of log information conveying by using Log4j or log4j2, can also be with
Control the output format of each log.By defining the rank of each log information, log can be more meticulously controlled
Generating process.And defeated destination, output format, rank etc. is all neatly configured by a configuration file, and
The code of modification application is not needed.By the file of log4j.properties as master configuration file, log4j2 passes through Log4j
Log4j2.xml or log4j2.yml or log4j2.json is master configuration file.
This step is on the basis of the configuration information of original log frame, in configuration file, adds solicited message and only
Configuration information including one mark, so far the log information of all outputs of each client request can all take in configuration file
The log information of above-mentioned several attributes of configuration, i.e. log frame output includes solicited message and unique identification.
Step S3 stores log information: the log information of log frame output is intercepted, when log information is split into request
Between, solicited message, unique identification and log content, call application programming interface API to carry out the log information after fractionation
Storage.
This step intercepts the log information of output in the preset log frame output journal information of server back end, and
Interception deconsolidation process is carried out, log information is split into request time, solicited message, unique identification and log content, and call
Corresponding API is stored.If being carried out log with database purchase log by SQL script and being inserted into database.If
It is stored with search engine Elasticsearch, then the storage method of Elasticsearch is called to be stored, it is preferred to use
The storage of Elasticsearch storage engines, such subsequent searches log information speed is faster.
Step S4, search and displaying log information: at server front end page preset search interface, it is arranged on search interface
Search condition field, in search condition field containing at least one of the corresponding field information of solicited message, include when receiving
After the searching request of field information, the log information of storage is searched for, and by the corresponding log information of field information in search interface
It is shown in the form of a list.
Export suitable log information in correct place, only the first step of reasonable employment log, log recording it is true
Positive interaction is when problematic generation, can help the cracking orientation problem place of developer.This step is searched by default
Rope interface provides the function of search of log information for developer.Search interface is corresponding by least one solicited message
Field information scans for, and so that developer inquires all log informations of the secondary request faster, and quickly navigates to
This time request is with the presence or absence of where problem and problem.Specific search condition field includes the address URL, request time section, asks
Ask parameter, requesting host IP, project name, unique identification.Wherein the address URL is required item, other search condition fields are choosing
Fill out item.
When being scanned for by log information of the search condition field to storage, selected according to the storage mode of step S3
Way of search, when such as using database purchase log, then this step is searched in the database by the way of the inquiry of SQL script
Rope.Such as with search engine Elasticsearch store, then by the query expression Query DSL of Elasticsearch come into
Row inquiry., because log information general data amount is bigger, it is slower to be stored in inquiry velocity inside database, is unfavorable for searching for.Cause
This preferred log information is stored in Elasticsearch search engine, can quickly search for daily record data.
For log information when search interface is shown in the form of a list, particular content is as shown in table 1 below:
Table 1
The present embodiment is stored in MDC tool by intercepting client request, acquisition request information and unique identification, is configured
Unified log output format increases the solicited message collected in output MDC tool, and the log information of output is carried out format and is torn open
Point, in deposit log storage, front end provides search interface and shows exploit person by search condition field searches log information
Member checks that entire log storage and search process can improve developer and handle efficiency wrong on line, mitigates developer's frequency
Numerous search log frequently connects the operation of built-in unit.
In one embodiment, step S1, as shown in Fig. 2, using following steps when intercepting client request:
Step S101 intercepts simultaneously acquisition request information: default by calling when server back end intercepts client request
Spring program filter method intercept client request, obtain client request in include the address URL, required parameter,
The solicited message of requesting host IP and the corresponding project name of client.
Spring program is the design level frame an of open source code, and solution is Business Logic and other each layers
Loose coupling problem.Spring program is the Java Development Framework an of lightweight, i.e., Spring program is a layering
JavaSE/EE full-stack (one-stop) lightweight open source frame.This step pre-sets spring in server back end
By way of the processing of the chain type of filter, all URL are asked by calling the filter method of spring program for program
It asks and intercept simultaneously acquisition request information.
Step S102 generates unique identification: UUID generator being called to generate unique identification.
In order to distinguish each client request, this step generates unique identification to each request by UUID generator with area
Not each client request.
Step S103 stores solicited message and unique identification: solicited message and unique identification are deposited using MDC.put method
Storage is into MDC tool.
MDC tool is preset in server back end, the unique identification of generation and the solicited message of acquisition are stored in MDC work
In tool, specific logging mode is as follows:
The address MDC.put (" REQUEST_URL ", " URL ");
MDC.put (" REQUEST_UUID ", " unique identification ");
MDC.put (" REQUEST_IP ", " requesting host IP ");
MDC.put (" REQUEST_PARAMS ", " required parameter ");
MDC.put (" APPKEY ", " project name ").
The present embodiment is asked by calling the filter method of spring program that all URL requests are intercepted and obtained
Information is sought, unique identification is generated to distinguish each client request, using the side MDC.put to each request by UUID generator
Method stores solicited message and unique identification, the mesh that all logs that client is requested every time are obtained and stored
's.
In one embodiment, when log frame output journal information, log frame obtains MDC tool according to configuration information
In solicited message and unique identification after, log frame output include request time, solicited message and unique identification log believe
Breath.
When the configuration file to log frame configures, increase following configuration information:
%d { yyyy-MM-dd HH:mm:ss.SSS }-[%thread] %-5level%logger { 36 }-%msg%n
- %X { REQUEST_UUID }-%X { REQUEST_URL }-%X { REQUEST_IP }-%X { REQUEST_
PARAMS }-%X { APPKEY }
REQUEST_UUID, REQUEST_URL, REQUEST_IP in the above-mentioned increased configuration information of the present embodiment,
REQUEST_PARAMS and APPKEY is the solicited message and unique identification being stored in MDC tool, is so far requested every time
The log information of all outputs can take above-mentioned several properties.
In one embodiment, the log information for intercepting the output of log frame, splits into request time for log information, asks
Asking information, unique identification and log content includes: by calling the aop method section of preset spring program to intercept log frame
The log information of frame output;By call the split method of preset spring program by log information split into request time,
Solicited message, unique identification and log content.
Aop method is an important content in spring program, it is by one point of penetration of existing application definition, so
Different execution contents is cut before and after it afterwards, original programmed logic will not be destroyed based on aop method, therefore it can be very good
The various pieces of service logic are isolated, so that the degree of coupling between service logic each section reduces, improve program
Reusability, while improving the efficiency of exploitation.In this step, defeated by calling aop method section to intercept log frame
Log information out.
It is substring that the function that split method can show, which is by a string segmentation, then using result as character string
Array returns.In the configuration file of log frame, it can be separated in log information in configuration rule by "-" interval
Each attribute.It therefore, can be directly by calling split method to tear log information open after being intercepted to log information
Point, split into request time, solicited message, unique identification and log content.
The present embodiment is realized the interception of log information and is torn open by calling aop method and split method in spring program
Point, fractionation content is provided for subsequent displaying log information.
In one embodiment, it when calling application programming interface API to be stored the log information after fractionation, adopts
With following steps: log recording table being arranged in the database, setting splits field in log recording table, and splitting field includes asking
Seeking time field, solicited message field, unique identification field and log content field.It calls API to execute SQL script, will split
Log information afterwards, which is sequentially inserted into, to be split in field, and the storage of log information is completed.
SQL is the abbreviation of structured query language (Structured Query Language), is a kind of data base querying
And programming language, it for accessing data and querying, updating, and managing relational database system, while being also database foot
The extension name of this document.SQL does not require the specified deposit method to data of user, does not need the specific data of user's understanding yet and deposits
Mode is put, so the disparate databases system with entirely different fabric, can be used identical structured query language
As data input with the interface that manages, structured query language sentence can be nested, this make it have great flexibility and
Powerful function.The present embodiment completes the storage of log information by executing SQL script.
When the present embodiment is applied to database purchase log, the log recording table of foundation is as shown in table 2 below:
Table 2
In one embodiment, it when calling application programming interface API to be stored the log information after fractionation, adopts
With following steps: API uses search engine Elasticsearch, Elasticsearch is called, by the log information after fractionation
It is stored in Elasticsearch.
ElasticSearch is the search server based on Lucene.Elasticsearch provides a distribution
The full-text search engine of formula multi-user capability is based on RESTful web interface.Elasticsearch be developed with Java, and
As the open source code publication under Apache license terms, it is Enterprise search engine currently popular, can reaches and search in real time
Rope is stablized, is reliable, quickly, and easy to install and use.
Since the data volume of log information is bigger, it is slower to be stored in inquiry velocity inside database, is unfavorable for subsequent
Search, present invention preferably uses search engine Elasticsearch to store log information, realizes quick storage and subsequent searches function
Energy.
In one embodiment it is proposed that a kind of blog search system, as shown in figure 3, including such as lower unit:
Client request unit is intercepted, for intercepting client request in server back end, is obtained in client request
Solicited message, it is corresponding only by calling the unique identifier UUID generator for being preset in server back end to generate client request
One mark, will be in solicited message and unique identification deposit log recording MDC tool;
Default log frame unit, for when server back end presets log frame, and log frame contains including request
Between, the configuration information including solicited message and unique identification, by MDC tool solicited message and unique identification be assigned to log
Solicited message and unique identification in frame;
Log information unit is stored, for intercepting the log information of log frame output, log information is split into request
Time, solicited message, unique identification and log content, call application programming interface API by the log information after fractionation into
Row storage;
Search unit, for search condition field to be arranged on server front end page preset search interface, search interface,
In search condition field containing at least one of the corresponding field information of solicited message, when receive include field information search
After request, search for the log information of storage, and by the corresponding log information of field information search interface in the form of a list into
Row is shown.
In one embodiment, as shown in figure 4, interception client request unit includes:
Blocking module, for obtaining by calling the filter method of preset spring program to intercept client request
It include the address URL, required parameter, the solicited message of requesting host IP and the corresponding project name of client in client request;
Unique identification module is generated, for calling UUID generator to generate unique identification;
Memory module, for being stored solicited message and unique identification using MDC.put method into MDC tool.
In one embodiment it is proposed that a kind of computer equipment, including memory and processor, it is stored in memory
Computer-readable instruction, when computer-readable instruction is executed by processor, so that processor executes following steps: after server
End intercepts client request, obtains the solicited message in client request, and unique knowledge of server back end is preset in by calling
Other code UUID generator generates the corresponding unique identification of client request, and solicited message and unique identification are stored in log recording
In MDC tool;Log frame is preset in server back end, log frame contains including request time, solicited message and unique mark
Configuration information including knowledge, by MDC tool solicited message and unique identification be assigned to solicited message in log frame and
Unique identification;The log information for intercepting the output of log frame, splits into request time, solicited message, Wei Yibiao for log information
Know and log content, calling application programming interface API store the log information after fractionation;In server front end page
Face preset search interface, is arranged search condition field on search interface, in search condition field containing at least one of solicited message
Corresponding field information, when receive include the searching request of field information after, search for the log information of storage, and by field
The corresponding log information of information is shown in the form of a list in search interface.
In one embodiment it is proposed that a kind of storage medium for being stored with computer-readable instruction, computer-readable finger
When order is executed by one or more processors, so that one or more processors execute following steps: being intercepted in server back end
Client request obtains the solicited message in client request, and the unique identifier of server back end is preset in by calling
UUID generator generates the corresponding unique identification of client request, and solicited message and unique identification are stored in log recording MDC work
In tool;Log frame is preset in server back end, log frame contains including request time, solicited message and unique identification
Configuration information, by MDC tool solicited message and unique identification be assigned to solicited message in log frame and unique mark
Know;The log information for intercepting the output of log frame, splits into request time, solicited message, unique identification and day for log information
Will content calls application programming interface API to store the log information after fractionation;It is default in the server front end page
Search interface, is arranged search condition field on search interface, in search condition field containing at least one of solicited message it is corresponding
Field information, when receive include the searching request of field information after, search for the log information of storage, and by field information pair
The log information answered is shown in the form of a list in search interface.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can
It is completed with instructing relevant hardware by program, which can be stored in a computer readable storage medium, storage
Medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random
Access Memory), disk or CD etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, for simplicity of description, not to above-mentioned reality
It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, all should be considered as described in this specification.
Some exemplary embodiments of the invention above described embodiment only expresses, the description thereof is more specific and detailed, but
It cannot be construed as a limitation to the scope of the present invention.It should be pointed out that for the ordinary skill people of this field
For member, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to of the invention
Protection scope.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.
Claims (10)
1. a kind of blog search method characterized by comprising
Client request is intercepted in server back end, the solicited message in the client request is obtained, is preset in by calling
The unique identifier UUID generator of the server back end generates the corresponding unique identification of the client request, asks by described in
Information and the unique identification is asked to be stored in log recording MDC tool;
Log frame is preset in the server back end, and the log frame contains including request time, solicited message and unique
Configuration information including mark, by the MDC tool the solicited message and unique identification be assigned to the log frame
In the solicited message and unique identification;
The log information for intercepting log frame output, by the log information split into request time, the solicited message,
The unique identification and log content call application programming interface API to store the log information after fractionation;
At server front end page preset search interface, search condition field, described search condition are set on described search interface
In field containing at least one of the corresponding field information of the solicited message, when receive include the field information search
After request, the log information of storage is searched for, and by the corresponding log information of the field information in described search circle
Face is shown in the form of a list.
2. blog search method according to claim 1, which is characterized in that described to be asked in server back end interception client
It asks, obtains the solicited message in the client request, the unique identifier of the server back end is preset in by calling
UUID generator generates the corresponding unique identification of the client request, and the solicited message and the unique identification are stored in
Include: in log recording MDC tool
By calling the filter method of preset spring program to intercept client request, obtains and wrapped in the client request
Include the address URL, required parameter, the solicited message of requesting host IP and the corresponding project name of the client;
The UUID generator is called to generate the unique identification;
The solicited message and the unique identification are stored using MDC.put method into MDC tool.
3. blog search method according to claim 1, which is characterized in that when the log frame output journal information,
It is described after the log frame obtains the solicited message and unique identification in the MDC tool according to the configuration information
The output of log frame includes the log information of request time, the solicited message and the unique identification.
4. blog search method according to claim 1, which is characterized in that the day for intercepting the log frame output
Will information, the log information, which is split into request time, the solicited message, the unique identification and log content, includes:
Aop method section by calling preset spring program intercepts the log information of the log frame output;
By calling the split method of the preset spring program that the log information is split into request time, request
Information, unique identification and log content.
5. blog search method according to claim 1, which is characterized in that the calling application programming interface API
The log information after fractionation, which is carried out storage, includes:
Log recording table is set in the database, and setting splits field in the log recording table, and the fractionation field includes
Request time field, solicited message field, unique identification field and log content field;
It calls the API to execute SQL script, the log information after fractionation is sequentially inserted into the fractionation field, complete
The storage of log information.
6. blog search method according to claim 1, which is characterized in that the calling application programming interface API
The log information after fractionation, which is carried out storage, includes:
The API uses search engine Elasticsearch, the Elasticsearch is called, by the log after fractionation
Information is stored in the Elasticsearch.
7. a kind of blog search system, which is characterized in that including such as lower unit:
Client request unit is intercepted, for intercepting client request in server back end, is obtained in the client request
Solicited message, by calling the unique identifier UUID generator for being preset in the server back end to generate the client request
Corresponding unique identification, will be in the solicited message and unique identification deposit log recording MDC tool;
Default log frame unit, for presetting log frame in the server back end, the log frame contains including asking
Configuration information including seeking time, solicited message and unique identification marks the solicited message in the MDC tool with unique
Know the solicited message and unique identification being assigned in the log frame;
Log information unit is stored, for intercepting the log information of the log frame output, the log information is split into
Request time, solicited message, unique identification and log content call application programming interface API by the day after fractionation
Will information is stored;
Search unit, for search condition field to be arranged on server front end page preset search interface, described search interface,
In described search condition field containing at least one of the corresponding field information of the solicited message, include the word when receiving
After the searching request of segment information, the log information of storage is searched for, and by the corresponding log information of the field information
It is shown in the form of a list at described search interface.
8. blog search system according to claim 7, which is characterized in that the interception client request unit includes:
Blocking module, for intercepting client request by calling the filter method of preset spring program, described in acquisition
It include the address URL, required parameter in client request, the request of requesting host IP and the corresponding project name of the client is believed
Breath;
Unique identification module is generated, for calling the UUID generator to generate the unique identification;
Memory module, for being stored the solicited message and the unique identification using MDC.put method into MDC tool.
9. a kind of computer equipment, including memory and processor, it is stored with computer-readable instruction in the memory, it is described
When computer-readable instruction is executed by the processor, so that the processor executes such as any one of claims 1 to 6 right
It is required that the step of blog search method.
10. a kind of storage medium for being stored with computer-readable instruction, the computer-readable instruction is handled by one or more
When device executes, so that one or more processors execute the blog search side as described in any one of claims 1 to 6 claim
The step of method.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810756846.6A CN109033280A (en) | 2018-07-11 | 2018-07-11 | Blog search method, system, computer equipment and storage medium |
PCT/CN2018/106687 WO2020010702A1 (en) | 2018-07-11 | 2018-09-20 | Log search method and system, computer device, and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810756846.6A CN109033280A (en) | 2018-07-11 | 2018-07-11 | Blog search method, system, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109033280A true CN109033280A (en) | 2018-12-18 |
Family
ID=64641751
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810756846.6A Withdrawn CN109033280A (en) | 2018-07-11 | 2018-07-11 | Blog search method, system, computer equipment and storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109033280A (en) |
WO (1) | WO2020010702A1 (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110134538A (en) * | 2019-05-10 | 2019-08-16 | 重庆天蓬网络有限公司 | Method, apparatus, medium and the electronic equipment of quick positioning question log |
CN110209644A (en) * | 2019-05-21 | 2019-09-06 | 上海易点时空网络有限公司 | The method, apparatus and system of log management |
CN110765089A (en) * | 2019-10-25 | 2020-02-07 | 北京浪潮数据技术有限公司 | Distributed equipment and log recording method, device and storage medium thereof |
CN111092883A (en) * | 2019-12-16 | 2020-05-01 | 重庆锐云科技有限公司 | Method and device for automatically generating user access record, network equipment and storage medium |
CN111309497A (en) * | 2020-02-10 | 2020-06-19 | 北京无限光场科技有限公司 | Information calling method and device, server, terminal and storage medium |
CN111459756A (en) * | 2020-03-30 | 2020-07-28 | 深圳市金蝶天燕云计算股份有限公司 | Log processing method and related equipment |
CN112148279A (en) * | 2020-09-27 | 2020-12-29 | 北京百度网讯科技有限公司 | Log information processing method and device, electronic equipment and storage medium |
CN112256530A (en) * | 2020-10-27 | 2021-01-22 | 广州助蜂网络科技有限公司 | Log service method capable of tracking link and system thereof |
CN112783842A (en) * | 2019-11-07 | 2021-05-11 | 北京沃东天骏信息技术有限公司 | Log collection method and device |
CN113434464A (en) * | 2021-06-24 | 2021-09-24 | 江苏创源电子有限公司 | Distributed log processing system and method |
CN116662218A (en) * | 2023-08-01 | 2023-08-29 | 北京德塔精要信息技术有限公司 | Method and device for collecting and processing logs in real time |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113438227B (en) * | 2021-06-23 | 2024-02-27 | 平安普惠企业管理有限公司 | Method, device, equipment and storage medium for limiting repeated request |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7305389B2 (en) * | 2004-04-15 | 2007-12-04 | Microsoft Corporation | Content propagation for enhanced document retrieval |
CN101808121A (en) * | 2010-02-24 | 2010-08-18 | 深圳市五巨科技有限公司 | Method and device for writing server log of mobile terminal into database |
CN107818024A (en) * | 2017-11-22 | 2018-03-20 | 北京汇通金财信息科技有限公司 | A kind of request ID transmission methods and system based on spring blockers |
CN107861859B (en) * | 2017-11-22 | 2021-04-02 | 北京汇通金财信息科技有限公司 | Log management method and system based on micro-service architecture |
-
2018
- 2018-07-11 CN CN201810756846.6A patent/CN109033280A/en not_active Withdrawn
- 2018-09-20 WO PCT/CN2018/106687 patent/WO2020010702A1/en active Application Filing
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110134538B (en) * | 2019-05-10 | 2020-08-04 | 重庆天蓬网络有限公司 | Method, device, medium and electronic equipment for quickly positioning problem log |
CN110134538A (en) * | 2019-05-10 | 2019-08-16 | 重庆天蓬网络有限公司 | Method, apparatus, medium and the electronic equipment of quick positioning question log |
CN110209644A (en) * | 2019-05-21 | 2019-09-06 | 上海易点时空网络有限公司 | The method, apparatus and system of log management |
CN110765089A (en) * | 2019-10-25 | 2020-02-07 | 北京浪潮数据技术有限公司 | Distributed equipment and log recording method, device and storage medium thereof |
CN112783842A (en) * | 2019-11-07 | 2021-05-11 | 北京沃东天骏信息技术有限公司 | Log collection method and device |
CN112783842B (en) * | 2019-11-07 | 2024-03-01 | 北京沃东天骏信息技术有限公司 | Log collection method and device |
CN111092883A (en) * | 2019-12-16 | 2020-05-01 | 重庆锐云科技有限公司 | Method and device for automatically generating user access record, network equipment and storage medium |
CN111092883B (en) * | 2019-12-16 | 2022-08-19 | 重庆锐云科技有限公司 | Method and device for automatically generating user access record, network equipment and storage medium |
CN111309497A (en) * | 2020-02-10 | 2020-06-19 | 北京无限光场科技有限公司 | Information calling method and device, server, terminal and storage medium |
CN111309497B (en) * | 2020-02-10 | 2023-09-26 | 北京有竹居网络技术有限公司 | Information calling method and device, server, terminal and storage medium |
CN111459756A (en) * | 2020-03-30 | 2020-07-28 | 深圳市金蝶天燕云计算股份有限公司 | Log processing method and related equipment |
CN112148279A (en) * | 2020-09-27 | 2020-12-29 | 北京百度网讯科技有限公司 | Log information processing method and device, electronic equipment and storage medium |
CN112148279B (en) * | 2020-09-27 | 2024-06-07 | 阿波罗智联(北京)科技有限公司 | Log information processing method, device, electronic equipment and storage medium |
CN112256530A (en) * | 2020-10-27 | 2021-01-22 | 广州助蜂网络科技有限公司 | Log service method capable of tracking link and system thereof |
CN113434464A (en) * | 2021-06-24 | 2021-09-24 | 江苏创源电子有限公司 | Distributed log processing system and method |
CN116662218A (en) * | 2023-08-01 | 2023-08-29 | 北京德塔精要信息技术有限公司 | Method and device for collecting and processing logs in real time |
Also Published As
Publication number | Publication date |
---|---|
WO2020010702A1 (en) | 2020-01-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109033280A (en) | Blog search method, system, computer equipment and storage medium | |
US20230031327A1 (en) | Recommending Query Parameters Based on Tenant Information | |
US11061548B1 (en) | Context-sensitive user interfaces in an information technology (IT) and security operations application | |
US8386476B2 (en) | Computer-implemented search using result matching | |
US11636128B1 (en) | Displaying query results from a previous query when accessing a panel | |
US6718365B1 (en) | Method, system, and program for ordering search results using an importance weighting | |
US8799280B2 (en) | Personalized navigation using a search engine | |
US7752207B2 (en) | Crawlable applications | |
US20170060856A1 (en) | Efficient search and analysis based on a range index | |
Baeza-Yates et al. | Next generation Web search | |
US10942774B1 (en) | Dynamic reassignment of search processes into workload pools in a search and indexing system | |
US11921720B1 (en) | Systems and methods for decoupling search processing language and machine learning analytics from storage of accessed data | |
US11922222B1 (en) | Generating a modified component for a data intake and query system using an isolated execution environment image | |
JP2005530224A (en) | Data store for knowledge-based data mining systems | |
US11516069B1 (en) | Aggregate notable events in an information technology and security operations application | |
US20080201318A1 (en) | Method and system for retrieving network documents | |
US11886844B1 (en) | Updating reusable custom functions across playbooks | |
US11727007B1 (en) | Systems and methods for a unified analytics platform | |
Fatima et al. | New framework for semantic search engine | |
Sharma et al. | A novel architecture for deep web crawler | |
Kumar et al. | Design of a mobile Web crawler for hidden Web | |
Tanasa | Web usage mining: Contributions to intersites logs preprocessing and sequential pattern extraction with low support | |
US11409790B2 (en) | Multi-image information retrieval system | |
Yu et al. | Hide-n-seek: An intent-aware privacy protection plugin for personalized web search | |
Li et al. | Fedsa: A data federation platform for law enforcement management |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20181218 |