CN107644017A - The querying method and device of journal file - Google Patents

The querying method and device of journal file Download PDF

Info

Publication number
CN107644017A
CN107644017A CN201610573229.3A CN201610573229A CN107644017A CN 107644017 A CN107644017 A CN 107644017A CN 201610573229 A CN201610573229 A CN 201610573229A CN 107644017 A CN107644017 A CN 107644017A
Authority
CN
China
Prior art keywords
journal file
service
numbering
log sheet
type
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610573229.3A
Other languages
Chinese (zh)
Inventor
巫绍堂
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN201610573229.3A priority Critical patent/CN107644017A/en
Publication of CN107644017A publication Critical patent/CN107644017A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a kind of querying method of journal file, this method includes:The journal file inquiry request that client is sent is received, the first type of service belonging to journal file to be checked is comprised at least in the journal file inquiry request;Preset journal file routing table is searched according to first type of service, it is determined that the numbering of log sheet corresponding with the type of service, the corresponding relation between type of service and the numbering of log sheet is included in the journal file routing table;According to the numbering of the log sheet to the client feedback journal file.The invention also discloses a kind of inquiry unit of journal file, can effectively reduce the data volume of required inquiry during query log files, shorten the time that query log files are consumed, improve search efficiency, and reduce the occupancy of system resource.

Description

