CN108063685A - Log analysis method and device - Google Patents

Log analysis method and device Download PDF

Info

Publication number
CN108063685A
CN108063685A CN201711278704.5A CN201711278704A CN108063685A CN 108063685 A CN108063685 A CN 108063685A CN 201711278704 A CN201711278704 A CN 201711278704A CN 108063685 A CN108063685 A CN 108063685A
Authority
CN
China
Prior art keywords
daily record
server
request
sequence number
log
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.)
Granted
Application number
CN201711278704.5A
Other languages
Chinese (zh)
Other versions
CN108063685B (en
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.)
Maipu Communication Technology Co Ltd
Original Assignee
Maipu Communication Technology 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 Maipu Communication Technology Co Ltd filed Critical Maipu Communication Technology Co Ltd
Priority to CN201711278704.5A priority Critical patent/CN108063685B/en
Publication of CN108063685A publication Critical patent/CN108063685A/en
Application granted granted Critical
Publication of CN108063685B publication Critical patent/CN108063685B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/069Management of faults, events, alarms or notifications using logs of notifications; Post-processing of notifications

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The embodiment of the present invention provides a kind of log analysis method and device, applied to group system, the described method includes:Log analysis server of the destination server of teleservice request into the group system is handled in group system and sends multiple journal files, wherein, the journal file includes at least one daily record, and every daily record includes daily record ID and request sequence number;Log analysis server is ranked up daily record, is obtained ranked daily record based on the daily record ID in every daily record and request sequence number;Log analysis server analyzes the ranked daily record.The scheme provided through this embodiment, journal file is sent to log analysis server by destination server, daily record is ranked up according to the daily record ID of every daily record and request sequence number by Analysis server, daily record identical daily record ID is ranked up according to request sequence number, without manually carrying out lookup sequence, it saves manpower and time, improves the analysis efficiency of daily record.

Description

