Summary of the invention
The embodiment of the present invention provides a kind of link trace method and device, can quickly position the wrong root of link exceptionSource, to improve the efficiency of link abnormality processing.
On the one hand the embodiment of the present invention provides a kind of link trace method, this method comprises:
Global link information and service identification are obtained, every in the service identification and the global link information is generatedMapping table between link information;
Link inquiry request is obtained, Target Link information is obtained according to the link inquiry request, and in link trace exhibitionShow that the page shows the Target Link information;
The log switching command for being directed to the Target Link information is obtained, according to the log switching command from the mappingRelation table obtains the corresponding target service mark of the Target Link information, obtains the target service and identifies corresponding target dayWill file, and shown Target Link information switching is shown as the target journaling file.
It is wherein, described that Target Link information is obtained according to the link inquiry request, comprising:
Obtain inquiry business type parameter, the query time range parameter in the link inquiry request;
It obtains from global link information and matches with the inquiry business type parameter, the query time range parameterLink information to be detected, and obtain the target label of the link information to be detected;
The link information to be detected that target label is abnormal marking is determined as Target Link information.
It is wherein, described to obtain the log switching command for being directed to the Target Link information, comprising:
Where getting log switching key when the touching signals of screen position, according to touching signals generationThe corresponding click commands of log switching key;
According to the click commands, the log switching command for being directed to the Target Link information is generated.
It is wherein, described to obtain the log switching command for being directed to the Target Link information, comprising:
Interface is jumped for Target Link information setting;
Where getting the Target Link information when touching signals of screen position, triggered according to the touching signalsThe interface that jumps generates the log switching command.
Wherein, described to obtain the target service and identify corresponding target journaling file, and by the shown targetLink information switching is shown as the target journaling file, comprising:
At least one log server belonging to the target service mark is obtained from the log system, as at leastOne target journaling server;
The target service is obtained from the target journaling server identifies corresponding multiple journal files;
The multiple journal file that will acquire is packaged into target journaling file, and by the shown Target LinkInformation switching is shown as the target journaling file.
On the other hand the embodiment of the present invention provides a kind of link trace device, which includes:
Link information obtains module and generates the service identification and institute for obtaining global link information and service identificationState the mapping table between each of the links information in global link information;
Link information display module obtains object chain according to the link inquiry request for obtaining link inquiry requestRoad information, and the Target Link information is shown in link trace displayed page;
Journal file obtains module, for obtaining the log switching command for being directed to the Target Link information, according to describedLog switching command obtains the corresponding target service mark of the Target Link information from the mapping table, obtains the meshThe corresponding target journaling file of service identification is marked, and shown Target Link information switching is shown as the target dayWill file.
Wherein, the link information display module, comprising:
First acquisition unit, for obtaining inquiry business type parameter, query time model in the link inquiry requestEnclose parameter;
Second acquisition unit, for being obtained and the inquiry business type parameter, the inquiry from global link informationThe link information to be detected that time range parameter matches, and obtain the target label of the link information to be detected;
Determination unit, for the link information to be detected that target label is abnormal marking to be determined as Target Link information.
Wherein, the journal file obtains module, comprising:
First instruction generation unit, for where getting log switching key when the touching signals of screen position, rootThe corresponding click commands of the log switching key are generated according to the touching signals;
Second instruction generation unit, for generating the log for being directed to the Target Link information according to the click commandsSwitching command.
Wherein, the journal file obtains module, comprising:
Setting unit, for jumping interface for Target Link information setting;
Third instruction generation unit, the touching signals for the screen position where getting the Target Link informationWhen, interface, which is jumped, according to touching signals triggering generates the log switching command.
Wherein, the journal file obtains module, comprising:
Third acquiring unit, for obtaining at least one day belonging to the target service mark from the log systemWill server, as at least one target journaling server;
4th acquiring unit, it is corresponding multiple for obtaining the target service mark from the target journaling serverJournal file;
Encapsulation unit, the multiple journal file for will acquire are packaged into target journaling file, and will be shownThe Target Link information switching be shown as the target journaling file.
On the other hand the embodiment of the present invention provides a kind of link trace device, comprising: processor and memory;
The processor is connected with memory, wherein for storing program code, the processor is used for the memorySaid program code is called, to execute such as the method in the embodiment of the present invention in one side.
On the other hand the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage mediumMatter is stored with computer program, and the computer program includes program instruction, and described program is instructed when being executed by a processor, heldRow such as the method in the embodiment of the present invention in one side.
The embodiment of the present invention by obtaining service identification while obtaining global link information, and generate service identification withThe mapping table between each of the links information in global link information can be from above-mentioned when receiving link inquiry requestThe Target Link information to match with link inquiry request is obtained in global link information, and is shown on link trace displayed pageShow above-mentioned Target Link information, the log switching command of above-mentioned Target Link information can be directed to by obtaining, is closed from above-mentioned mappingIt is the corresponding target service mark of above-mentioned Target Link information to be obtained in table, and then above-mentioned target service is obtained from log systemCorresponding target journaling file is identified, and switches the above-mentioned Target Link information of display on above-mentioned link trace displayed pageAt the above-mentioned target journaling file of display.During entire link trace, showing in link trace can not only be shown on the pageThe Target Link information inquired can also be directly linked to the corresponding journal file of above-mentioned Target Link information, can be quickThe wrong root for positioning link exception, to improve the efficiency of link abnormality processing.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, completeSite preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based onEmbodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every otherEmbodiment shall fall within the protection scope of the present invention.
Micro services framework, which can refer to, splits into many services with certain well function whole business, by veryCooperation between the small service of polydispersion, can solve more complicated problem.In micro services framework, most functional moduleAll it is independent deployment operation, is stateless service each other by bus interaction, it is preceding in the environment in above-mentioned frameworkThe Business Stream on backstage can processing and transmitting Jing Guo multiple micro services, in the treatment process of Business Stream, user can only learn thisThe final process result of Business Stream, and can not learn the processing result of the processing sequence of Business Stream and each micro services of process,If mistake and abnormal occurs in Business Stream, needs to log on to each server and check journal file to search and orientation problem, consumptionThe time taken is too many, causes to search and the efficiency of orientation problem is too low.Link trace can recorde patrolling in primary specific requestTrack is collected, that is, can recorde whole job informations that system is completed in the specific request, above-mentioned logic track can wrapInclude each service and timestamp Jing Guo each service that above-mentioned specific request is passed through, the duration of each service processing cost, withAnd the executive condition of each service.The executive condition of above-mentioned each service can refer to whether run succeeded, if it is retried,Execute whether failure causes influence to entire request.According to the above-mentioned information traced into, it can inquire and be flowed out with positioning serviceThe abnormal cause of existing mistake.
In order to improve the efficiency of inquiry and orientation problem, process of the method provided in an embodiment of the present invention in link traceIn, business relevant data (service identification) can be collected while contribution link information, and generate service identification and the overall situationThe mapping table between each of the links information in link information.It, can be according to link when receiving link inquiry requestParameter information (for example, inquiry business type parameter, query time range parameter) in inquiry request, in above-mentioned link informationTarget Link information is got, and shows the above-mentioned Target Link information got, Ke Yi on link trace displayed pageIt is that above-mentioned Target Link information setting jumps interface on above-mentioned link trace displayed page, interface acquisition can be jumped based on above-mentionedFor the log switching command of above-mentioned Target Link information, and then above-mentioned Target Link letter can be obtained from above-mentioned mapping tableCorresponding target service mark is ceased, and then above-mentioned target service can be obtained from log system and identify corresponding target journaling textPart, and the above-mentioned Target Link information of display is switched into the above-mentioned target journaling text of display on above-mentioned link trace displayed pagePart, that is, it can be directly linked to the corresponding target journaling file of Target Link information in above-mentioned link trace displayed page,It can be with quick search and orientation problem.Method and device provided in an embodiment of the present invention is said below in conjunction with Fig. 1 to Fig. 4It is bright.
Referring to Figure 1, Fig. 1 is a kind of flow diagram of link trace method provided in an embodiment of the present invention.Such as Fig. 1 instituteShow, method provided in an embodiment of the present invention is specifically described below in conjunction with step S101- step S103.
S101 obtains global link information and service identification, generates in the service identification and the global link informationEach of the links information between mapping table.
In some possible embodiments, the full link that link trace system can track each request calls, and receivesCollect global link information and service identification, that is, collects the link information that the corresponding full link of each request callsWith service identification, and generate the mapping table between above-mentioned service identification and each of the links information, so as to it is subsequent can be from above-mentionedThe corresponding service identification of link information is inquired in mapping table.Wherein, at the beginning of above-mentioned link information may include callingBetween, call type, the Service name of request calls time-consuming, call result, exception information etc., and above-mentioned service identification can use numberIt indicates, other character representations can also be used.Link trace system may include data collection, data storage, data query, dataShow four parts.
In some possible embodiments, it by taking Zipkin (link trace system) as an example, can be carried out using ZipkinLink trace, Zipkin are a distributed tracking systems, and polymerizable each operation system calls delayed data, reach link callingMonitoring tracking.Zipkin can go to collect data in micro services framework regularly sequentially in time, and can manageIt states the data being collected into and inquires useful data.Zipkin is related to following 4 components: collector (data acquisition),Storage (data storage), search (data query) and UI (data displaying), wherein collector can be used for receiving respectivelyThe link monitoring data of application transport, storage can be used for storing the link monitoring data that above-mentioned collector is received, canIt supports In-Memory (being stored in memory, to compress column storage), MySQL (Relational DBMS),Cassandra (non-relational database of mixed type), ElasticSearch (search server a, it is possible to provide distribution is multi-purposeThe full-text search engine of family ability) data storage method in 4, search can be used for inquiring the data stored in storage, mainlyIt is supplied to UI use, UI expression can provide simple web interface, for showing query result.It, can be with when an operation is trackedThe link trace data being collected into are converted to the general tracking data of Zipkin by transport (transmitter), and are sentTo Zipkin, Zipkin can verify the link trace data received, be stored in tracking data after being proved to be successfulIn the storage of Zipkin.Wherein, configured with http, (Hyper Text Transfer Protocol, hypertext pass ZipkinDefeated agreement), the kafka distributed post of high-throughput (subscribe to message system), scribe (result collection system) three typesTransport, that is, by above-mentioned http, kafka, scribe three types request send tracking data be onlyZipkin general tracking data.
In some possible embodiments, Zipkin is during link trace, the link that collector is received withTrack data may include link information and service identification, by carrying out secondary development to Zipkin, by the link information received withService identification is stored, and in storing process, produces the mapping between a service identification and each of the links informationRelation table, in order to distinguish the corresponding link information of different business.Wherein, service identification can be used for unique identification business information,Namely same business uses same service identification.
S102, obtain link inquiry request, according to the link inquiry request obtain Target Link information, and link withTrack displayed page shows the Target Link information.
In some possible embodiments, link trace system can provide inquiry function for the above-mentioned link information gotCan, when a user requests to occur abnormal or mistake, link trace system can get Client-initiated link inquiry request, rootIt can be retrieved from above-mentioned global link information according to above-mentioned link inquiry request and obtain the corresponding full link letter of above-mentioned user's requestBreath, and can determine that can be in link for the Target Link information of above-mentioned acquisition in the presence of the abnormal Target Link information of callingIt is shown on the displayed page of tracking system, so that user can be according to above-mentioned Target Link Information locating problem.
In some possible embodiments, by taking Zipkin as an example, a simple application programming interfaces can be provided(Application Program Interface, API) for inquiring and retrieving link information, query result be may be displayed onOn the link trace displayed page UI of Zipkin.After Zipkin receives link inquiry request, above-mentioned API pairs can be passed throughThe tracking data stored in storage is inquired, and Target Link information is obtained.It is appreciated that store in storageIt is corresponding need to only to retrieve above-mentioned link inquiry request in query process for the link information of all call chains during Zipkin trackingLink information, and determine to exist and call abnormal Target Link information, and show the mesh of above-mentioned determination on the interface UIMark link information.For example, the Target Link information inquired is as follows in a link query process: A system calls B systemSystem, B system recalls C system, and C system recalls d system, then the link information on the interface UI can be shown as A → B → C →D。
Optionally, the respond request number of transactions per second of certain section of time inner joint can also be shown on the interface UI of Zipkin(transaction per second, TPS), average time-consuming, maximum time-consuming, the information such as minimum time-consuming can intuitively be knownThe utilization rate of each interface and the performance of system, can be convenient the performance information of O&M monitoring server.
S103 obtains the log switching command for being directed to the Target Link information, is reflected according to log switching command from describedIt penetrates relation table and obtains the corresponding target service mark of the Target Link information, obtain the target service and identify corresponding targetJournal file, and shown Target Link information switching is shown as the target journaling file.
It in some possible embodiments, can be above-mentioned Target Link on the displayed page of link trace systemInformation adds corresponding on-link mode (OLM), so that user can carry out changing interface with clickthrough, link trace system is availableBased on the log switching command for above-mentioned Target Link information that above-mentioned on-link mode (OLM) generates, it is based on above-mentioned log switching commandThe corresponding target service mark of above-mentioned Target Link information can be got from above-mentioned mapping table, can be looked into from log systemTarget journaling file corresponding with above-mentioned target service mark is ask, and is shown on the page in link trace by the Target Link of displayInformation switches to the above-mentioned target journaling file of display.Link trace system can identify target service as keyword in logIt is retrieved in system, whole journal file (the i.e. target journalings to match will be identified with above-mentioned target service in log systemFile) it is shown on above-mentioned link trace displayed page.
In some possible embodiments, by taking Zipkin as an example, by carrying out secondary development to Zipkin, at the interface UIOn can for above-mentioned Target Link information add on-link mode (OLM), can be obtained by above-mentioned on-link mode (OLM) for above-mentioned Target Link informationLog switching command, and then log system can be entered according to above-mentioned log switching command, and can be from above-mentioned mapping tableThe corresponding target service mark of above-mentioned Target Link information is inquired, and then can be obtained from log system and above-mentioned target serviceRelevant whole journal files are identified, and are shown on the interface UI.
The embodiment of the present invention by obtaining service identification while obtaining global link information, and generate service identification withThe mapping table between each of the links information in global link information can be from above-mentioned when receiving link inquiry requestThe Target Link information to match with link inquiry request is obtained in global link information, and is shown on link trace displayed pageShow above-mentioned Target Link information, the log switching command of above-mentioned Target Link information can be directed to by obtaining, is closed from above-mentioned mappingIt is the corresponding target service mark of above-mentioned Target Link information to be obtained in table, and then above-mentioned target service is obtained from log systemCorresponding target journaling file is identified, and switches the above-mentioned Target Link information of display on above-mentioned link trace displayed pageAt the above-mentioned target journaling file of display.During entire link trace, showing in link trace can not only be shown on the pageThe Target Link information inquired can also be directly linked to the corresponding journal file of above-mentioned Target Link information, can be quickThe wrong root for positioning link exception, to improve the efficiency of link abnormality processing.
Fig. 2 is referred to, Fig. 2 is the flow diagram of another link trace method provided in an embodiment of the present invention.Such as Fig. 2It is shown, method provided in an embodiment of the present invention is specifically described below in conjunction with step S201- step S209.
S201 obtains global link information and service identification, generates in the service identification and the global link informationEach of the links information between mapping table.
Wherein, the specific implementation of above-mentioned steps S201 may refer in embodiment corresponding to above-mentioned Fig. 1 to stepThe description of S101, is not discussed here.
S202 obtains link inquiry request, and obtains the inquiry business type parameter in the link inquiry request, inquiryTime range parameter.
In some possible embodiments, when mistake and exception occurs in a certain request of user, in order to inquire and determinePosition problem, can be determined by checking the complete calling link information of the request, therefore can send one to link trace systemLink inquiry request.Link trace system can mention after getting above-mentioned link inquiry request from above-mentioned link inquiry requestTake out inquiry business type parameter, query time range parameter.Wherein, above-mentioned inquiry business type parameter can be used to indicateThe corresponding type of service of user's request is stated, above-mentioned query time range parameter can be used to indicate the time of above-mentioned user's requestThe information such as the handling duration of timestamp, each service when range due to link information may include by each service,The object time range of inquiry link information can be determined by above-mentioned query time range parameter.
S203 is obtained and the inquiry business type parameter, the query time range parameter from global link informationThe link information to be detected to match, and obtain the target label of the link information to be detected.
In some possible embodiments, can according to above-mentioned inquiry business type parameter, above-mentioned time range parameter from(i.e. above-mentioned user requests complete the link information to be detected that acquisition matches with above-mentioned user request in above-mentioned global link informationWhole calling link information), for above-mentioned link information to be detected, link trace system can carry out different marks according to link informationNote, for example, being marked using different colors, black can be used to indicate to call normal link information, and red can be usedTo indicate to call abnormal link information.
The link information to be detected that target label is abnormal marking is determined as Target Link information by S204, and in linkTracking displayed page shows the Target Link information.
In some possible embodiments, the part chain for being will be marked in above-mentioned link information to be detectedRoad information is determined as Target Link information, and above-mentioned Target Link information is shown on link trace interface.For example, link traceIn system, using red as abnormal link information is called, if link information to be detected are as follows: A system calls B system, B systemC system is recalled, C system recalls d system, and d system recalls E system and F system, wherein calling link C → D → F chainThe label of road information is that link C → D → F is then determined as Target Link information.
S205 is raw according to the touching signals where getting log switching key when the touching signals of screen positionAt the corresponding click commands of the log switching key.
In some possible embodiments, above-mentioned link trace displayed page is showing the same of above-mentioned Target Link informationWhen, corresponding log switching key can be provided for above-mentioned Target Link information, user can be by clicking above-mentioned log switching keyA touching signals are issued, when link trace system gets above-mentioned touching signals, institute can be generated according to above-mentioned touching signalsState the corresponding click commands of log switching key.Above-mentioned log switching key is represented by a kind of on-link mode (OLM), realize link withDisplay content on track displayed page jumps.
S206 generates the log switching command for being directed to the Target Link information, according to log according to the click commandsSwitching command obtains the corresponding target service mark of the Target Link information from the mapping table.
In some possible embodiments, it is corresponding that above-mentioned Target Link information can be generated according to above-mentioned click commandsThe Target Link information of display is jumped to the instruction of journal file by log switching command on link trace displayed page,In the log switching command, it may include the related content of Target Link information, and then can be obtained from above-mentioned mapping tableThe target service of above-mentioned Target Link information identifies.
Optionally, interface can be jumped for the setting of Target Link information on above-mentioned link trace displayed page, when gettingWhere above-mentioned Target Link information when the touching signals of screen position, generated according to the above-mentioned interface that jumps of above-mentioned touching signals triggeringAbove-mentioned log switching command.It, can be using Target Link information as a kind of on-link mode (OLM), i.e., when showing above-mentioned Target Link informationUser can by click one touching signals of Target Link delivering, the available touching signals of link trace system, intoAnd log switching command is generated, so as to obtain the target service mark of above-mentioned Target Link information from above-mentioned mapping tableKnow.
S207 obtains at least one log server belonging to the target service mark from the log system, makeesFor at least one target journaling server.
In some possible embodiments, be based on above-mentioned log switching command, can enter log system, obtain with it is above-mentionedTarget service identifies corresponding journal file.Under micro services framework, each call chain can pass through multiple services, thereforeEach service can generate journal file on corresponding server, it is understood that multiple services can be passed through for each business, onStating the corresponding journal file of business will disperse on multiple independent servers.Above-mentioned mesh can will be dispersed with from log systemMark service identification corresponds to multiple servers of journal file as target journaling server.
Wherein, above-mentioned target journaling server can be identified by above-mentioned target service to determine, entering log systemAfterwards, target service mark can be used to inquire as keyword all journal files, if it exists the business in journal fileMark is identical as above-mentioned target service mark, then the server where above-mentioned journal file is determined as target journaling server.For example, if target service is identified as numerical value 1, using the service identification recorded in keyword " service identification 1 " and journal fileIt is matched, if being similarly numerical value 1, then it represents that successful match will include the clothes where the log of " service identification 1 " keywordBusiness device is determined as target journaling server.
S208 obtains the target service from the target journaling server and identifies corresponding multiple journal files.
In some possible embodiments, on available above-mentioned all target journaling servers with above-mentioned target serviceIdentify multiple journal files for matching, that is, determine above-mentioned target service identify corresponding whole journal files position andContent.
S209, the multiple journal file that will acquire are packaged into target journaling file, and by the shown meshMark link information switching is shown as the target journaling file.
In some possible embodiments, the above-mentioned multiple journal files got can be summarized, it will be allLog is ranked up by the time sequencing of Business Stream, and storage in one file, is packaged into a target journaling file, and will be upperState the log letter that Target Link information switching shown on link trace displayed page is shown as in above-mentioned target journaling fileBreath.
Optionally, after obtaining the corresponding call chain log (i.e. target journaling file) of service identification, log can be dividedAnalysis, quick search and orientation problem are apparent that each calling section accounts for the entire time accounting for calling section, thus may be usedThere is abnormal link to determine.For example, in the journal file showed on above-mentioned link trace displayed page, a certain calling sectionIt is excessive to account for the entire time accounting for calling section, then can determine that the corresponding link of calling section is problematic link or overtime link, fromAnd it rapidly and accurately solves the problems, such as.
The embodiment of the present invention during link trace by collecting business relevant number while contribution link informationAccording to (service identification), and generate the mapping table between each of the links information in service identification and global link information.WhenWhen receiving link inquiry request, can according in link inquiry request parameter information (for example, inquiry business type parameter,Query time range parameter), Target Link information is got in above-mentioned link information, and show on link trace displayed pageShow the above-mentioned Target Link information got, can be above-mentioned Target Link information addition on above-mentioned link trace displayed pageLink can obtain the log switching command for being directed to above-mentioned Target Link information based on above-mentioned link, and then can be from above-mentioned mappingThe corresponding target service mark of above-mentioned Target Link information is obtained in relation table, and then above-mentioned target can be obtained from log systemThe corresponding target journaling file of service identification, and by the above-mentioned Target Link information of display on above-mentioned link trace displayed pageSwitch to the above-mentioned target journaling file of display.During entire link trace, showing in link trace not only can be on the pageIt shows the Target Link information that inquires, the corresponding journal file of above-mentioned Target Link information can also be directly linked to, it can be withThe quickly wrong root of positioning link exception, to improve the efficiency of link abnormality processing.
Fig. 3 is referred to, Fig. 3 is a kind of structural schematic diagram of link trace device provided in an embodiment of the present invention.Such as Fig. 3 instituteShow, which may include: that link information obtains module 10, link information display module 20, and journal file obtainsModule 30;
Link information obtains module 10, for obtaining global link information and service identification, generate the service identification withThe mapping table between each of the links information in the global link information;
Link information display module 20 obtains target according to the link inquiry request for obtaining link inquiry requestLink information, and the Target Link information is shown in link trace displayed page;
Journal file obtains module 30, for obtaining the log switching command for being directed to the Target Link information, according to instituteIt states log switching command to identify from the corresponding target service of the mapping table acquisition Target Link information, described in acquisitionTarget service identifies corresponding target journaling file, and shown Target Link information switching is shown as the targetJournal file.
Wherein, above-mentioned link information obtains module 10, link information display module 20, and journal file obtains the tool of module 30Body function implementation may refer to the step S101- step S103 in embodiment corresponding to above-mentioned Fig. 1, no longer go to live in the household of one's in-laws on getting married hereIt states.
Please also refer to Fig. 3, above-mentioned link information display module 20 may include: first acquisition unit 201, and second obtainsUnit 202, determination unit 203;
First acquisition unit 201, for obtaining inquiry business type parameter, query time in the link inquiry requestRange parameter;
Second acquisition unit 202, for obtained from global link information with the inquiry business type parameter, described look intoThe link information to be detected that time range parameter matches is ask, and obtains the target label of the link information to be detected;
Determination unit 203, for the link information to be detected that target label is abnormal marking to be determined as Target Link letterBreath.
Wherein, above-mentioned first acquisition unit 201, second acquisition unit 202, the concrete function realization side of determination unit 203Formula may refer to the step S202- step S204 in embodiment corresponding to above-mentioned Fig. 2, be not discussed here.
Please also refer to Fig. 3, it may include: the first instruction generation unit 301 that above-mentioned journal file, which obtains module 30, and secondInstruction generation unit 302, setting unit 303, third instruction generation unit 304, third acquiring unit 305, the 4th acquiring unit306, encapsulation unit 307;
First instruction generation unit 301, for where getting log switching key when the touching signals of screen position,The corresponding click commands of the log switching key are generated according to the touching signals;
Second instruction generation unit 302, for generating the day for being directed to the Target Link information according to the click commandsWill switching command;
Setting unit 303, for jumping interface for Target Link information setting;
Third instruction generation unit 304, the touch-control letter for the screen position where getting the Target Link informationNumber when, jump interface according to touching signals triggering and generate the log switching command;
Third acquiring unit 305, for being obtained from the log system at least one belonging to the target service markA log server, as at least one target journaling server;
4th acquiring unit 306, it is corresponding for obtaining the target service mark from the target journaling serverMultiple journal files;
Encapsulation unit 307, the multiple journal file for will acquire is packaged into target journaling file, and will showThe Target Link information switching shown is shown as the target journaling file.
Wherein, above-mentioned first instruction generation unit 301, the second instruction generation unit 302, setting unit 303, third instructionGeneration unit 304, third acquiring unit 305, the 4th acquiring unit 306, the concrete function implementation of encapsulation unit 307 can be withReferring to the step S205- step S209 in embodiment corresponding to above-mentioned Fig. 2, it is not discussed here.Wherein, when the first instructionGeneration unit 301, the second instruction generation unit 302 is when executing corresponding operating, setting unit 303, third instruction generation unit304 pauses execute operation.When setting unit 303, third instruction generation unit 304 is when executing corresponding operating, the first instructionGeneration unit 301, the second instruction generation unit 302, which is suspended, executes operation.
The embodiment of the present invention during link trace by collecting business relevant number while contribution link informationAccording to (service identification), and generate the mapping table between each of the links information in service identification and global link information.WhenWhen receiving link inquiry request, can according in link inquiry request parameter information (for example, inquiry business type parameter,Query time range parameter), Target Link information is got in above-mentioned link information, and show on link trace displayed pageShow the above-mentioned Target Link information got, can be above-mentioned Target Link information addition on above-mentioned link trace displayed pageLink can obtain the log switching command for being directed to above-mentioned Target Link information based on above-mentioned link, and then can be from above-mentioned mappingThe corresponding target service mark of above-mentioned Target Link information is obtained in relation table, and then above-mentioned target can be obtained from log systemThe corresponding target journaling file of service identification, and by the above-mentioned Target Link information of display on above-mentioned link trace displayed pageSwitch to the above-mentioned target journaling file of display.During entire link trace, showing in link trace not only can be on the pageIt shows the Target Link information that inquires, the corresponding journal file of above-mentioned Target Link information can also be directly linked to, it can be withThe quickly wrong root of positioning link exception, to improve the efficiency of link abnormality processing.
Fig. 4 is referred to, Fig. 4 is the structural schematic diagram of another link trace device provided in an embodiment of the present invention.Such as Fig. 4Shown, the link trace device 500 in the embodiment of the present invention may include: one or more processors 501 and memory 502.Above-mentioned processor 501 and memory 502 are connected by bus 503.Memory 502 is for storing computer program, the computerProgram includes program instruction, and processor 501 is used to execute the program instruction of the storage of memory 502, can be used for:
Global link information and service identification are obtained, every in the service identification and the global link information is generatedMapping table between link information;
Link inquiry request is obtained, Target Link information is obtained according to the link inquiry request, and in link trace exhibitionShow that the page shows the Target Link information;
The log switching command for being directed to the Target Link information is obtained, according to the log switching command from the mappingRelation table obtains the corresponding target service mark of the Target Link information, obtains the target service and identifies corresponding target dayWill file, and shown Target Link information switching is shown as the target journaling file.
In some possible embodiments, above-mentioned processor 501 above-mentioned is obtained according to the link inquiry request executingWhen taking Target Link information, it is specifically used for:
Obtain inquiry business type parameter, the query time range parameter in the link inquiry request;
It obtains from global link information and matches with the inquiry business type parameter, the query time range parameterLink information to be detected, and obtain the target label of the link information to be detected;
The link information to be detected that target label is abnormal marking is determined as Target Link information.
In some possible embodiments, above-mentioned processor 501 is executing above-mentioned acquisition for Target Link letterWhen the log switching command of breath, it is specifically used for:
Where getting log switching key when the touching signals of screen position, according to touching signals generationThe corresponding click commands of log switching key;
According to the click commands, the log switching command for being directed to the Target Link information is generated.
Optionally, in some possible embodiments, above-mentioned processor 501 is executing above-mentioned acquisition for the targetWhen the log switching command of link information, it is specifically used for:
Interface is jumped for Target Link information setting;
Where getting the Target Link information when touching signals of screen position, triggered according to the touching signalsThe interface that jumps generates the log switching command.
In some possible embodiments, above-mentioned processor 501 is executing the above-mentioned acquisition target service mark pairThe target journaling file answered, and when shown Target Link information switching is shown as the target journaling file, toolBody is used for:
At least one log server belonging to the target service mark is obtained from the log system, as at leastOne target journaling server;
The target service is obtained from the target journaling server identifies corresponding multiple journal files;
The multiple journal file that will acquire is packaged into target journaling file, and by the shown Target LinkInformation switching is shown as the target journaling file.
In some possible embodiments, above-mentioned processor 501 can be central processing unit (centralProcessing unit, CPU), which can also be other general processors, digital signal processor (digitalSignal processor, DSP), specific integrated circuit (application specific integrated circuit,ASIC), ready-made programmable gate array (field-programmable gate array, FPGA) or other programmable logicDevice, discrete gate or transistor logic, discrete hardware components etc..General processor can be microprocessor or this atReason device is also possible to any conventional processor etc..
The memory 502 may include read-only memory and random access memory, and to processor 501 provide instruction andData.The a part of of memory 502 can also include nonvolatile RAM.For example, memory 502 can also be depositedStore up the information of device type.
It should be appreciated that link trace in embodiment corresponding to the executable Fig. 1-Fig. 2 above of above-mentioned link trace device 500The description of method also can be performed the description in embodiment corresponding to Fig. 3 to link trace device, no longer be repeated herein.
The embodiment of the present invention by obtaining service identification while obtaining global link information, and generate service identification withThe mapping table between each of the links information in global link information can be from above-mentioned when receiving link inquiry requestThe Target Link information to match with link inquiry request is obtained in global link information, and is shown on link trace displayed pageShow above-mentioned Target Link information, the log switching command of above-mentioned Target Link information can be directed to by obtaining, is closed from above-mentioned mappingIt is the corresponding target service mark of above-mentioned Target Link information to be obtained in table, and then above-mentioned target service is obtained from log systemCorresponding target journaling file is identified, and switches the above-mentioned Target Link information of display on above-mentioned link trace displayed pageAt the above-mentioned target journaling file of display.During entire link trace, showing in link trace can not only be shown on the pageThe Target Link information inquired can also be directly linked to the corresponding journal file of above-mentioned Target Link information, can be quickThe wrong root for positioning link exception, to improve the efficiency of link abnormality processing.
In addition, it need to be noted that: the embodiment of the invention also provides a kind of computer readable storage mediums, and onComputer program performed by the link trace device 1 for being stored with and being mentioned above in computer readable storage medium is stated, and above-mentionedComputer program includes program instruction, when processor executes above procedure instruction, is able to carry out embodiment corresponding to Fig. 2 aboveIn description to above-mentioned link trace method therefore will no longer repeat here.In addition, to using the beneficial of same procedureEffect description, is also no longer repeated.For undisclosed in computer readable storage medium embodiment according to the present inventionTechnical detail please refers to the description of embodiment of the present invention method.
" embodiment " is referred in the present invention it is meant that a particular feature, structure, or characteristic described can be in conjunction with the embodimentsIt is included at least one embodiment of the present invention.Each position in the description shows that the phrase might not each mean phaseSame embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art are explicitlyImplicitly understand, embodiment described herein can be combined with other embodiments.In description of the invention and instituteTerm "and/or" used in attached claims refer to one or more of associated item listed any combination andAll possible combinations, and including these combinations.Those of ordinary skill in the art may be aware that in conjunction with disclosed hereinEach exemplary unit and algorithm steps of embodiment description can be come with the combination of electronic hardware, computer software or the twoIt realizes, in order to clearly illustrate the interchangeability of hardware and software, is generally described according to function in the above descriptionEach exemplary composition and step.These functions are implemented in hardware or software actually, the spy depending on technical solutionFixed application and design constraint.Professional technician can retouch each specific application using distinct methods to realizeThe function of stating, but such implementation should not be considered as beyond the scope of the present invention.
Method provided in an embodiment of the present invention and relevant apparatus be referring to method flow diagram provided in an embodiment of the present invention and/Or structural schematic diagram is come what is described, can specifically be realized by computer program instructions the every of method flow diagram and/or structural schematic diagramThe combination of process and/or box in one process and/or box and flowchart and/or the block diagram.These computer programs refer toEnable the processor that can provide general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devicesTo generate a machine, so that generating use by the instruction that computer or the processor of other programmable data processing devices executeIn the function that realization is specified in one or more flows of the flowchart and/or structural schematic diagram one box or multiple boxesDevice.These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with specificIn the computer-readable memory that mode works, so that it includes instruction that instruction stored in the computer readable memory, which generates,The manufacture of device, the command device are realized in one box of one or more flows of the flowchart and/or structural schematic diagramOr the function of being specified in multiple boxes.These computer program instructions can also be loaded into computer or the processing of other programmable datasIn equipment, so that executing series of operation steps on a computer or other programmable device to generate computer implemented placeReason, so that instruction executed on a computer or other programmable device offer is for realizing in one process of flow chart or multipleThe step of function of being specified in process and/or structural representation one box or multiple boxes.
The term " includes " and " having " and their any changes occurred in description of the invention, claims and attached drawingShape, it is intended that cover and non-exclusive include.Such as contain the process, method of a series of steps or units, system, product orEquipment is not limited to listed step or unit, but optionally further comprising the step of not listing or unit or optionalGround further includes the other step or units intrinsic for these process, methods, product or equipment.
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainlyIt encloses, therefore equivalent changes made in accordance with the claims of the present invention, is still within the scope of the present invention.