The querying method and device of journal file
Technical field
The present invention relates to the querying method and device of areas of information technology, more particularly to a kind of journal file.
Background technology
Journal file is a very extensive concept in computer systems, and any program is likely to output journal text Part, such as the kernel of operating system, various application servers etc..The content of journal file, scale and purposes are also different, It is difficult to lump together.In a word, the function of journal file is logging software running status, event information caused by storage system.
Due to the rapidly development of internet, various Internet technology systems and the network equipment can all produce substantial amounts of daily record text Part, wherein, there are many journal files to need long term archival, for the various audits and inquiry in later stage.
However, as business datum increases, caused journal file is also more and more, and daily record all in system at present File is all stored in same log sheet, and data volume is larger, every time in query log files all by the log sheet Inquired about in all journal files, the time length consumed, search efficiency is low, and will take more system resource.
The above is only used for auxiliary and understands technical scheme, does not represent and recognizes that the above is existing skill Art.
The content of the invention
It is a primary object of the present invention to provide the querying method and device of a kind of journal file, it is intended to solve prior art In due to preserving all journal files by log sheet, the time length that data volume is big, and query log files are consumed be present, Search efficiency is low, and the technical problems such as occupying system resources are more.
To achieve the above object, a kind of querying method of journal file provided by the invention, methods described include:
The journal file inquiry request that client is sent is received, is comprised at least in the journal file inquiry request to be checked Journal file belonging to the first type of service;
Preset journal file routing table is searched according to first type of service, it is determined that corresponding with the type of service The numbering of log sheet, the corresponding relation between type of service and the numbering of log sheet is included in the journal file routing table;
According to the numbering of the log sheet to the client feedback journal file.
Preferably, the period belonging to journal file to be checked is also included in the journal file inquiry request;
Then the numbering according to the log sheet is to the client feedback journal file, including:
Log sheet is obtained using the numbering of the log sheet;
The journal file for meeting the period is obtained from the log sheet, and the journal file of acquisition is fed back into institute State client.
Preferably, methods described also includes:
Service request is received, the second type of service belonging to the resource of request is included in the service request;
The service request is handled, obtains the journal file generated during handling the service request;
The journal file routing table is searched according to second type of service, it is determined that corresponding with second type of service Log sheet numbering;
The journal file of the generation is preserved into log sheet corresponding to the numbering of the log sheet.
Preferably, it is described that the journal file routing table is searched according to second type of service, it is determined that with described second The numbering of log sheet corresponding to type of service, including:
Search the journal file routing table, it is determined whether the volume of log sheet corresponding with second type of service be present Number;
If finding the numbering of log sheet corresponding with second type of service, the numbering of the log sheet is obtained;
If not finding the numbering of log sheet corresponding with second type of service, log sheet is created, and based on pre- The coding rule put is numbered for the log sheet distribution created, by between the numbering of the log sheet of establishment and second type of service Corresponding relation preserve into the journal file routing table.
Preferably, if the type of service is divided based on uniform resource position mark URL address, the journal file The corresponding relation between URL addresses and the numbering of log sheet is included in routing table.
To achieve the above object, the present invention also provides a kind of inquiry unit of journal file, and described device includes:
Receiving module, for receiving the journal file inquiry request of client transmission, in the journal file inquiry request Including at least the first type of service belonging to journal file to be checked;
First searching modul, for searching preset journal file routing table according to first type of service, it is determined that with The numbering of log sheet corresponding to the type of service, the numbering comprising type of service and log sheet in the journal file routing table Between corresponding relation;
Feedback module, for the numbering according to the log sheet to the client feedback journal file.
Preferably, the period belonging to journal file to be checked is also included in the journal file inquiry request;
Then the feedback module includes:
First acquisition module, for obtaining log sheet using the numbering of the log sheet;
Acquisition and feedback module, the journal file of the period is met for being obtained from the log sheet, and will be obtained The journal file taken feeds back to the client.
Preferably, described device also includes:
Request receiving module, for receiving service request, second belonging to the resource asked is included in the service request Type of service;
Acquisition module is handled, for handling the service request, is obtained during handling the service request The journal file of generation;
Numbering determining module, for searching the journal file routing table according to second type of service, it is determined that and institute State the numbering of log sheet corresponding to the second type of service;
Preserving module, for the journal file of the generation to be preserved to log sheet corresponding to the numbering of the log sheet In.
Preferably, the numbering determining module includes:
Second searching modul, for searching the journal file routing table, it is determined whether exist and second service class The numbering of log sheet corresponding to type;
Second acquisition module, if the numbering for finding log sheet corresponding with second type of service, is obtained The numbering of the log sheet;
Establishment and preserving module, if the numbering for not finding log sheet corresponding with second type of service, Create log sheet, and numbering distributed for the log sheet created based on preset coding rule, by the numbering of the log sheet of establishment and Corresponding relation between second type of service is preserved into the journal file routing table.
Preferably, if the type of service is divided based on uniform resource position mark URL address, the journal file The corresponding relation between URL addresses and the numbering of log sheet is included in routing table.
The present invention provides a kind of querying method of journal file, and in the method, server receives client transmission After journal file inquiry request, the first industry belonging to the journal file to be checked included in the journal file inquiry request is utilized Service type searches preset journal file routing table, it is determined that the numbering of log sheet corresponding with first type of service, and according to The numbering of the log sheet of determination is to client feedback journal file.Due to including type of service in the journal file routing table of setting Corresponding relation between the numbering of log sheet, enabling journal file is stored in based on type of service by different log sheets In, and the inquiry of the journal file of different service types is realized based on different log sheets, inquiry log can be effectively reduced The data volume of required inquiry during file, shorten the time that query log files are consumed, improve search efficiency, and reduce system The occupancy of resource.
Brief description of the drawings
Fig. 1 is the schematic flow sheet of the querying method of journal file in first embodiment of the invention;
Fig. 2 is the schematic flow sheet of the refinement step of step 103 in first embodiment shown in Fig. 1;
Fig. 3 is the schematic flow sheet of the addition step in first embodiment shown in Fig. 1;
Fig. 4 is the schematic flow sheet of the refinement step of step 303 in embodiment illustrated in fig. 3;
Fig. 5 is the high-level schematic functional block diagram of the inquiry unit of journal file in second embodiment of the invention;
Fig. 6 is the schematic diagram of the refinement functional module of feedback module 303 in second embodiment shown in Fig. 5;
Fig. 7 is the schematic diagram of the functional module of the inquiry unit of journal file in third embodiment of the invention;
Fig. 8 is the schematic diagram of the refinement functional module of numbering determining module 703 in 3rd embodiment shown in Fig. 7.
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Because in the prior art, all journal files are all stored in same log sheet, and data volume is big, inquire about day every time Will file will be all inquired about all journal files in the log sheet, and the time length consumed, search efficiency is low, and will Take more system resource.
In order to solve the above technical problems, the present invention proposes a kind of querying method of journal file, due to the daily record text of setting Comprising corresponding relation between type of service and the numbering of log sheet in part routing table, enabling based on type of service by daily record File is stored in different log sheets, and realizes based on different log sheets the inquiry of the journal file of different service types, The data volume of required inquiry during query log files can be effectively reduced, shortens the time that query log files are consumed, Search efficiency is improved, and reduces the occupancy of system resource.
Referring to Fig. 1, being the schematic flow sheet of the querying method of journal file in first embodiment of the invention, the daily record is literary The querying method of part includes:
Step 101, the journal file inquiry request that client is sent is received, at least wrapped in the journal file inquiry request Containing the first type of service belonging to journal file to be checked;
Step 102, preset journal file routing table searched according to first type of service, it is determined that with first industry The numbering of log sheet corresponding to service type, include between type of service and the numbering of log sheet in the journal file routing table Corresponding relation;
Step 103, according to the numbering of the log sheet to the client feedback journal file.
In embodiments of the present invention, the querying method of the journal file can be by journal file inquiry unit (hereinafter referred to as: Device) perform, the device can be part of module in server or server.
Journal file routing table is pre-set in the device, the journal file routing table is used to determine each type of service The numbering of log sheet corresponding to respectively, i.e., comprising the corresponding relation between type of service and the numbering of log sheet, and based on each The numbering of individual log sheet has at least one corresponding log sheet, is included in log sheet and numbers the day of corresponding type of service with it Will file.For example, for server provide access search service, the search service include news, video, picture, music, Figure etc. multiple types search, then each search-type belong to a kind of type of service.
Wherein, when client needs query log files, journal file inquiry request, the daily record can be sent to the device The first type of service belonging to client journal file to be checked is comprised at least in file query requests.
In embodiments of the present invention, device, please according to journal file inquiry after journal file inquiry request is received The first type of service included in asking searches above-mentioned journal file routing table, it is determined that daily record corresponding with first type of service The numbering of table, and according to the numbering of the log sheet to client feedback journal file, to realize the inquiry of journal file.
In embodiments of the present invention, the day of the corresponding relation between type of service and the numbering of log sheet is included by setting Will file route table, enabling the journal file of different types of service is stored in log sheet so that in inquiry log During file, journal file routing table can be utilized to determine day corresponding with the first type of service belonging to journal file to be checked The numbering of will table, to carry out journal file inquiry.Due to including type of service and log sheet in the journal file routing table of setting Numbering between corresponding relation, enabling journal file is stored in different log sheets based on type of service, and base The inquiry of the journal file of different service types is realized in different log sheets, query log files when institute can be effectively reduced The data volume inquired about is needed, shortens the time that query log files are consumed, improves search efficiency, and reduce accounting for for system resource With.
Based on first embodiment shown in Fig. 1, comprising belonging to journal file to be checked in journal file inquiry request During the period, referring to Fig. 2, be the schematic flow sheet of the refinement step of step 103 in first embodiment shown in Fig. 1 of the present invention, The step 103 specifically includes following steps:
Step 201, the numbering acquisition log sheet using the log sheet;
Step 202, obtained from the log sheet and meet the journal file of the period, and by the journal file of acquisition Feed back to the client.
In embodiments of the present invention, if in journal file inquiry request comprising belonging to journal file to be checked when Between section, then device all journal files in log sheet can all be fed back to client it is determined that after the numbering of log sheet, Journal file in preset time period can also be fed back to client, for example, the preset time period can be nearest 24 Hour is nearest one week so that comprising the period belonging to journal file to be checked in journal file inquiry request In the case of, can by nearest in log sheet 24 hours or it is nearest one week in journal file feed back to client.
If user needs the journal file inquired about in some specified time section, day to be checked can be set in client Period belonging to will file, and when sending journal file inquiry request, the period will carry and be inquired about in the journal file Sent in request to device, device utilizes the numbering it is determined that after the numbering of log sheet belonging to journal file to be checked Log sheet is determined, for example, searching the database where log sheet based on the numbering.And device will obtain from log sheet and meet this The journal file of period, and the journal file of acquisition is fed back into client.
Wherein, the journal file in log sheet includes the generation time of the journal file, if journal file inquiry request In period for including be 4 days 12 June in 2016:00 to 13:00, the first type of service is application program A, then it is determined that preserving The generation time of journal file is searched in application program A log sheet A 4 days 12 June in 2016:00 to 13:Day between 00 Will file, and the journal file found is fed back into client.
In embodiments of the present invention, by carried in journal file inquiry request belonging to journal file to be checked when Between section so that user can inquire the journal file in the period carried in the request, meet the use demand of user.
Based on first embodiment shown in Fig. 1, referring to Fig. 3, the addition step for first embodiment described in Fig. 1 of the present invention Schematic flow sheet, the addition step include:
Step 301, service request is received, the second type of service belonging to the resource of request is included in the service request;
Step 302, the service request is handled, obtain the daily record generated during handling the service request File;
Step 303, the journal file routing table searched according to second type of service, it is determined that with second business The numbering of log sheet corresponding to type;
Step 304, the journal file of the generation preserved into log sheet corresponding to the numbering of the log sheet.
Relative to first embodiment shown in Fig. 1, added in Fig. 3 of the present invention and be based on the journal file of business processing generation The process that type of service is added in corresponding log sheet, enabling the classification for realizing journal file based on type of service is protected Deposit.
In embodiments of the present invention, client can send service request, the business when needing to use business to device The second type of service belonging to resource comprising request in request.
After device receives service request, the service request is handled, if for example, being included in the service request It is URL addresses, then based on the URL addresses to client feedback data.Wherein, device, will during processing business is asked Journal file is generated, in order to preserve the journal file, device will be searched according to the second type of service included in the service request Journal file routing table, it is determined that the numbering of log sheet corresponding with second type of service, and the journal file of generation is preserved Into log sheet corresponding to the numbering of the log sheet.
In embodiments of the present invention, device is during processing business is asked, based on belonging to the journal file of generation Type of service searches journal file routing table, to determine the numbering of corresponding with type of service log sheet, and by the day of generation Will file is preserved into log sheet corresponding to the numbering of the log sheet, effectively realizes that the classification of journal file preserves, and is daily record text The inquiry of part provides facility.
Based on embodiment illustrated in fig. 3, referring to Fig. 4, the refinement step for step 303 in embodiment illustrated in fig. 3 of the present invention Schematic flow sheet, the step 303 includes:
Step 401, search the journal file routing table, it is determined whether day corresponding with second type of service be present The numbering of will table;
If step 402, the numbering for finding log sheet corresponding with second type of service, obtain the log sheet Numbering;
If step 403, the numbering for not finding log sheet corresponding with second type of service, create log sheet, And numbering is distributed for the log sheet created based on preset coding rule, by the numbering of the log sheet of establishment and second business Corresponding relation between type is preserved into the journal file routing table.
In embodiments of the present invention, device is handled service request, and after generation journal file, will search daily record File route table, it is determined whether the numbering of log sheet corresponding with the second type of service be present, wherein, the second type of service is Type of service belonging to the journal file of generation.By searching journal file routing table, it can effectively determine whether existed The log sheet of the journal file can be preserved.
If finding the numbering of log sheet corresponding with the second type of service, show that presence can preserve the daily record The log sheet of file, device will obtain the numbering of the log sheet.If log sheet corresponding with the second type of service is not found Numbering, then show that the log sheet that can preserve the journal file is not present, and in order to preserve the journal file of generation, device It will create log sheet, and numbering is distributed for the log sheet of the establishment based on preset coding rule, and by the log sheet of establishment Corresponding relation between numbering and the second type of service is preserved into above-mentioned journal file routing table.
In this hair embodiment, if not finding the numbering of log sheet corresponding with the second type of service, pass through establishment Log sheet, enabling the preservation for the journal file for belonging to the second type of service is realized, and by by the volume of the log sheet of establishment Number and the second type of service be added in journal file routing table so that in subsequent regeneration into the daily record for belonging to the second type of service During file, it can determine to preserve the numbering of the log sheet of the journal file based on the journal file routing table, by journal file Preserve into log sheet corresponding to the numbering, effectively realize the preservation of journal file.
It is understood that device can be based on different angle when setting journal file routing table based on type of service The division of type of service is carried out, for example, URL (URL, Uniform Resource Locator) can be based on Address divides type of service, and if based on URL division types of service, include in journal file routing table be URL addresses with Corresponding relation between the numbering of log sheet.In actual applications, can be according to specific it needs to be determined that dividing type of service Angle, do not limit herein.
Referring to Fig. 5, be the high-level schematic functional block diagram of the inquiry unit of journal file in second embodiment of the invention, the dress Put including:Receiving module 501, the first searching modul 502, feedback module 503.
Receiving module 501, for receiving the journal file inquiry request of client transmission, the journal file inquiry request In comprise at least journal file to be checked belonging to the first type of service;
First searching modul 502, for searching preset journal file routing table according to first type of service, it is determined that The numbering of log sheet corresponding with the type of service, the volume comprising type of service and log sheet in the journal file routing table Corresponding relation between number;
Feedback module 503, for the numbering according to the log sheet to the client feedback journal file.
In embodiments of the present invention, journal file routing table is pre-set in the device, the journal file routing table is used In it is determined that each type of service respectively corresponding to log sheet numbering, i.e., comprising pair between type of service and the numbering of log sheet It should be related to, and the numbering based on each log sheet has at least one corresponding log sheet, includes in log sheet and is numbered with it The journal file of corresponding type of service.For example, providing the search service accessed for server, the search service includes new The search of multiple types such as news, video, picture, music, map, then each search-type belong to a kind of type of service.
Wherein, when client needs query log files, journal file inquiry request, the daily record can be sent to the device The first type of service belonging to client journal file to be checked is comprised at least in file query requests.
In embodiments of the present invention, receiving module 501 is after journal file inquiry request is received, the first searching modul 502 search above-mentioned journal file routing table according to the first type of service included in the journal file inquiry request, it is determined that with The numbering of log sheet corresponding to first type of service, and feedback module 503 according to the numbering of the log sheet to client feedback Journal file, to realize the inquiry of journal file.
In embodiments of the present invention, the day of the corresponding relation between type of service and the numbering of log sheet is included by setting Will file route table, enabling the journal file of different types of service is stored in log sheet so that in inquiry log During file, journal file routing table can be utilized to determine day corresponding with the first type of service belonging to journal file to be checked The numbering of will table, to carry out journal file inquiry.Due to including type of service and log sheet in the journal file routing table of setting Numbering between corresponding relation, enabling journal file is stored in different log sheets based on type of service, and base The inquiry of the journal file of different service types is realized in different log sheets, query log files when institute can be effectively reduced The data volume inquired about is needed, shortens the time that query log files are consumed, improves search efficiency, and reduce accounting for for system resource With.
Based on second embodiment shown in Fig. 5, comprising belonging to journal file to be checked in journal file inquiry request During the period, referring to Fig. 6, the signal for the refinement functional module of feedback module 503 in second embodiment shown in Fig. 5 of the present invention Figure, the feedback module 503 include:
First acquisition module 601, for obtaining log sheet using the numbering of the log sheet;
Acquisition and feedback module 602, the journal file of the period is met for being obtained from the log sheet, and will The journal file of acquisition feeds back to the client.
In embodiments of the present invention, if in journal file inquiry request comprising belonging to journal file to be checked when Between section, then device all journal files in log sheet can all be fed back to client it is determined that after the numbering of log sheet, Journal file in preset time period can also be fed back to client.For example, the preset time period can be nearest 24 Hour is nearest one week so that comprising the period belonging to journal file to be checked in journal file inquiry request In the case of, can by nearest in log sheet 24 hours or it is nearest one week in journal file feed back to client.
If user needs the journal file inquired about in some specified time section, day to be checked can be set in client Period belonging to will file, and when sending journal file inquiry request, the period will carry and be inquired about in the journal file Sent in request to device, it is determined that after the numbering of log sheet belonging to journal file to be checked, the first acquisition module 601 Log sheet is determined using the numbering, for example, searching the database where log sheet based on the numbering.And acquisition and feedback module 602 meet the journal file of the period by being obtained from log sheet, and the journal file of acquisition is fed back into client.
Wherein, the journal file in log sheet includes the generation time of the journal file, if journal file inquiry request In period for including be 4 days 12 June in 2016:00 to 13:00, the first type of service is application program A, then it is determined that preserving The generation time of journal file is searched in application program A log sheet A 4 days 12 June in 2016:00 to 13:Day between 00 Will file, and the journal file found is fed back into client.
In embodiments of the present invention, by carried in journal file inquiry request belonging to journal file to be checked when Between section, enabling inquire the journal file in the period carried in the request, meet the use demand of user.
Referring to Fig. 7, be the schematic diagram of the functional module of the inquiry unit of journal file in third embodiment of the invention, should The inquiry unit of journal file includes:Receiving module 501 in second embodiment as shown in Figure 5, the first searching modul 502, instead Module 503 is presented, and it is similar to the content described in second embodiment shown in Fig. 5, do not repeat herein.
In embodiments of the present invention, inquiry unit also includes:
Request receiving module 701, for receiving service request, the belonging to the resource comprising request in the service request Two types of service;
Acquisition module 702 is handled, for handling the service request, obtains the process for handling the service request The journal file of middle generation;
Numbering determining module 703, for searching the journal file routing table according to second type of service, it is determined that with The numbering of log sheet corresponding to second type of service;
Preserving module 704, for the journal file of the generation to be preserved to daily record corresponding to the numbering of the log sheet In table.
In embodiments of the present invention, client can send service request, the business when needing to use business to device The second type of service belonging to resource comprising request in request.
After request receiving module 701 receives service request, processing acquisition module 702 to the service request at Reason, if for example, what is included in the service request is URL addresses, based on the URL addresses to client feedback data.Wherein, exist During processing business is asked, journal file will be generated, in order to preserve the journal file, numbering determining module 703 is by basis The second type of service included in the service request searches journal file routing table, it is determined that day corresponding with second type of service The numbering of will table, and preserving module 704 preserves the journal file of generation into log sheet corresponding to the numbering of the log sheet.
In embodiments of the present invention, device is during processing business is asked, based on belonging to the journal file of generation Type of service searches journal file routing table, to determine the numbering of corresponding with type of service log sheet, and by the day of generation Will file is preserved into log sheet corresponding to the numbering of the log sheet, effectively realizes that the classification of journal file preserves, and is daily record text The inquiry of part provides facility.
Based on 3rd embodiment shown in Fig. 7, referring to Fig. 8, determining mould for numbering in 3rd embodiment shown in Fig. 7 of the present invention The schematic diagram of the refinement functional module of block 703, the numbering determining module 703 include:
Second searching modul 801, for searching the journal file routing table, it is determined whether exist and second business The numbering of log sheet corresponding to type;
Second acquisition module 802, if the numbering for finding log sheet corresponding with second type of service, is obtained Take the numbering of the log sheet;
Establishment and preserving module 803, if the numbering for not finding log sheet corresponding with second type of service, Log sheet is then created, and numbering is distributed for the log sheet created based on preset coding rule, by the numbering of the log sheet of establishment And the corresponding relation between second type of service is preserved into the journal file routing table.
In embodiments of the present invention, device is handled service request, and after generation journal file, second searches mould Block 801 will search journal file routing table, it is determined whether the numbering of log sheet corresponding with the second type of service be present, wherein, Second type of service is the type of service belonging to the journal file generated., can be effective by searching journal file routing table Determine whether that presence can preserve the log sheet of the journal file.
If finding the numbering of log sheet corresponding with the second type of service, show that presence can preserve the daily record The log sheet of file, the second acquisition module 802 will obtain the numbering of the log sheet.If do not find corresponding with the second type of service Log sheet numbering, then the log sheet of the journal file can be preserved by showing to be not present, and in order to preserve the day of generation Will file, is created and preserving module 803 will create log sheet, and is distributed based on preset coding rule for the log sheet of the establishment Numbering, and the corresponding relation between the numbering of the log sheet of establishment and the second type of service is preserved to above-mentioned journal file and route In table.
In this hair embodiment, if not finding the numbering of log sheet corresponding with the second type of service, pass through establishment Log sheet, enabling the preservation for the journal file for belonging to the second type of service is realized, and by by the volume of the log sheet of establishment Number and the second type of service be added in journal file routing table so that in subsequent regeneration into the daily record for belonging to the second type of service During file, it can determine to preserve the numbering of the log sheet of the journal file based on the journal file routing table, by journal file Preserve into log sheet corresponding to the numbering, effectively realize the preservation of journal file.
It is understood that device can be based on different angle when setting journal file routing table based on type of service The division of type of service is carried out, for example, URL (URL, Uniform Resource Locator) can be based on Address divides type of service, and if based on URL division types of service, include in journal file routing table be URL addresses with Corresponding relation between the numbering of log sheet.In actual applications, can be according to specific it needs to be determined that dividing type of service Angle, do not limit herein.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone, computer, clothes Be engaged in device, air conditioner, or network equipment etc.) method that performs each embodiment of the present invention.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of querying method of journal file, it is characterised in that methods described includes:
The journal file inquiry request that client is sent is received, day to be checked is comprised at least in the journal file inquiry request The first type of service belonging to will file;
Preset journal file routing table is searched according to first type of service, it is determined that daily record corresponding with the type of service The numbering of table, the corresponding relation between type of service and the numbering of log sheet is included in the journal file routing table;
According to the numbering of the log sheet to the client feedback journal file.
2. according to the method for claim 1, it is characterised in that also include in the journal file inquiry request to be checked Period belonging to journal file;
Then the numbering according to the log sheet is to the client feedback journal file, including:
Log sheet is obtained using the numbering of the log sheet;
The journal file for meeting the period is obtained from the log sheet, and the journal file of acquisition is fed back into the visitor Family end.
3. according to the method for claim 1, it is characterised in that methods described also includes:
Service request is received, the second type of service belonging to the resource of request is included in the service request;
The service request is handled, obtains the journal file generated during handling the service request;
The journal file routing table is searched according to second type of service, it is determined that day corresponding with second type of service The numbering of will table;
The journal file of the generation is preserved into log sheet corresponding to the numbering of the log sheet.
4. according to the method for claim 3, it is characterised in that described that the daily record is searched according to second type of service File route table, it is determined that the numbering of log sheet corresponding with second type of service, including:
Search the journal file routing table, it is determined whether the numbering of log sheet corresponding with second type of service be present;
If finding the numbering of log sheet corresponding with second type of service, the numbering of the log sheet is obtained;
If not finding the numbering of log sheet corresponding with second type of service, log sheet is created, and based on preset Coding rule is numbered for the log sheet distribution created, by pair between the numbering of the log sheet of establishment and second type of service Preservation should be related into the journal file routing table.
5. according to the method described in Claims 1-4 any one, it is characterised in that if the type of service is based on unified Resource Locator URL address division, then included in the journal file routing table between URL addresses and the numbering of log sheet Corresponding relation.
6. a kind of inquiry unit of journal file, it is characterised in that described device includes:
Receiving module, for receiving the journal file inquiry request of client transmission, in the journal file inquiry request at least Include the first type of service belonging to journal file to be checked;
First searching modul, for searching preset journal file routing table according to first type of service, it is determined that with it is described The numbering of log sheet corresponding to type of service, include between type of service and the numbering of log sheet in the journal file routing table Corresponding relation;
Feedback module, for the numbering according to the log sheet to the client feedback journal file.
7. device according to claim 6, it is characterised in that also include in the journal file inquiry request to be checked Period belonging to journal file;
Then the feedback module includes:
First acquisition module, for obtaining log sheet using the numbering of the log sheet;
Obtain and feedback module, meet the journal file of the period for being obtained from the log sheet, and by acquisition Journal file feeds back to the client.
8. device according to claim 6, it is characterised in that described device also includes:
Request receiving module, for receiving service request, the second business belonging to the resource of request is included in the service request Type;
Acquisition module is handled, for handling the service request, obtains and is generated during handling the service request Journal file;
Numbering determining module, for searching the journal file routing table according to second type of service, it is determined that with described the The numbering of log sheet corresponding to two types of service;
Preserving module, for the journal file of the generation to be preserved into log sheet corresponding to the numbering of the log sheet.
9. device according to claim 8, it is characterised in that the numbering determining module includes:
Second searching modul, for searching the journal file routing table, it is determined whether exist and second type of service pair The numbering for the log sheet answered;
Second acquisition module, if the numbering for finding log sheet corresponding with second type of service, described in acquisition The numbering of log sheet;
Establishment and preserving module, if the numbering for not finding log sheet corresponding with second type of service, is created Log sheet, and numbering is distributed for the log sheet created based on preset coding rule, by the numbering of the log sheet of establishment and described Corresponding relation between second type of service is preserved into the journal file routing table.
10. according to the device described in claim 6 to 9 any one, it is characterised in that if the type of service is based on unified Resource Locator URL address division, then included in the journal file routing table between URL addresses and the numbering of log sheet Corresponding relation.
CN201610573229.3A 2016-07-20 2016-07-20 The querying method and device of journal file Pending CN107644017A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610573229.3A CN107644017A (en) 2016-07-20 2016-07-20 The querying method and device of journal file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610573229.3A CN107644017A (en) 2016-07-20 2016-07-20 The querying method and device of journal file