Log analysis method and device
Technical field
The present invention relates to field of communication technology more particularly to a kind of log analysis methods and device.
Background technology
In order to improve the access performance of system, in the prior art, most systems are all using clustered deploy(ment), i.e., identical clothes Business is deployed on many different servers, by the way that the request of user is distributed on different servers, is improved so as to reach The access capability of whole system.But since most of business are all that request interaction many times could be completed, at this moment these please Asking may be assigned on different servers, and generate daily record on a different server.Generation daily record can not be carried out Unified management, is not easy to carry out log analysis when system breaks down, and searches failure cause.
The content of the invention
The application describes a kind of log analysis method and device.
In a first aspect, the embodiment of the present invention provides a kind of log analysis method, applied to group system, the method bag It includes:Log analysis clothes of the destination server of teleservice request into the group system are handled in the group system Device of being engaged in sends multiple journal files, wherein, the journal file includes at least one daily record, every daily record including daily record ID and Ask sequence number;The log analysis server is ranked up daily record, is obtained based on the daily record ID in every daily record and request sequence number Obtain ranked daily record;The log analysis server analyzes the ranked daily record.It provides through this embodiment Scheme, journal file is sent to log analysis server by destination server, by Analysis server according to the day of every daily record Will ID and request sequence number are ranked up daily record, daily record identical daily record ID are ranked up according to request sequence number, without artificial Lookup sequence is carried out, is saved manpower and time, improves the analysis efficiency of daily record.
Optionally, the method further includes the step of generation daily record, which includes:The destination server is used in processing During the service request of family terminal, the log-sequence numbers generation server into the group system sends generation daily record ID and request sequence Number request;The log-sequence numbers generation server generates the corresponding daily record ID of the user's terminal according to user terminal information and please Seek sequence number.According to the order that the service request of same user terminal generates to log-sequence numbers generation server generation request sequence Number, on the basis of the daily record ID generated to the service request of same user terminal sorts out, it is numbered to each daily record, May insure that daily record is ranked up according to the sequencing of processing, effectively avoid multiple target server system Time Inconsistencies and The technical issues of caused Log Sequence is different from actual execution sequence.
Optionally, the log-sequence numbers generation server generates the corresponding daily record of the user's terminal according to user terminal information ID and request sequence number the step of, including:The log-sequence numbers generation server is according to user terminal information inquiry with the presence or absence of institute State the corresponding daily record ID of user terminal;There is no during daily record ID, according to the identification information of the user terminal and the business Processing time generation daily record ID is asked, and request sequence number is arranged to initial value, wherein, identification information includes the IP of user terminal Address or the MAC Address of user terminal;There are during daily record ID, request sequence number is incremented by according to preset rules.Daily record is carried out Number is convenient for the daily record generated to the service request of same user terminal to be ranked up, and avoids the service request of same user terminal When being handled by the inconsistent destination server of multiple system times, the technical issues of analysis of appearance is inaccurate.Meanwhile by looking into Daily record ID is looked for confirm whether log-sequence numbers generation server is that the service request of user terminal generated daily record, convenient for basis The daily record ID generation request continuous daily records of sequence number.
Optionally, the method further includes the step that journal file is sent to log analysis server by the destination server Suddenly, any one realization of the step in the following manner:
The destination server sends journal file according to prefixed time interval to the log analysis server;Or, institute Destination server is stated when journal file capacity reaches preset capacity threshold value, the journal file is sent to log analysis service Device.
Second aspect, the embodiment of the present invention also provide a kind of log analysis method, applied to the daily record in group system Analysis server, the described method includes:The log analysis server receives in the group system and handles teleservice Multiple journal files that the destination server of request is sent, wherein, the journal file includes at least one daily record, every day Will includes daily record ID and request sequence number;Daily record ID and request sequence number of the log analysis server based on every daily record, to day Will is ranked up, and obtains ranked daily record;The log analysis server analyzes the ranked daily record.By dividing Analysis server is ranked up daily record according to daily record ID and request sequence number, and daily record identical daily record ID is carried out according to request sequence number Sequence, it is convenient that daily record is analyzed without manually carrying out lookup sequence, improve the analysis efficiency of daily record.
The third aspect, the embodiment of the present invention also provide a kind of log analysis method, applied to the daily record in group system Serial number gencration server, the described method includes:The log-sequence numbers generation server receives the target clothes in the group system Device be engaged in when handling the service request of user terminal, the generation of the transmission service request corresponds to daily record ID and asks asking for sequence number It asks;The log-sequence numbers generation server generates daily record ID and request sequence number according to user terminal information;The log-sequence numbers life The daily record ID of generation and request sequence number are sent to the destination server into server, is recorded and worked as by the destination server In preceding daily record, convenient for the log analysis server in the group system is carried out to the daily record that the destination server generates day Will is analyzed.The log-sequence numbers generation server generates daily record ID and request sequence number according to user terminal information, convenient for daily record point It analyses server and carries out follow-up log analysis processing, improve the efficiency of log analysis, while taken according to log-sequence numbers generation is sent to The request of business device, which is sequentially generated corresponding request sequence number, can solve day caused by each target server system Time Inconsistency Will is according to time-sequencing mistake, the technical issues of influencing log analysis accuracy.
Fourth aspect, the embodiment of the present invention also provides a kind of log analysis device, applied to the daily record in group system Analysis server, described device include:First receiving module, for receiving, processing teleservice please in the group system Multiple journal files that the destination server asked is sent, wherein, the journal file includes at least one daily record, every daily record Including daily record ID and request sequence number;Sorting module for daily record ID and request sequence number based on every daily record, arranges daily record Sequence obtains ranked daily record;Analysis module, for analyzing the ranked daily record.By Analysis server according to Daily record ID and request sequence number are ranked up daily record, daily record identical daily record ID are ranked up according to request sequence number, without people Work carries out lookup sequence, convenient that daily record is analyzed, and improves the analysis efficiency of daily record.
5th aspect, the embodiment of the present invention also provides a kind of log analysis device, applied to the daily record in group system Serial number gencration server, described device include:Second receiving module exists for receiving the destination server in the group system When handling the service request of user terminal, the generation of the transmission service request corresponds to daily record ID and asks the request of sequence number;Generation Module, for generating daily record ID and request sequence number according to user terminal information;Sending module for the daily record ID that will be generated and is asked Sequence number is asked to be sent to the destination server, is recorded by the destination server in current daily record, convenient for the cluster system Log analysis server in system carries out log analysis to the daily record that the destination server generates.It is sent by the user terminal Log analysis is carried out to the log analysis server in the group system.The log-sequence numbers generation server is whole according to user Client information generates daily record ID and request sequence number, carries out follow-up log analysis processing convenient for log analysis server, improves daily record point The efficiency of analysis, at the same according to be sent to log-sequence numbers generation server request be sequentially generated it is corresponding request sequence number can solve Daily record caused by each target server system Time Inconsistency influences the skill of log analysis accuracy according to time-sequencing mistake Art problem.
Log analysis method and device provided in an embodiment of the present invention by the daily record ID in every daily record of reception and are asked Sequence number is sought, a plurality of daily record is ranked up, obtains ranked daily record.Convenient for analyzing daily record, daily record point is promoted The efficiency of analysis provides safeguard for the quick system failure that solves.
Other features and advantages of the present invention will be illustrated in subsequent specification, also, partly be become from specification It is clear that by implementing understanding of the embodiment of the present invention.The purpose of the present invention and other advantages can be by saying what is write Specifically noted structure is realized and obtained in bright book, claims and attached drawing.
Description of the drawings
It in order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair The restriction of scope, for those of ordinary skill in the art, without creative efforts, can also be according to this A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the structure diagram of group system provided in an embodiment of the present invention.
Fig. 2 is one of flow chart of log analysis method provided in an embodiment of the present invention.
The also included partial process view of log analysis method before Fig. 3 is Fig. 2 steps S240.
Fig. 4 is the sub-step flow diagram of step S230 in Fig. 3.
Fig. 5 is the two of the flow chart of log analysis method provided in an embodiment of the present invention.
Fig. 6 is the three of the flow chart of log analysis method provided in an embodiment of the present invention.
Fig. 7 is one of structure diagram of log analysis device provided in an embodiment of the present invention.
Fig. 8 is the two of the structure diagram of log analysis device provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete Ground describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.Usually exist The component of the embodiment of the present invention described and illustrated in attached drawing can configure to arrange and design with a variety of herein.Cause This, the detailed description of the embodiment of the present invention to providing in the accompanying drawings is not intended to limit claimed invention below Scope, but it is merely representative of the selected embodiment of the present invention.
Based on the embodiment of the present invention, what those skilled in the art were obtained on the premise of creative work is not made Every other embodiment, belongs to the scope of protection of the invention.It should be noted that:Similar label and letter are in following attached drawing Represent similar terms, therefore, once it is defined in a certain Xiang Yi attached drawing, then it need not be to it into traveling in subsequent attached drawing One step is defined and explained.Meanwhile in the description of the present invention, term " first ", " second " etc. are only used for distinguishing description, and cannot It is interpreted as indicating or implying relative importance.
Inventor has found:Traditional log recording can be relevant information dispersion on a different server It to carry out that log analysis is cumbersome during failure of uniting, to collect the log information of Servers-all, and each server log is only It can go to correspond to by the time.It is analyzed by time sequencing, when multiple service request flows are mixed in together, processing business please The system time for the multiple servers asked may be inconsistent, so can then there is the problem of inaccurate to log analysis.Meanwhile Distinguished for different service requests using different keywords, may there are the identical business of different user terminals please The problem of exporting similary keyword is asked, can not daily record be subjected to precise classification.
The defects of present in above scheme is inventor being drawn after putting into practice and carefully studying as a result, therefore, The solution that the discovery procedure of the above problem and the hereinafter embodiment of the present invention are proposed regarding to the issue above all should be The contribution that inventor makes the present invention in process of the present invention.
In order to overcome above-mentioned defect in the prior art, inventor provides solution by studying offer example below Scheme.
Fig. 1 is refer to, Fig. 1 is the structure diagram of group system 10 provided in an embodiment of the present invention.The group system 10 Including:User terminal 100, equalizing equipment 200, destination server 300, log-sequence numbers generation server 400 and log analysis clothes Business device 500.
Wherein, user terminal 100, equalizing equipment 200, destination server 300, log-sequence numbers generation server 400 and day Will Analysis server 500 communicates to connect between each other, and in the present embodiment, the equalizing equipment 200 can be one individual Equipment can also be performed load balancing operation, the log-sequence numbers generation server 400 and daily record by a destination server 300 Analysis server 500 is that can respectively dispose on a different server in actual setting, can also be performed by same server.
Referring to Fig. 2, a kind of log analysis method provided in an embodiment of the present invention, the method is applied to group system 10, it the described method comprises the following steps.
Step S240, destination server 300 send multiple journal files to log analysis server 500.
The journal file includes at least one daily record, and every daily record includes daily record ID and request sequence number, wherein daily record ID is generated with request sequence number by log-sequence numbers generation server 400.The user terminal 100 of daily record ID alignment processing service requests, Request sequence number is used to represent that the daily record corresponds to the service request order of the user's terminal 100.Daily record ID and request sequence number foot Different daily records to be distinguished.
Step S250, daily record ID and request sequence number of the log analysis server 500 based on every daily record, to daily record into Row sequence, obtains ranked daily record.
Each daily record in the journal file that log analysis server 500 can send over destination server 300 is according to each The daily record ID of a daily record carries out collating sort, and is ranked up according to request sequence number.
Step S260, the log analysis server 500 analyze the ranked daily record.
In the present embodiment, by the sequence of step S250, to the operation and analyzing and positioning of each user terminal 100 with regard to one Mesh is clear, and in system jam, can fast and accurately find corresponding daily record, save the manpower needed for accident analysis And the time.
Through the above scheme, journal file is sent to log analysis server 500 by destination server 300, by daily record point It analyses daily record ID and request sequence number of the server 500 in each daily record to be ranked up daily record, by the identical daily records of daily record ID It is ranked up according to request sequence number, it is convenient that daily record is analyzed without manually carrying out lookup sequence, improve the analysis effect of daily record Rate.
Fig. 3 is refer to, in the present embodiment, the method further includes the step of generation includes daily record ID and request sequence number S210- steps S230.
Step S210, equalizing equipment 200 divide the service request needed for finishing service according to the business of user terminal 100 At least one destination server 300 of dispensing is handled.
In the present embodiment, the business of user terminal 100 is sent to equalizing equipment 200 and is handled, equalizing equipment 200 Number and current all 300 current load situations of destination server according to service request needed for finishing service, which is corresponded to Service request distribute at least one destination server 300 and handled.
For needing the business that multiple service request could be completed, service request below may need to rely on front The handling result of service request, therefore for multiple service requests of the business, equalizing equipment 200 can in sequence ask business It asks to be sent on destination server 300 and be handled.
Step S220, the destination server 300 is when handling the service request of user terminal 100, to the cluster system Log-sequence numbers generation server 400 in system 10 sends generation daily record ID and asks the request of sequence number.
After the service request for receiving the distribution of equalizing equipment 200 in destination server 300,300 meeting of destination server The request for generating the service request and corresponding to daily record ID and request sequence number is sent to log-sequence numbers generation server 400.
Step S230, the log-sequence numbers generation server 400 generate the user's terminal according to 100 information of user terminal 100 corresponding daily record ID and request sequence number.
In the present embodiment, Fig. 4 is refer to, the step S230 can include following sub-step:
Sub-step S231, the log-sequence numbers generation server 400 whether there is institute according to 100 information inquiry of user terminal State 100 corresponding daily record ID of user terminal.
Optionally, log-sequence numbers generation server 400 can according to 100 information inquiry of user terminal day Whether will serial number gencration server 400 is that the user terminal 100 generated daily record ID.
Generated daily record ID if the user terminal 100, judge there are the 100 corresponding daily record ID of user terminal and Sequence number is asked, if not generating daily record ID for the user terminal 100, judges that there is no the user terminal 100 is corresponding Daily record ID and request sequence number.
Sub-step S232 there is no during daily record ID, is asked according to the identification information of the user terminal 100 and the business Ask processing time generate daily record ID, and will request sequence number be arranged to initial value (such as be arranged to 1 or 0 or other Meaning numerical value);There are during daily record ID, will request sequence number be incremented by according to preset rules (such as every time plus 1, can also every time plus 2, The embodiment of the present invention is not restricted), and log-sequence numbers generation server 400 is recorded in newly-generated daily record ID and request sequence number Caching.
Wherein, identification information includes the IP address of user terminal 100 or the MAC Address of user terminal 100.According to the use The mode of the identification information of family terminal 100 and service request processing time generation daily record ID can be calculated using md5 encryption Daily record ID is calculated in method or other algorithms.
There are during daily record ID, request sequence number is incremented by according to preset rules, and after being incremented by according to preset rules please Sequence number is asked to be recorded in the caching of log-sequence numbers generation server 400 for the request sequence number before substituting.
After generation includes daily record ID and request sequence number, log-sequence numbers generation server 400 also by daily record ID with Request sequence number is sent in the destination server 300 for handling the service request, and daily record ID and request sequence number are saved in target In the current daily record of server 300.Daily record in each destination server 300 can be saved in journal file, convenient for target Management of the server 300 to daily record.
In the present embodiment, the mode that journal file is sent to log analysis server 500 by step S210 can be institute It states destination server 300 and sends journal file or the target to the log analysis server 500 according to prefixed time interval Server 300 is sent to log analysis server when journal file capacity reaches preset capacity threshold value, by the journal file 500。
In the present embodiment, the log-sequence numbers generate server 400 after preset time when small (such as 24) will described in All daily record ID and request sequence number are configured to fail in log-sequence numbers generation server 400.And regenerate day during request next time Will ID.Timing out daily record ID and request sequence number can prevent that request sequence number is excessive, be unfavorable for being ranked up.
The log analysis method of the present embodiment is illustrated with specific example below, it should be appreciated that below Example is merely to illustrate that the realization process of the present embodiment log analysis method, should not be construed the restriction to this programme, Other modes can also be used to realize in the other embodiment of the present embodiment, specific example is as follows:
Assuming that the IP address of user terminal A is:192.168.1.1 the MAC Address of user terminal A is:16-C6-42-BB- 8E-26.Wherein user terminal A, which completes a business, needs 3 service requests, is loaded respectively in order by equalizing equipment 200 To destination server B, destination server A and destination server C.
When the first time request of user terminal A reaches destination server B, destination server B is generated from log-sequence numbers and taken Business device 400, which takes, obtains daily record ID and request sequence number.Log-sequence numbers generate end message (IP of the server 400 according to user terminal A (192.168.1.1)/MAC (16-C6-42-BB-8E-26)) inquiry local cache, if at this moment without corresponding daily record ID.Then make With MD5 or other algorithms according to end message (terminal IP (192.168.1.1)/terminal MAC (16-C6-42-BB-8E-26)) and Time (2017-10-10) generation daily record ID is KIUO09KLOP837L and generates request sequence number, and it is 1 to set initial value.Daily record sequence Number generation 400 record log ID (KIUO09KLOP837L) of server and request sequence number 1 and return to this information to target to caching Server B.
Destination server B obtain daily record ID (KIUO09KLOP837L) and request sequence number 1, this information record to currently In daily record.When second of request of user terminal A reaches destination server A.Destination server A generates server to log-sequence numbers Daily record ID and request sequence number are obtained at 400.Log-sequence numbers generate server 400 according to end message (IP (192.168.1.1)/ MAC (16-C6-42-BB-8E-26)) inquiry local cache, at this moment there is daily record ID for KIUO09KLOP837L and asked Serial number 1.Log-sequence numbers generate server 400 and request sequence number are incremented by 1 according to preset rules, that is, ask serial number 2.Daily record sequence Daily record ID (KIUO09KLOP837L) and the update of request sequence number 2 to caching, and are returned to daily record ID by number generation server 400 (KIUO09KLOP837L) and request sequence number 2 gives destination server A.Destination server A obtains record log ID (KIUO09KLOP837L) and request sequence number 2.In this information record to current daily record.
When the third time request of user terminal A reaches destination server C.Destination server C is generated to log-sequence numbers and serviced Device 400 obtains daily record ID and request sequence number.Log-sequence numbers generate server 400 according to end message (IP (192.168.1.1)/ MAC (16-C6-42-BB-8E-26)) inquiry local cache, at this moment there is daily record ID for KIUO09KLOP837L and asked Serial number 2.Log-sequence numbers generate server 400 and request sequence number are incremented by 1 according to preset rules, that is, ask serial number 3.Daily record sequence Number generation server 400 daily record ID (KIUO09KLOP837L) and request sequence number 3 be recorded caching cover before information, and Daily record ID (KIUO09KLOP837L) and request sequence number 3 are returned to destination server C.Destination server C obtains record log ID (KIUO09KLOP837L) and request sequence number 3.In this information record to current daily record.
Assume that the IP address of terminal of user terminal B is simultaneously:192.168.1.5;The MAC Address of terminal is:16-C6-42- DD-8E-27。
User terminal B, which completes a business, 2 requests, loads to target clothes respectively in order by equalizing equipment 200 Be engaged in device C, destination server A.
When the first time request of user terminal B reaches destination server C, destination server C to log-sequence numbers, which is generated, to be taken Business device 400, which takes, obtains daily record ID and request sequence number.Log-sequence numbers generate server 400 according to end message (IP (192.168.1.5)/MAC (16-C6-42-DD-8E-27)) inquiry local cache, at this moment without corresponding daily record ID.Then use MD5 or other algorithms according to end message (terminal IP (192.168.1.5)/terminal MAC (16-C6-42-DD-8E-27)) and when Between (2017-10-10) generation daily record ID for LPOO09KLOP807A and generate request serial number 1.Log-sequence numbers generate server 400 record log ID (LPOO09KLOP807A) and request sequence number 1 return to this information and give destination server C to caching.Target Server C obtains record log ID (LPOO09KLOP807A) and request sequence number 1.In this information record to current daily record.
When second of request of user terminal B reaches destination server A.Destination server A is generated to log-sequence numbers and serviced Device 400, which takes, obtains daily record ID and request sequence number.Log-sequence numbers generate server 400 according to end message (IP (192.168.1.5)/MAC (16-C6-42-DD-8E-27)) inquiry local cache, at this moment there is the daily record ID to be LPOO09KLOP807A and ask serial number 1.Log-sequence numbers generation server 400 is incremented by request sequence number according to preset rules 1, that is, ask serial number 2.Log-sequence numbers generate server 400 and daily record ID (LPOO09KLOP807A) and request sequence number 2 are recorded Information before being covered to caching, and daily record ID (LPOO09KLOP807A) and request sequence number 2 are returned to destination server A.Mesh Server A is marked, obtains record log ID (KIUO09KLOP837L) and request sequence number 2.This information record to current daily record In.
Destination server A, destination server B, destination server C when journal file reaches a certain size (configurable), Journal file is uploaded to log analysis server 500.Log analysis server 500 is arranged according to daily record ID and request sequence number Sequence, then can the daily record of each user shown by operation order.Daily record ID is pressed in the daily record of user terminal A (KIUO09KLOP837L) extract and sort by 1,2,3 order of request sequence number.Daily record ID is pressed in the daily record of user terminal B (LPOO09KLOP807A) extract and sort by 1,2 order of request sequence number.
Meanwhile log-sequence numbers generation server 400 could be provided as failing afterwards when 24 is small (time can configure) All daily record ID and request sequence number.It is regenerated when request next time.
The embodiment of the present invention also provides a kind of log analysis method, unlike above example, this log analysis side Method is to describe the step of log analysis server 500 is specifically performing during log analysis from 500 side of log analysis server. It is understood that the step of involved in the log analysis method next to be described, has been noted above in the examples above, The exhaustive of specific each step can refer to above embodiment description, and only 500 side of log analysis server is performed below Step is briefly described.Refer to Fig. 5,500 side of log analysis server perform log analysis method can include with Lower step.
Step S310, the log analysis server 500 receive processing teleservice in the group system 10 and ask Multiple journal files that the destination server 300 asked is sent, wherein, the journal file includes at least one daily record, every Daily record includes daily record ID and request sequence number.
Step S320, daily record ID and request sequence number of the log analysis server 500 based on every daily record, to daily record into Row sequence, obtains ranked daily record.
Step S330, the log analysis server 500 analyze the ranked daily record.
The embodiment of the present invention also provides a kind of log analysis method, unlike above example, this log analysis side Method is to describe log-sequence numbers generation server 400 from 400 side of log-sequence numbers generation server specifically to hold during log analysis Capable step.It is understood that the step of involved in the log analysis method next to be described, is in the examples above Through describing, the exhaustive of specific each step can refer to above embodiment description, only log-sequence numbers is generated take below 400 side of business device performs step and is briefly described.Fig. 6 is refer to, in the daily record point that 400 side of log-sequence numbers generation server performs Analysis method may comprise steps of.
Step S410, the log-sequence numbers generation server 400 receive the destination server 300 in the group system 10 When handling the service request of user terminal 100, the generation of the transmission service request corresponds to daily record ID and asks the request of sequence number;
Step S420, the log-sequence numbers generation server 400 generate daily record ID and request sequence according to user terminal information Number.
In the present embodiment, step S420 can be accomplished by the following way:
The log-sequence numbers generation server 400 is according to user terminal information inquiry with the presence or absence of the user terminal 100 Corresponding daily record ID;
There is no during daily record ID, according to the identification information of the user terminal 100 and the service request processing time Daily record ID is generated, and request sequence number is arranged to initial value, wherein, identification information includes the IP address or use of user terminal 100 The MAC Address of family terminal;
There are during daily record ID, request sequence number is incremented by according to preset rules.
The daily record ID of generation and request sequence number are sent to described by step S430, the log-sequence numbers generation server 400 Destination server 300 is recorded by the destination server 300 in current daily record, convenient for the day in the group system 10 Will Analysis server 500 carries out log analysis to the daily record that the destination server 300 generates.
The embodiment of the present invention also provides a kind of log analysis device 510, and the log analysis device 510 is applied to daily record point Server 500 is analysed, for the corresponding method realized shown in Fig. 5.Fig. 7 is refer to, the log analysis device includes first and receives Module 511, sorting module 512 and analysis module 513.
First receiving module 511, for receiving the destination service that teleservice request is handled in the group system Multiple journal files that device 300 is sent, wherein, the journal file includes at least one daily record, and every daily record includes daily record ID and request sequence number;
Sorting module 512 for daily record ID and request sequence number based on every daily record, is ranked up daily record, is passed through The daily record of sequence;
Analysis module 513, for analyzing the ranked daily record.
The embodiment of the present invention also provides a kind of log analysis device 410, and the log analysis device 410 is applied to daily record sequence Number generation server 400, for the corresponding method realized shown in Fig. 6.Fig. 8 is refer to, the log analysis device includes second Receiving module 411, generation module 412 and sending module 413.
Second receiving module 411, for receiving the destination server 300 in the group system in processing user terminal During service request, the generation of the transmission service request corresponds to daily record ID and asks the request of sequence number.
Generation module 412, for generating daily record ID and request sequence number according to user terminal information.
In the present embodiment, the generation module 412 generates daily record ID according to user terminal information and asks the side of sequence number Formula, including:
According to user terminal information inquiry with the presence or absence of the 100 corresponding daily record ID of user terminal;
There is no during daily record ID, according to the identification information of the user terminal 100 and the service request processing time Daily record ID is generated, and request sequence number is arranged to initial value, wherein, identification information includes the IP address or use of user terminal 100 The MAC Address of family terminal 100;
There are during daily record ID, request sequence number is incremented by according to preset rules.
Sending module 413, for the daily record ID of generation and request sequence number to be sent to the destination server 300, by institute It states destination server 300 to be recorded in current daily record, convenient for the log analysis server 500 in the group system to described The daily record that destination server 300 generates carries out log analysis.
The embodiment of the present invention provides a kind of log analysis method and device, applied to group system, the described method includes: Log analysis service of the destination server of teleservice request into the group system is handled in the group system Device sends multiple journal files, wherein, the journal file includes at least one daily record, and every daily record includes daily record ID and please Seek sequence number;The log analysis server is ranked up daily record, is obtained based on the daily record ID in every daily record and request sequence number Ranked daily record;The log analysis server analyzes the ranked daily record.It provides through this embodiment Journal file is sent to log analysis server by scheme, destination server, by Analysis server according to the daily record of every daily record ID and request sequence number daily record is ranked up, by daily record identical daily record ID according to request sequence number be ranked up, without manually into Row searches sequence, convenient that daily record is analyzed, and improves the analysis efficiency of daily record.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in change or replacement, should all contain Lid is within protection scope of the present invention.Therefore, protection scope of the present invention described should be subject to the protection scope in claims.

Claims (12)

1. a kind of log analysis method, which is characterized in that applied to group system, the described method includes:
Log analysis of the destination server of teleservice request into the group system is handled in the group system Server sends multiple journal files, wherein, the journal file includes at least one daily record, and every daily record includes daily record ID And request sequence number;
The log analysis server is ranked up daily record, is passed through based on the daily record ID in every daily record and request sequence number The daily record of sequence;
The log analysis server analyzes the ranked daily record.
2. the method as described in claim 1, which is characterized in that the method further includes the step of generation daily record, the step bag It includes:
The destination server is when handling the service request of user terminal, the log-sequence numbers generation clothes into the group system The request for device transmission generation daily record ID and the request sequence number of being engaged in;
The log-sequence numbers generation server generates the corresponding daily record ID of the user's terminal and request sequence according to user terminal information Number.
3. method as claimed in claim 2, which is characterized in that the log-sequence numbers generate server according to user terminal information The step of generating the corresponding daily record ID of the user's terminal and request sequence number, including:
The log-sequence numbers generation server is according to user terminal information inquiry with the presence or absence of the corresponding daily record of the user terminal ID;
There is no during daily record ID, daily record is generated according to the identification information of the user terminal and the service request processing time ID, and request sequence number is arranged to initial value, wherein, identification information includes the IP address of user terminal or the MAC of user terminal Address;
There are during daily record ID, request sequence number is incremented by according to preset rules.
4. method as claimed in claim 2 or claim 3, which is characterized in that the method further includes:
The daily record ID of generation and request sequence number are sent to destination server by log-sequence numbers generation server, and by the day Will ID and request sequence number are recorded in current daily record.
5. method as claimed in claim 4, which is characterized in that the method further includes the destination server by journal file The step of being sent to log analysis server, any one realization of the step in the following manner:
The destination server sends journal file according to prefixed time interval to the log analysis server;Or
The destination server is sent to daily record point when journal file capacity reaches preset capacity threshold value, by the journal file Analyse server.
6. method as claimed in claim 5, which is characterized in that the method further includes:
The log-sequence numbers generate server after preset time by the log-sequence numbers generate in server all daily record ID and Request sequence number is configured to fail.
7. a kind of log analysis method, which is characterized in that applied to the log analysis server in group system, the method bag It includes:
The log analysis server receives the destination server transmission that teleservice request is handled in the group system Multiple journal files, wherein, the journal file includes at least one daily record, and every daily record includes daily record ID and request sequence Number;
Daily record ID and request sequence number of the log analysis server based on every daily record, are ranked up daily record, obtain through row The daily record of sequence;
The log analysis server analyzes the ranked daily record.
8. a kind of log analysis method, which is characterized in that generate server, the side applied to the log-sequence numbers in group system Method includes:
The log-sequence numbers generation server receives business of the destination server in the group system in processing user terminal During request, send generation daily record ID and ask the request of sequence number;
The log-sequence numbers generation server generates daily record ID and request sequence number according to user terminal information;
The daily record ID of generation and request sequence number are sent to the destination server by the log-sequence numbers generation server, by described Destination server is recorded in current daily record, convenient for the log analysis server in the group system to the destination service The daily record of device generation carries out log analysis.
9. method as claimed in claim 8, which is characterized in that the log-sequence numbers generate server according to user terminal information The step of generating daily record ID and request sequence number, including:
The log-sequence numbers generation server is according to user terminal information inquiry with the presence or absence of the corresponding daily record of the user terminal ID;
There is no during daily record ID, daily record is generated according to the identification information of the user terminal and the service request processing time ID, and request sequence number is arranged to initial value, wherein, identification information includes the IP address of user terminal or the MAC of user terminal Address;
There are during daily record ID, request sequence number is incremented by according to preset rules.
10. a kind of log analysis device, which is characterized in that applied to the log analysis server in group system, described device Including:
First receiving module, what the destination server for receiving processing teleservice request in the group system was sent Multiple journal files, wherein, the journal file includes at least one daily record, and every daily record includes daily record ID and request sequence Number;
Sorting module for daily record ID and request sequence number based on every daily record, is ranked up daily record, obtains ranked day Will;
Analysis module, for analyzing the ranked daily record.
11. a kind of log analysis device, which is characterized in that server is generated applied to the log-sequence numbers in group system, it is described Device includes:
Second receiving module, for receiving service request of the destination server in the group system in processing user terminal When, the request for generating daily record ID and asking sequence number of transmission;
Generation module, for generating daily record ID and request sequence number according to user terminal information;
Sending module, for the daily record ID of generation and request sequence number to be sent to the destination server, by the destination service Device is recorded in current daily record, and the destination server is generated convenient for the log analysis server in the group system Daily record carries out log analysis.
12. device as claimed in claim 11, which is characterized in that the generation module generates daily record according to user terminal information ID and the mode for asking sequence number, including:
According to user terminal information inquiry with the presence or absence of the corresponding daily record ID of the user terminal;
There is no during daily record ID, daily record is generated according to the identification information of the user terminal and the service request processing time ID, and request sequence number is arranged to initial value, wherein, identification information includes the IP address of user terminal or the MAC of user terminal Address;
There are during daily record ID, request sequence number is incremented by according to preset rules.
CN201711278704.5A 2017-12-06 2017-12-06 Log analysis method and device Active CN108063685B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711278704.5A CN108063685B (en) 2017-12-06 2017-12-06 Log analysis method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711278704.5A CN108063685B (en) 2017-12-06 2017-12-06 Log analysis method and device