Publications (1)

Publication Number Publication Date
CN107644017A true CN107644017A (en) 2018-01-30

Family

ID=61109314

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610573229.3A Pending CN107644017A (en) 2016-07-20 2016-07-20 The querying method and device of journal file

Country Status (1)

Country Link
CN (1) CN107644017A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109388628A (en) * 2018-08-28 2019-02-26 平安科技(深圳)有限公司 System log querying method, device, computer equipment and storage medium
CN109586968A (en) * 2018-12-13 2019-04-05 北京锐安科技有限公司 The log processing method of big data platform and the log processing system of big data platform
CN110097324A (en) * 2019-05-14 2019-08-06 北京顺丰同城科技有限公司 A kind of logistics information querying method and device
CN110888790A (en) * 2019-11-29 2020-03-17 杭州迪普科技股份有限公司 Log management method and device, electronic equipment and storage medium
CN111290910A (en) * 2020-01-20 2020-06-16 Oppo(重庆)智能科技有限公司 Log processing method, device, server and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103793479A (en) * 2014-01-14 2014-05-14 上海上讯信息技术股份有限公司 Log management method and log management system
CN103853743A (en) * 2012-11-29 2014-06-11 百度在线网络技术(北京)有限公司 Distributed system and log query method thereof
CN104301360A (en) * 2013-07-19 2015-01-21 阿里巴巴集团控股有限公司 Method, log server and system for recording log data
CN105488201A (en) * 2015-12-08 2016-04-13 北京皮尔布莱尼软件有限公司 Log inquiry method and system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103853743A (en) * 2012-11-29 2014-06-11 百度在线网络技术(北京)有限公司 Distributed system and log query method thereof
CN104301360A (en) * 2013-07-19 2015-01-21 阿里巴巴集团控股有限公司 Method, log server and system for recording log data
CN103793479A (en) * 2014-01-14 2014-05-14 上海上讯信息技术股份有限公司 Log management method and log management system
CN105488201A (en) * 2015-12-08 2016-04-13 北京皮尔布莱尼软件有限公司 Log inquiry method and system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109388628A (en) * 2018-08-28 2019-02-26 平安科技(深圳)有限公司 System log querying method, device, computer equipment and storage medium
CN109586968A (en) * 2018-12-13 2019-04-05 北京锐安科技有限公司 The log processing method of big data platform and the log processing system of big data platform
CN110097324A (en) * 2019-05-14 2019-08-06 北京顺丰同城科技有限公司 A kind of logistics information querying method and device
CN110888790A (en) * 2019-11-29 2020-03-17 杭州迪普科技股份有限公司 Log management method and device, electronic equipment and storage medium
CN110888790B (en) * 2019-11-29 2024-02-27 杭州迪普科技股份有限公司 Log management method and device, electronic equipment and storage medium
CN111290910A (en) * 2020-01-20 2020-06-16 Oppo(重庆)智能科技有限公司 Log processing method, device, server and storage medium
CN111290910B (en) * 2020-01-20 2023-06-23 Oppo(重庆)智能科技有限公司 Log processing method, device, server and storage medium