Publications (2)

Publication Number Publication Date
CN108063685A true CN108063685A (en) 2018-05-22
CN108063685B CN108063685B (en) 2021-06-18

Family

ID=62135316

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711278704.5A Active CN108063685B (en) 2017-12-06 2017-12-06 Log analysis method and device

Country Status (1)

Country Link
CN (1) CN108063685B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110048899A (en) * 2019-05-29 2019-07-23 北京奇艺世纪科技有限公司 A kind of log detection method, device, terminal and server
CN110569274A (en) * 2019-08-02 2019-12-13 福建星网智慧软件有限公司 Distributed real-time log analysis method and computer-readable storage medium
CN110647448A (en) * 2019-08-09 2020-01-03 北京建筑大学 Mobile application operation log data real-time analysis method, server and system
CN113938919A (en) * 2021-09-03 2022-01-14 中国联合网络通信集团有限公司 Data analysis method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1637714A (en) * 2003-11-26 2005-07-13 株式会社日立制作所 Remote copy network
JP2009064125A (en) * 2007-09-05 2009-03-26 Fuji Electric Systems Co Ltd Server device and program thereof
US20140236791A1 (en) * 2013-02-15 2014-08-21 Bank Of America Corporation Image retrieval and transaction id capture
CN105824744A (en) * 2016-03-21 2016-08-03 焦点科技股份有限公司 Real-time log collection and analysis method on basis of B2B (Business to Business) platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1637714A (en) * 2003-11-26 2005-07-13 株式会社日立制作所 Remote copy network
JP2009064125A (en) * 2007-09-05 2009-03-26 Fuji Electric Systems Co Ltd Server device and program thereof
US20140236791A1 (en) * 2013-02-15 2014-08-21 Bank Of America Corporation Image retrieval and transaction id capture
CN105824744A (en) * 2016-03-21 2016-08-03 焦点科技股份有限公司 Real-time log collection and analysis method on basis of B2B (Business to Business) platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
佚名: ""通过RequestID进行问题快速定位"", 《HTTPS://WEIBO.COM/P/1001603728585759319483》 *
王家哲: ""海量网络流量日志分析***的设计与实现"", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110048899A (en) * 2019-05-29 2019-07-23 北京奇艺世纪科技有限公司 A kind of log detection method, device, terminal and server
CN110048899B (en) * 2019-05-29 2022-03-04 北京奇艺世纪科技有限公司 Log detection method and device, terminal and server
CN110569274A (en) * 2019-08-02 2019-12-13 福建星网智慧软件有限公司 Distributed real-time log analysis method and computer-readable storage medium
CN110647448A (en) * 2019-08-09 2020-01-03 北京建筑大学 Mobile application operation log data real-time analysis method, server and system
CN113938919A (en) * 2021-09-03 2022-01-14 中国联合网络通信集团有限公司 Data analysis method and device
CN113938919B (en) * 2021-09-03 2023-07-07 中国联合网络通信集团有限公司 Data analysis method and device