Similar Documents

Publication Publication Date Title
CN107644017A (en) The querying method and device of journal file
CN104125208B (en) Data transmission method and device
CN109005056B (en) CDN application-based storage capacity evaluation method and device
WO2019024496A1 (en) Enterprise recommendation method and application server
CN104427005A (en) Method and system for realizing accurate request scheduling on content delivery network
CN102208991A (en) Blog processing method, device and system
CN104750760A (en) Application software recommending method and device
CN109558378A (en) File management method, device, equipment and storage medium
CN105045762A (en) Management method and apparatus for configuration file
CN101068237B (en) Data access system and data access method
CN102957624A (en) Content routing method and device
CN105099894A (en) Message pushing method, device and system
CN107656943B (en) Task query method and server
CN107357557B (en) Information updating method and device
CN109145092B (en) Database updating and intelligent question and answer management method, device and equipment
CN103248636A (en) Offline download system and method
CN105335313A (en) Basic data transmission method and apparatus
US20230252011A1 (en) Method and system for data indexing and reporting
CN102651721A (en) Information feedback method and equipment
CN106294417A (en) A kind of data reordering method, device and electronic equipment
CN112035760B (en) Task allocation method and computer equipment
CN110457582B (en) Data distribution method and recommendation system
CN115794876A (en) Fragment processing method, device, equipment and storage medium for service data packet
CN108900593B (en) Distributed processing method for data of storage cabinet
CN105677829A (en) Retrieving method 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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180130

RJ01 Rejection of invention patent application after publication