Also Published As

Publication number Publication date
CN108063685B (en) 2021-06-18

Similar Documents

Publication Publication Date Title
CN105808694B (en) Online customer service answering system and method
CN108063685A (en) Log analysis method and device
CN108052675A (en) Blog management method, system and computer readable storage medium
CN107800565A (en) Method for inspecting, device, system, computer equipment and storage medium
CN103678446B (en) Improved mode map based on Data View and database table
CN107769992B (en) Message parsing and shunting method and device
CN107203464B (en) Method and device for positioning service problem
CN110362455A (en) A kind of data processing method and data processing equipment
CN108337699A (en) A kind of method, apparatus of online, mobile terminal and storage medium
CN108733698A (en) A kind of processing method and background service system of log information
CN108989101B (en) Log output system and method and electronic equipment
CN107172193A (en) A kind of load-balancing method and its device based on cluster
CN110430070A (en) A kind of service state analysis method, device, server, data analysis equipment and medium
CN106445709A (en) Method and system for invoking servers in distributed manner
CN107168788A (en) The dispatching method and device of resource in distributed system
TWI789346B (en) Message sending method and terminal equipment
CN103220555B (en) The sorting technique of a kind of digital cable customers, Apparatus and system
CN116719750A (en) Software testing method and device, server equipment and storage medium
CN101877866B (en) Method and device for detecting mobile terminal model capability
CN111209284B (en) Meta-data-based sub-table method and device
CN108833724B (en) CDR synthesis method and device
CN111782688A (en) Request processing method, device and equipment based on big data analysis and storage medium
CN110457270A (en) A kind of method, apparatus and terminal of file load
CN106372071A (en) Method and device for acquiring information of data warehouse
CN107241707B (en) PCC policy conflict relation judging method, device and system

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
GR01 Patent grant
GR01 Patent grant