CN105429775A - Method and device for reporting log - Google Patents

Method and device for reporting log Download PDF

Info

Publication number
CN105429775A
CN105429775A CN201410484552.4A CN201410484552A CN105429775A CN 105429775 A CN105429775 A CN 105429775A CN 201410484552 A CN201410484552 A CN 201410484552A CN 105429775 A CN105429775 A CN 105429775A
Authority
CN
China
Prior art keywords
daily record
rank
module
client
mark
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410484552.4A
Other languages
Chinese (zh)
Other versions
CN105429775B (en
Inventor
王�琦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Beijing Co Ltd
Original Assignee
Tencent Technology Beijing 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 Tencent Technology Beijing Co Ltd filed Critical Tencent Technology Beijing Co Ltd
Priority to CN201410484552.4A priority Critical patent/CN105429775B/en
Publication of CN105429775A publication Critical patent/CN105429775A/en
Application granted granted Critical
Publication of CN105429775B publication Critical patent/CN105429775B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The invention discloses a method and device for reporting a log, and belongs to the field of internet communication. The method comprises the following steps: when execution operation of a client side and the log of operation generated by the client side are detected, obtaining a grade of the log according to the operation; according to the grade, determining whether the log is a log of abnormal operation; if the log is the log of the abnormal operation, obtaining a preset-size log newly generated by the client side; and forming a log file by the obtained preset-side log, and sending the log file to a server. The device comprises a first obtaining module, a determination module, a second obtaining module and a sending module. User's flow can be prevented from being wasted, and then an object of saving the user's flow is achieved.

Description

A kind of method and device reporting daily record
Technical field
The present invention relates to field of Internet communication, particularly a kind of method and device reporting daily record.
Background technology
For the journal items of client, its main purpose is that record is on-the-spot when client makes a mistake, field data is collected to situation about making a mistake, report daily record when making a mistake to server by client, technical staff at server end by checking log analysis data, solve the mistake that client occurs, and expect following contingent unusual condition to a certain extent, so how to report daily record particularly important.
Wherein, client operationally produces daily record in real time, the daily record of generation is stored in journal file.At present, the daily record of generation can be reported server by the following two kinds method by client, comprising:
The first, arrange the time interval reporting daily record, reports the journal file of a client generation every this time interval.Such as, suppose that setting reports the time interval of daily record to be 24 hours, then reported the journal file of a client generation every 24 hours.
The second, the file size threshold value reporting daily record is set, when the log file size of client storing daily record reaches this file size threshold value, this journal file is reported server, a newly-built blank journal file, makes client the daily record of generation be stored in this blank journal file at this moment.Such as, supposing to arrange reports the file size threshold value of daily record to be 1MB, then will report this journal file when the log file size of storing daily record reaches 1MB and a newly-built blank journal file, when client produces daily record again, this daily record is stored in this blank journal file.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem:
The flowing water daily record of a large number of users normal running is comprised or what comprise is all the flowing water daily record of user's normal running in the journal file that above-mentioned two kinds of methods report, these daily records are concerning technical staff analyzes data, be all useless daily record, so cause the waste of a large amount of loss of customer flow and a large amount of flow.
Summary of the invention
In order to avoid waste customer flow, to reach the object of saving customer flow, the invention provides a kind of method and the device that report daily record.Described technical scheme is as follows:
Report a method for daily record, it is characterized in that, described method comprises:
When detecting that client executing operation and described client produce the daily record of described operation, obtain the rank of described daily record according to described operation;
Determine that whether described daily record is the daily record of abnormal operation according to described rank;
If so, then the daily record of the default size of the up-to-date generation of described client is obtained;
By the daily record of the default size of described acquisition composition journal file, send described journal file to server.
Report a device for daily record, it is characterized in that, described device comprises:
First acquisition module, during for detecting that client executing operation and described client produce the daily record of described operation, obtains the rank of described daily record according to described operation;
Determination module, for determining that according to described rank whether described daily record is the daily record of abnormal operation;
Second acquisition module, for obtaining if the daily record of abnormal operation, then obtains the daily record of the default size of the up-to-date generation of described client;
Sending module, for the daily record composition journal file of the default size by described acquisition, sends described journal file to server.
In embodiments of the present invention, the rank of the daily record produced during by obtaining client executing operation, determine that whether this daily record is the daily record of abnormal operation according to this rank, when this daily record during the daily record of abnormal operation, obtain the daily record of the default size of the up-to-date generation of client and form journal file, this journal file is sent to server, because this journal file comprises the daily record of abnormal operation and the daily record of up-to-date generation before this abnormal operation, data are analyzed to technical staff and has value, thus can avoid wasting customer flow, to reach the object of saving customer flow.
Accompanying drawing explanation
Fig. 1 is a kind of method flow diagram reporting daily record that the embodiment of the present invention 1 provides;
Fig. 2 is a kind of method flow diagram reporting daily record that the embodiment of the present invention 2 provides;
Fig. 3 is a kind of apparatus structure schematic diagram reporting daily record that the embodiment of the present invention 3 provides;
Fig. 4 is a kind of terminal structure schematic diagram that the embodiment of the present invention 4 provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment 1
The invention provides a kind of method reporting daily record, see Fig. 1, the method comprises:
Step 101: when detecting that client executing operation and client produce the daily record of this operation, obtain the rank of this daily record according to this operation.
Step 102: determine that whether this daily record is the daily record of abnormal operation according to this rank.
Step 103: if then obtain the daily record of the default size of the up-to-date generation of client.
Step 104: the daily record of the default size obtained is formed journal file, and sends this journal file to server.
In embodiments of the present invention, the rank of the daily record produced during by obtaining client executing operation, determine that whether this daily record is the daily record of abnormal operation according to this rank, when this daily record during the daily record of abnormal operation, obtain the daily record of the default size of the up-to-date generation of client and form journal file, this journal file is sent to server, because this journal file comprises the daily record of abnormal operation and the daily record of up-to-date generation before this abnormal operation, data are analyzed to technical staff and has value, thus can avoid wasting customer flow, to reach the object of saving customer flow.
Embodiment 2
The invention provides a kind of method reporting daily record.Executive agent of the present invention can be terminal, and see Fig. 2, the method comprises:
Step 201: when detecting that client executing operation and client produce the daily record of this operation, obtain the rank of this daily record according to this operation.
Wherein, user can use the various operation of client executing, and when executable operations, client produces the daily record of this operation, and this daily record performs the implementation status of this operation for recording, then this daily record is stored in terminal local.Such as, for the client for uploading short-sighted frequency, this client can comprise uploaded videos, capture video, editing video and obtain the operations such as video from terminal local, if user wants to upload a short-sighted frequency, user needs to use terminal taking video or obtain video from terminal local, then the video obtained is edited, then upload the video editted.Wherein, this client, in the process performing each operation, constantly produces daily record, for recording the situation of executable operations.
In this step; terminal detects client in real time; when detecting that client executing operation and client produce the daily record of this operation; obtain the current operating conditions of this operation; if there is not operation exception for this operation in current operating conditions; then the rank of this daily record is set to this and operates in rank corresponding in no exceptions situation; if current operating conditions is this operation generation exception; then obtain the exception of generation; exception according to this operation and generation obtains corresponding rank, the rank of this daily record is set to the rank obtained.
Wherein, client is in the process of executable operations, and the operation that terminal real-time judge active client performs is abnormal with or without generation, thus obtains the current operating conditions of this operation.
Wherein, the multiple rank of prior division, defines often kind of rank corresponding when operating in no exceptions, and when occurring abnormal, define the common corresponding rank of this operation and this exception, often kind operates in and correspondingly when occurring abnormal is superior to its rank corresponding when no exceptions.Such as, be example for the client uploading short-sighted frequency, mark off Fatal in advance, Critical, Error, the rank that Warn, Info, Debug six is different, wherein, Fatal is higher than Critical, Critical higher than Error, Error higher than Warn, Warn higher than Info, Info higher than Debug; For the operation of " uploaded videos ", definition " uploaded videos " operate in no exceptions time corresponding rank be Info, three kinds of exceptions may be there are be respectively abnormal 1, abnormal 2 and abnormal 3 in the process of the operation of client executing " uploaded videos ", the operation of definition " uploaded videos " and the rank of abnormal 1 correspondence are Fatal, the operation of " uploaded videos " and the rank of abnormal 2 correspondences are Fatal, and the rank of the operation of " uploaded videos " and abnormal 3 correspondences is Warn.
For the operation of " capture video ", the rank corresponding to no exceptions that operate in of definition " capture video " is Debug, two kinds of exceptions may be there are be respectively abnormal A and abnormal B in the process of the operation of client executing " capture video ", the definition operation of " capture video " and rank corresponding to abnormal A are Critical, and the operation of definition " capture video " and rank corresponding to abnormal B are Error.
For the operation of " editing video ", definition " editing video " operate in no exceptions time corresponding rank be Info, three kinds of exceptions may be there are be respectively abnormal a, abnormal b and abnormal c in the operating process of client executing " editing video ", the definition operation of " editing video " and rank corresponding to abnormal a are Fatal, the operation of " editing video " and rank corresponding to abnormal b are Critical, and the operation of " editing video " and rank corresponding to abnormal c are Fatal.
For the operation of " obtaining video from terminal local ", when what definition " obtained video from terminal local " operates in no exceptions, corresponding rank is Info, two kinds of exceptions may be there are the operating process that client executing " obtains video from terminal local ", be respectively abnormal d and abnormal e, the operation that definition " obtains video from terminal local " and rank corresponding to abnormal d are the rank that the operation of Error and " obtaining video from terminal local " and abnormal e are corresponding is Warn.
In this step, suppose the operation that client performs " capture video ", produce a daily record 1 in current time and this daily record 1 is stored in terminal local.Terminal detects the operation of client executing " capture video " and the daily record of client generation, obtain the current operating conditions of this operation, suppose that client, in the operating process performing " capture video ", abnormal A occurs, so for there is operation exception in this current operating conditions, according to operation and the abnormal A of " capture video ", obtaining corresponding rank is Critical, and the rank of this daily record 1 is set to rank Critical.
Step 202: determine that whether this daily record is the daily record of abnormal operation according to this rank.
Particularly, judge whether this rank is pre-set level, if so, then determine that this daily record is the daily record of abnormal operation, if not then determining that this daily record is not the daily record of abnormal operation.
Wherein, due to often kind operate in and send out abnormal time corresponding be superior to its rank corresponding when not sending out exception, therefore can the highest several ranks of pre-set level, these pre-set level all operate in rank corresponding when occurring abnormal, therefore, when the rank of this daily record is pre-set level, just this daily record can be defined as the daily record of abnormal operation.
Such as, suppose that pre-set level is Fatal and Critical, these two ranks are all the ranks that abnormal operation is corresponding.Wherein, the rank of daily record 1 is Critical, so the rank of daily record 1 is pre-set level, therefore daily record 1 can be defined as the daily record of abnormal operation.
Wherein, in this step, if determine that this daily record is the daily record of abnormal operation, then perform step 203, if determine that this daily record is not the daily record of abnormal operation, then return step 201 and continue to detect in real time client.
Step 203: if the daily record of abnormal operation, then obtain the default size daily record of up-to-date generation.
Wherein, field data when there is this abnormal operation is only recorded in the daily record of abnormal operation, which operation is there occurs before not recording this abnormal operation, technical staff performs part operation according to this abnormal operation and before this abnormal operation, just can analyze the reason that abnormal operation occurs, therefore technical staff analyzes the reason of abnormal operation generation except needing the daily record of this abnormal operation, also need the daily record produced before the daily record of this abnormal operation, therefore the default size daily record obtaining up-to-date generation is needed in this step, to report server.The default size daily record of up-to-date generation comprises the daily record that the daily record of this abnormal operation and client produced before the daily record of this abnormal operation.
Such as, suppose that presetting size is 512KB, wherein, daily record 1 is the daily record that abnormal operation occurs, the size of daily record 1 is 2KB, before daily record 1, client creates the daily record of 600KB, then the size obtaining client up-to-date generation before daily record 1 is daily record and the daily record 1 of 510KB, forms by the daily record of the 510KB obtained and daily record 1 daily record that default size is 512KB.
Step 204: obtain perform this operation the mark of module, produce the code line of abnormal operation, the mark of the code storage file at this code line place and the positional information of this code line in this code storage file in this module.
Wherein, client comprises multiple different module, and each module is for performing different operations.Such as, for the client for uploading short-sighted frequency, this client comprises transmission module, taking module, acquisition module and editor module, upper transmission module is used for performing the operation of " uploaded videos ", taking module is used for performing the operation of " capture video ", acquisition module is used for the operation performing " obtaining video from terminal local ", and editor module is used for the operation performing " editing video ".
Each module in client is that technical staff is write out by programming language, so the corresponding one section of program code of this module, and stores program code corresponding to this module with one or more code storage file.Certain module of client is in fact that program code in code storage file corresponding to this module runs in the terminal in executable operations.During program code in this code storage file of terminal operating, if certain code line in this code storage file is made mistakes, then this module can be caused when running to this code line to occur abnormal, the operation that namely this module performs occurs abnormal.
Wherein, the mark of the code storage file at code line place can be the filename of this code storage file, and the positional information of this code line in this code storage file can be the line number of this code line at this code storage file.
Such as, obtain perform " capture video " taking module of operating be designated MODULE_Photo, and obtain the code line that abnormal operation occurs when performing taking module, the code storage file at this code line place is obtained from the code storage file that the taking module of terminal local storage is corresponding, what obtain this code storage file is designated GinuploadStrategyByHTTP.m, the positional information of this code line is being obtained from this code storage file, suppose the code of the 148th row in this code storage file of this code behavior, so the positional information of this code line in this code storage file is line number 148.
Step 205: client is by the version number of the mark of the mark of this module, this code storage file, this positional information and client composition inquiry string;
Wherein, the daily record of this abnormal operation of mark that this inquiry string can be unique.
Such as, this module be designated MODULE_Photo, this code storage file be designated GinuploadStrategyByHTTP.m, this positional information is the 148th row, and the version number of client is 2.5.1.1, then the inquiry string formed is:
“MODULE_Photo_2.5.1.1_GinuploadStrategyByHTTP.m_148”。
Step 206: send the inquiry request message carrying this inquiry string to server, make the daily record number of the self-contained abnormal operation of server lookup.
Wherein, server carries the inquiry request message of this inquiry string receiving, the database self stored is searched according to this inquiry string, this database is used for the corresponding relation of the daily record number of storing queries character string and abnormal operation, if find out the daily record number of corresponding abnormal operation, then send the daily record number of the abnormal operation searched to terminal; If do not find out the daily record number of corresponding abnormal operation, the daily record number then arranging this abnormal operation is 0, send the daily record number 0 of this abnormal operation to terminal, the corresponding relation of the daily record number 0 of the abnormal operation of this inquiry string and setting is stored in a database.
Such as, server comprises database as shown in table 1, and this database is used for the corresponding relation of the daily record number of storing queries character string and abnormal operation.
Table 1
Terminal to server sends inquiry request message, and this inquiry request message carries following inquiry string " MODULE_Photo_2.5.1.1_GinuploadStrategyByHTTP.m_148 ".After server receives this inquiry request message of terminal transmission, according to the inquiry string that this inquiry request message carries, search database as shown in table 1, and the daily record number finding out corresponding abnormal operation is 3, then send the daily record number 3 of the abnormal operation searched to terminal.
Step 207: the daily record number of the abnormal operation that reception server sends.
Such as, the daily record number 3 of the abnormal operation of terminal reception server transmission.
Step 208: if this daily record number is less than predetermined threshold value, then form journal file by the daily record of the default size obtained, send this journal file to server.
Such as, suppose that predetermined threshold value is 5, the daily record number of the abnormal operation of reception is 3, and the daily record number of this abnormal operation is less than predetermined threshold value 5, then the daily record of the default size obtained is formed journal file, send this journal file to server.
Further, before sending this journal file to server, obtain additional information, the filename of journal file is set to the character string be made up of the version number of the mark of the mark of the module obtained, code storage file, positional information, client and additional information, and then sends this journal file to server.
Wherein, additional information comprises at least one in current network condition, user user ID in the client and current timestamp information.Such as, obtaining current network condition is WiFi, and obtaining user ID is 1014987519, and obtaining current timestamp is 2014-08-0111:56:21.339, and the inquiry string obtained in step 205 is:
“MODULE_Photo_2.5.1.1_GinuploadStrategyByHTTP.m_148”。
According to this inquiry string, current network condition is WiFi, user is designated 1014987519, current timestamp is 2014-08-0111:56:21.339, is set to by the filename of the journal file of composition: " MODULE_Photo_2.5.1.1_GinuploadStrategyByHTTP.m_148_WIFI_ 1014987519_2014-08-0111:56:21.339.txt ".Wherein, " .txt " suffix name that is journal file.
This journal file that server receiving terminal sends, stores this journal file.Technical staff like this can obtain client and abnormal reason occurs to the journal file analysis stored.In addition, the filename of journal file is made up of inquiry string and additional information, sometimes technical staff only needs just can understand rough idea according to the filename of journal file, and the reason that client generation is abnormal is analyzed, and do not need to open journal file further, analyze concrete log content, so can improve analysis efficiency.
Further, server receives this journal file, from the filename of this journal file, obtain inquiry string, according to the inquiry string obtained, from the database that self stores, find out the daily record number of corresponding abnormal operation, increase the daily record number of the abnormal operation searched.
Wherein, the daily record number increasing this abnormal operation can be: the daily record number of this abnormal operation is added the numerical value such as 1 or 2.
Such as, server receives journal file, from the filename of journal file, obtain inquiry string is MODULE_Photo_2.5.1.1_GinuploadStrategyByHTTP.m_148, according to the inquiry string obtained, the daily record number finding out corresponding abnormal operation from database as shown in table 1 is 3, then increase the daily record number of the abnormal operation searched, the corresponding relation of the daily record number of the inquiry string after increase and abnormal operation is as shown in table 2.
Table 2
Further, in embodiments of the present invention, server also safeguards a white list.For certain user, these users are on one's own initiative to the exception that server reports client to occur, and server obtains the user ID of these users, the user ID of these users added in white list.
When server periodically or can receive the acquisition instruction of technical staff's input, according to each user ID in white list, send to terminal corresponding to each user ID and obtain log request message.For each terminal, this terminal receives this acquisition log request message, obtains the daily record of the default size of up-to-date generation from this locality, by the daily record of this acquisition composition journal file, this journal file is sent to server.
Because these users are on one's own initiative to the exception that server reports client to occur, so can think that the loyalty of these user customer is higher, technical staff needs preferentially to ensure that these users can normal running client, so server can pull daily record on one's own initiative from the terminal of these users, these users can be obtained the soonest to make technical staff and exception and ruuning situation occur when running client.
Wherein, in step 203, if determine it is the daily record of abnormal operation, also the inquiry string of the daily record for identifying this abnormal operation can first be obtained, search in server the daily record number comprising this abnormal operation according to this inquiry string, if this daily record number is less than predetermined threshold value, then obtain the default size daily record of the up-to-date generation of client again, by the daily record composition journal file obtained, report this journal file to server.When the daily record number so avoiding this abnormal operation comprised in the server reaches predetermined threshold value, terminal also obtains journal file, causes unnecessary operation.
In embodiments of the present invention, the rank of the daily record produced during by obtaining client executing operation, determine that whether this daily record is the daily record of abnormal operation according to this rank, if the daily record of abnormal operation, obtain the daily record of the default size of the up-to-date generation of client, and then obtain the mark of the module performing this operation, the code line of abnormal operation is produced in this module, the mark of the code storage file at this code line place and the positional information of this code line in this code storage file, by the mark of this module, the mark of this code storage file, the version number of this positional information and client forms inquiry string and sends inquiry request message to server, the daily record number of the abnormal operation comprised in server lookup its data storehouse also sends to terminal, if daily record number is less than predetermined threshold value, then the daily record of the default size obtained is formed journal file, and obtain additional information, the filename of daily record is set to the character string that polling character serially adds additional information composition, this journal file is sent to server, because this journal file comprises the daily record of abnormal operation and the daily record of up-to-date generation before this abnormal operation, and when the daily record number of this abnormal operation in server is less than predetermined threshold value, just journal file can be sent, thus the quantity of the journal file of similar mistake is limited, technical staff only checks the daily record of several similar mistake when checking daily record, thus improve investigation efficiency, thus avoid further wasting customer flow, to reach the object of saving customer flow.
Embodiment 3
The invention provides a kind of device reporting daily record, see Fig. 3, this device comprises:
First acquisition module 301, during for detecting that client executing operation and client produce the daily record of this operation, obtains the rank of this daily record according to this operation;
Determination module 302, for determining that according to this rank whether this daily record is the daily record of abnormal operation;
Second acquisition module 303, for obtaining if the daily record of abnormal operation, then obtains the daily record of the default size of the up-to-date generation of client;
Sending module 304, the daily record for the default size that will obtain forms journal file, sends this journal file to server.
Preferably, the first acquisition module 301 comprises:
First acquiring unit, for obtaining the operational circumstances of this operation;
First setting unit, if the operational circumstances of this operation is not for operation exception to occur, is then set to this and operates in rank corresponding in no exceptions situation by the rank of this daily record;
Second setting unit, if the operational circumstances of this operation is for operation exception occurs, then obtains corresponding rank according to the exception of this operation and generation, the rank of this daily record is set to the rank obtained.
Preferably, determination module 302 comprises:
Judging unit, for judging whether this rank is pre-set level;
First determining unit, if so, then determines that this daily record is the daily record of abnormal operation;
Second determining unit, if not, then determine that this daily record is not the daily record of abnormal operation.
Preferably, sending module 304 comprises:
Second acquisition unit, produces the code line of abnormal operation, the mark of the code storage file at this code line place and the positional information of this code line in this code storage file for obtaining in client in the mark of the module performing this operation, this module;
Query unit, for the version number of the mark of the mark according to this module, this code storage file, this positional information and client, querying server comprises the daily record number of this abnormal operation;
Transmitting element, if this daily record number does not reach predetermined threshold value, then sends this journal file to server.
Further, query unit comprises:
Composition subelement, for forming inquiry string by the version number of the mark of the mark of this module, this code storage file, this positional information and client;
Inquiry subelement, for sending inquiry request message to server, this inquiry request message carries this inquiry string, and it comprises the daily record number of this abnormal operation to make server lookup;
Receive subelement, send the daily record number of this abnormal operation for reception server.
Further, this device also comprises:
3rd acquisition module, obtains additional information, and this additional information comprises at least one in current network condition, user user ID in the client and current timestamp information;
Module is set, the filename of this journal file is set to the character string be made up of the version number of the mark of the mark of this module, this code storage file, this positional information, client and this additional information.
In embodiments of the present invention, the rank of the daily record produced during by obtaining client executing operation, determine that whether this daily record is the daily record of abnormal operation according to this rank, if the daily record of abnormal operation, obtain the daily record of the default size of the up-to-date generation of client, and then obtain the mark of the module performing this operation, the code line of abnormal operation is produced in this module, the mark of the code storage file at this code line place and the positional information of this code line in this code storage file, by the mark of this module, the mark of this code storage file, the version number of this positional information and client forms inquiry string and sends inquiry request message to server, the daily record number of the abnormal operation comprised in server lookup its data storehouse also sends to terminal, if daily record number is less than predetermined threshold value, then the daily record of the default size obtained is formed journal file, and obtain additional information, the filename of daily record is set to the character string that polling character serially adds additional information composition, this journal file is sent to server, because this journal file comprises the daily record of abnormal operation and the daily record of up-to-date generation before this abnormal operation, and when the daily record number of this abnormal operation in server is less than predetermined threshold value, just journal file can be sent, thus the quantity of the journal file of similar mistake is limited, technical staff only checks the daily record of several similar mistake when checking daily record, thus improve investigation efficiency, thus avoid further wasting customer flow, to reach the object of saving customer flow.
Embodiment 4
See Fig. 4, it illustrates the terminal structure schematic diagram with Touch sensitive surface involved by the embodiment of the present invention, this terminal may be used for a kind of method reporting daily record implementing to provide in above-described embodiment.Specifically:
Terminal 900 can comprise RF (RadioFrequency, radio frequency) circuit 110, the memory 120 including one or more computer-readable recording mediums, input unit 130, display unit 140, transducer 150, voicefrequency circuit 160, WiFi (wirelessfidelity, Wireless Fidelity) module 170, include the parts such as processor 180 and power supply 190 that more than or processes core.It will be understood by those skilled in the art that the restriction of the not structure paired terminal of the terminal structure shown in Fig. 4, the parts more more or less than diagram can be comprised, or combine some parts, or different parts are arranged.Wherein:
RF circuit 110 can be used for receiving and sending messages or in communication process, the reception of signal and transmission, especially, after being received by the downlink information of base station, transfer to more than one or one processor 180 to process; In addition, base station is sent to by relating to up data.Usually, RF circuit 110 includes but not limited to antenna, at least one amplifier, tuner, one or more oscillator, subscriber identity module (SIM) card, transceiver, coupler, LNA (LowNoiseAmplifier, low noise amplifier), duplexer etc.In addition, RF circuit 110 can also by radio communication and network and other devices communicatings.Described radio communication can use arbitrary communication standard or agreement, include but not limited to GSM (GlobalSystemofMobilecommunication, global system for mobile communications), GPRS (GeneralPacketRadioService, general packet radio service), CDMA (CodeDivisionMultipleAccess, code division multiple access), WCDMA (WidebandCodeDivisionMultipleAccess, Wideband Code Division Multiple Access (WCDMA)), LTE (LongTermEvolution, Long Term Evolution), Email, SMS (ShortMessagingService, Short Message Service) etc.
Memory 120 can be used for storing software program and module, and processor 180 is stored in software program and the module of memory 120 by running, thus performs the application of various function and data processing.Memory 120 mainly can comprise storage program district and store data field, and wherein, storage program district can storage operation system, application program (such as sound-playing function, image player function etc.) etc. needed at least one function; Store data field and can store the data (such as voice data, phone directory etc.) etc. created according to the use of terminal 900.In addition, memory 120 can comprise high-speed random access memory, can also comprise nonvolatile memory, such as at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly, memory 120 can also comprise Memory Controller, to provide the access of processor 180 and input unit 130 pairs of memories 120.
Input unit 130 can be used for the numeral or the character information that receive input, and produces and to arrange with user and function controls relevant keyboard, mouse, action bars, optics or trace ball signal and inputs.Particularly, input unit 130 can comprise Touch sensitive surface 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad, user can be collected or neighbouring touch operation (such as user uses any applicable object or the operations of annex on Touch sensitive surface 131 or near Touch sensitive surface 131 such as finger, stylus) thereon, and drive corresponding jockey according to the formula preset.Optionally, Touch sensitive surface 131 can comprise touch detecting apparatus and touch controller two parts.Wherein, touch detecting apparatus detects the touch orientation of user, and detects the signal that touch operation brings, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 180, and the order that energy receiving processor 180 is sent also is performed.In addition, the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave can be adopted to realize Touch sensitive surface 131.Except Touch sensitive surface 131, input unit 130 can also comprise other input equipments 132.Particularly, other input equipments 132 can include but not limited to one or more in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc.
Display unit 140 can be used for the various graphical user interface showing information or the information being supplied to user and the terminal 900 inputted by user, and these graphical user interface can be made up of figure, text, icon, video and its combination in any.Display unit 140 can comprise display floater 141, optionally, the form such as LCD (LiquidCrystalDisplay, liquid crystal display), OLED (OrganicLight-EmittingDiode, Organic Light Emitting Diode) can be adopted to configure display floater 141.Further, Touch sensitive surface 131 can cover display floater 141, when Touch sensitive surface 131 detects thereon or after neighbouring touch operation, send processor 180 to determine the type of touch event, on display floater 141, provide corresponding vision to export with preprocessor 180 according to the type of touch event.Although in the diagram, Touch sensitive surface 131 and display floater 141 be as two independently parts realize input and input function, in certain embodiments, can by Touch sensitive surface 131 and display floater 141 integrated and realize input and output function.
Terminal 900 also can comprise at least one transducer 150, such as optical sensor, motion sensor and other transducers.Particularly, optical sensor can comprise ambient light sensor and proximity transducer, and wherein, ambient light sensor the light and shade of environmentally light can regulate the brightness of display floater 141, proximity transducer when terminal 900 moves in one's ear, can cut out display floater 141 and/or backlight.As the one of motion sensor, Gravity accelerometer can detect the size of all directions (are generally three axles) acceleration, size and the direction of gravity can be detected time static, can be used for identifying the application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating) of mobile phone attitude, Vibration identification correlation function (such as pedometer, knock) etc.; As for terminal 900 also other transducers such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor, do not repeat them here.
Voicefrequency circuit 160, loud speaker 161, microphone 162 can provide the audio interface between user and terminal 900.Voicefrequency circuit 160 can by receive voice data conversion after the signal of telecommunication, be transferred to loud speaker 161, by loud speaker 161 be converted to voice signal export; On the other hand, the voice signal of collection is converted to the signal of telecommunication by microphone 162, voice data is converted to after being received by voicefrequency circuit 160, after again voice data output processor 180 being processed, through RF circuit 110 to send to such as another terminal, or export voice data to memory 120 to process further.Voicefrequency circuit 160 also may comprise earphone jack, to provide the communication of peripheral hardware earphone and terminal 900.
WiFi belongs to short range wireless transmission technology, and by WiFi module 170, terminal 900 can help that user sends and receive e-mail, browsing page and access streaming video etc., and its broadband internet wireless for user provides is accessed.Although Fig. 4 shows WiFi module 170, be understandable that, it does not belong to must forming of terminal 900, can omit in the scope of essence not changing invention as required completely.
Processor 180 is control centres of terminal 900, utilize the various piece of various interface and the whole mobile phone of connection, software program in memory 120 and/or module is stored in by running or performing, and call the data be stored in memory 120, perform various function and the deal with data of terminal 900, thus integral monitoring is carried out to mobile phone.Optionally, processor 180 can comprise one or more process core; Preferably, processor 180 accessible site application processor and modem processor, wherein, application processor mainly processes operating system, user interface and application program etc., and modem processor mainly processes radio communication.Be understandable that, above-mentioned modem processor also can not be integrated in processor 180.
Terminal 900 also comprises the power supply 190 (such as battery) of powering to all parts, preferably, power supply can be connected with processor 180 logic by power-supply management system, thus realizes the functions such as management charging, electric discharge and power managed by power-supply management system.Power supply 190 can also comprise one or more direct current or AC power, recharging system, power failure detection circuit, power supply changeover device or the random component such as inverter, power supply status indicator.
Although not shown, terminal 900 can also comprise camera, bluetooth module etc., does not repeat them here.Specifically in the present embodiment, the display unit of terminal 900 is touch-screen displays, terminal 900 also includes memory, and one or more than one program, one of them or more than one program are stored in memory, and are configured to be performed by more than one or one processor state more than one or one program package containing the instruction for carrying out following operation:
When detecting that client executing operation and described client produce the daily record of described operation, obtain the rank of described daily record according to described operation;
Determine that whether described daily record is the daily record of abnormal operation according to described rank;
If so, then the daily record of the default size of the up-to-date generation of described client is obtained;
By the daily record of the default size of described acquisition composition journal file, send described journal file to server.
The described rank obtaining described daily record according to described operation, comprising:
Obtain the operational circumstances of described operation;
If for there is not operation exception in the operational circumstances of described operation, then rank corresponding under operating in no exceptions situation described in the rank of described daily record being set to;
If the operational circumstances of described operation is for operation exception occurs, then obtains corresponding rank according to the exception of described operation and generation, the rank of described daily record is set to the rank of described acquisition.
Describedly determine that whether described daily record is the daily record of abnormal operation according to described rank, comprising:
Judge whether described rank is pre-set level;
If so, then determine that described daily record is the daily record of abnormal operation;
If not, then determine that described daily record is not the daily record of abnormal operation.
Describedly send described journal file to server, comprising:
Obtain the code line producing abnormal operation in the mark of the module performing described operation in described client, described module, the mark of code storage file at described code line place and the positional information of described code line in described code storage file;
According to the version number of the mark of described module, the mark of described code storage file, described positional information and described client, querying server comprises the daily record number of described abnormal operation;
If described daily record number does not reach predetermined threshold value, then send described journal file to server.
The version number of the described mark according to described module, the mark of described code storage file, described positional information and described client, querying server comprises the daily record number of described abnormal operation, comprising:
By the version number of the mark of described module, the mark of described code storage file, described positional information and described client composition inquiry string;
Send inquiry request message to described server, described inquiry request message carries described inquiry string, and it comprises the daily record number of described abnormal operation to make described server lookup;
Receive the daily record number that described server sends described abnormal operation.
Described send described journal file to server before, also comprise:
Obtain additional information, described additional information comprises current network condition, the user user ID in described client and at least one in current timestamp information;
The filename of described journal file is set to the character string be made up of the version number of the mark of described module, the mark of described code storage file, described positional information, described client and described additional information.
In embodiments of the present invention, the rank of the daily record produced during by obtaining client executing operation, determine that whether this daily record is the daily record of abnormal operation according to this rank, if the daily record of abnormal operation, obtain the daily record of the default size of the up-to-date generation of client, and then obtain the mark of the module performing this operation, the code line of abnormal operation is produced in this module, the mark of the code storage file at this code line place and the positional information of this code line in this code storage file, by the mark of this module, the mark of this code storage file, the version number of this positional information and client forms inquiry string and sends inquiry request message to server, the daily record number of the abnormal operation comprised in server lookup its data storehouse also sends to terminal, if daily record number is less than predetermined threshold value, then the daily record of the default size obtained is formed journal file, and obtain additional information, the filename of daily record is set to the character string that polling character serially adds additional information composition, this journal file is sent to server, because this journal file comprises the daily record of abnormal operation and the daily record of up-to-date generation before this abnormal operation, and when the daily record number of this abnormal operation in server is less than predetermined threshold value, just journal file can be sent, thus the quantity of the journal file of similar mistake is limited, technical staff only checks the daily record of several similar mistake when checking daily record, thus improve investigation efficiency, thus avoid further wasting customer flow, to reach the object of saving customer flow.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be read-only memory, disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (12)

1. report a method for daily record, it is characterized in that, described method comprises:
When detecting that client executing operation and described client produce the daily record of described operation, obtain the rank of described daily record according to described operation;
Determine that whether described daily record is the daily record of abnormal operation according to described rank;
If so, then the daily record of the default size of the up-to-date generation of described client is obtained;
By the daily record of the default size of described acquisition composition journal file, send described journal file to server.
2. the method for claim 1, is characterized in that, the described rank obtaining described daily record according to described operation, comprising:
Obtain the operational circumstances of described operation;
If for there is not operation exception in the operational circumstances of described operation, then rank corresponding under operating in no exceptions situation described in the rank of described daily record being set to;
If the operational circumstances of described operation is for operation exception occurs, then obtains corresponding rank according to the exception of described operation and generation, the rank of described daily record is set to the rank of described acquisition.
3. the method for claim 1, is characterized in that, describedly determines that whether described daily record is the daily record of abnormal operation according to described rank, comprising:
Judge whether described rank is pre-set level;
If so, then determine that described daily record is the daily record of abnormal operation;
If not, then determine that described daily record is not the daily record of abnormal operation.
4. the method for claim 1, is characterized in that, describedly sends described journal file to server, comprising:
Obtain the code line producing abnormal operation in the mark of the module performing described operation in described client, described module, the mark of code storage file at described code line place and the positional information of described code line in described code storage file;
According to the version number of the mark of described module, the mark of described code storage file, described positional information and described client, querying server comprises the daily record number of described abnormal operation;
If described daily record number does not reach predetermined threshold value, then send described journal file to server.
5. method as claimed in claim 4, it is characterized in that, the version number of the described mark according to described module, the mark of described code storage file, described positional information and described client, querying server comprises the daily record number of described abnormal operation, comprising:
By the version number of the mark of described module, the mark of described code storage file, described positional information and described client composition inquiry string;
Send inquiry request message to described server, described inquiry request message carries described inquiry string, and it comprises the daily record number of described abnormal operation to make described server lookup;
Receive the daily record number that described server sends described abnormal operation.
6. method as claimed in claim 4, is characterized in that, described send described journal file to server before, also comprise:
Obtain additional information, described additional information comprises current network condition, the user user ID in described client and at least one in current timestamp information;
The filename of described journal file is set to the character string be made up of the version number of the mark of described module, the mark of described code storage file, described positional information, described client and described additional information.
7. report a device for daily record, it is characterized in that, described device comprises:
First acquisition module, during for detecting that client executing operation and described client produce the daily record of described operation, obtains the rank of described daily record according to described operation;
Determination module, for determining that according to described rank whether described daily record is the daily record of abnormal operation;
Second acquisition module, for obtaining if the daily record of abnormal operation, then obtains the daily record of the default size of the up-to-date generation of described client;
Sending module, for the daily record composition journal file of the default size by described acquisition, sends described journal file to server.
8. device as claimed in claim 7, it is characterized in that, described first acquisition module comprises:
First acquiring unit, for obtaining the operational circumstances of described operation;
First setting unit, if for there is not operation exception in the operational circumstances of described operation, then rank corresponding under operating in no exceptions situation described in the rank of described daily record being set to;
Second setting unit, if the operational circumstances of described operation is for operation exception occurs, then obtains corresponding rank according to the exception of described operation and generation, the rank of described daily record is set to the rank of described acquisition.
9. device as claimed in claim 7, it is characterized in that, described determination module comprises:
Judging unit, for judging whether described rank is pre-set level;
First determining unit, if so, then determines that described daily record is the daily record of abnormal operation;
Second determining unit, if not, then determine that described daily record is not the daily record of abnormal operation.
10. device as claimed in claim 7, it is characterized in that, described sending module comprises:
Second acquisition unit, for obtaining the code line producing abnormal operation in the mark of the module performing described operation in described client, described module, the mark of code storage file at described code line place and the positional information of described code line in described code storage file;
Query unit, for the version number of the mark according to described module, the mark of described code storage file, described positional information and described client, querying server comprises the daily record number of described abnormal operation;
Transmitting element, if described daily record number does not reach predetermined threshold value, then sends described journal file to server.
11. devices as claimed in claim 10, it is characterized in that, described query unit comprises:
Composition subelement, for forming inquiry string by the version number of the mark of described module, the mark of described code storage file, described positional information and described client;
Inquiry subelement, for sending inquiry request message to described server, described inquiry request message carries described inquiry string, and it comprises the daily record number of described abnormal operation to make described server lookup;
Receiving subelement, sending the daily record number of described abnormal operation for receiving described server.
12. devices as claimed in claim 10, it is characterized in that, described device also comprises:
3rd acquisition module, for obtaining additional information, described additional information comprises current network condition, the user user ID in described client and at least one in current timestamp information;
Module is set, for the filename of described journal file being set to the character string be made up of the version number of the mark of described module, the mark of described code storage file, described positional information, described client and described additional information.
CN201410484552.4A 2014-09-19 2014-09-19 Method and device for reporting log Active CN105429775B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410484552.4A CN105429775B (en) 2014-09-19 2014-09-19 Method and device for reporting log

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410484552.4A CN105429775B (en) 2014-09-19 2014-09-19 Method and device for reporting log

Publications (2)

Publication Number Publication Date
CN105429775A true CN105429775A (en) 2016-03-23
CN105429775B CN105429775B (en) 2020-06-26

Family

ID=55507727

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410484552.4A Active CN105429775B (en) 2014-09-19 2014-09-19 Method and device for reporting log

Country Status (1)

Country Link
CN (1) CN105429775B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294041A (en) * 2016-07-22 2017-01-04 厦门美图移动科技有限公司 Method, device and the mobile terminal of a kind of BUG information reporting
CN107609117A (en) * 2017-09-13 2018-01-19 广东欧珀移动通信有限公司 Log information report method, device and storage medium, ADSP and terminal
CN107979851A (en) * 2017-12-01 2018-05-01 青岛海信移动通信技术股份有限公司 Abnormal data report method and device
CN108170586A (en) * 2017-12-26 2018-06-15 广东欧珀移动通信有限公司 log processing method, device, storage medium and terminal device
CN108762965A (en) * 2018-05-22 2018-11-06 东旭集团有限公司 Daily record lookup method, system and production equipment
CN109257230A (en) * 2018-10-26 2019-01-22 武汉精鸿电子技术有限公司 A kind of Log Administration System and method of semiconductor memory burn-in test
CN109727137A (en) * 2018-12-18 2019-05-07 杭州茂财网络技术有限公司 A kind of log reporting method and system based on consumer's risk evaluation and test
CN110046080A (en) * 2018-11-26 2019-07-23 香港乐蜜有限公司 A kind of method, apparatus that transferring journal file, electronic equipment and storage medium
CN110457195A (en) * 2019-08-05 2019-11-15 深圳乐信软件技术有限公司 Acquisition methods, device, server and the storage medium of client local log
CN110704374A (en) * 2019-08-14 2020-01-17 交控科技股份有限公司 Storage and reading method for rail transit equipment logs
CN111143185A (en) * 2019-12-30 2020-05-12 珠海金山网络游戏科技有限公司 Log-based fault analysis method and device
CN111949551A (en) * 2020-09-01 2020-11-17 网易(杭州)网络有限公司 Application program testing method, device, equipment and storage medium
CN112711518A (en) * 2019-10-25 2021-04-27 腾讯科技(深圳)有限公司 Log uploading method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211625A (en) * 2006-12-25 2008-07-02 上海乐金广电电子有限公司 Optical disk system self-diagnosing control method
CN101815010A (en) * 2009-02-25 2010-08-25 北京启明星辰信息技术股份有限公司 Method and system for reporting system logs
CN102033801A (en) * 2009-09-28 2011-04-27 佳能株式会社 Information processing apparatus that records logs and control method thereof
US20140195505A1 (en) * 2013-01-03 2014-07-10 International Business Machines Corporation Sampling transactions from multi-level log file records
CN103942210A (en) * 2013-01-21 2014-07-23 中国移动通信集团上海有限公司 Processing method, device and system of mass log information

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211625A (en) * 2006-12-25 2008-07-02 上海乐金广电电子有限公司 Optical disk system self-diagnosing control method
CN101815010A (en) * 2009-02-25 2010-08-25 北京启明星辰信息技术股份有限公司 Method and system for reporting system logs
CN102033801A (en) * 2009-09-28 2011-04-27 佳能株式会社 Information processing apparatus that records logs and control method thereof
US20140195505A1 (en) * 2013-01-03 2014-07-10 International Business Machines Corporation Sampling transactions from multi-level log file records
CN103942210A (en) * 2013-01-21 2014-07-23 中国移动通信集团上海有限公司 Processing method, device and system of mass log information

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294041A (en) * 2016-07-22 2017-01-04 厦门美图移动科技有限公司 Method, device and the mobile terminal of a kind of BUG information reporting
CN107609117B (en) * 2017-09-13 2020-09-01 Oppo广东移动通信有限公司 Log information reporting method and device, storage medium, ADSP and terminal
CN107609117A (en) * 2017-09-13 2018-01-19 广东欧珀移动通信有限公司 Log information report method, device and storage medium, ADSP and terminal
CN107979851A (en) * 2017-12-01 2018-05-01 青岛海信移动通信技术股份有限公司 Abnormal data report method and device
CN107979851B (en) * 2017-12-01 2021-07-30 青岛海信移动通信技术股份有限公司 Abnormal data reporting method and device
CN108170586A (en) * 2017-12-26 2018-06-15 广东欧珀移动通信有限公司 log processing method, device, storage medium and terminal device
CN108762965A (en) * 2018-05-22 2018-11-06 东旭集团有限公司 Daily record lookup method, system and production equipment
CN109257230A (en) * 2018-10-26 2019-01-22 武汉精鸿电子技术有限公司 A kind of Log Administration System and method of semiconductor memory burn-in test
CN110046080A (en) * 2018-11-26 2019-07-23 香港乐蜜有限公司 A kind of method, apparatus that transferring journal file, electronic equipment and storage medium
CN109727137A (en) * 2018-12-18 2019-05-07 杭州茂财网络技术有限公司 A kind of log reporting method and system based on consumer's risk evaluation and test
CN110457195A (en) * 2019-08-05 2019-11-15 深圳乐信软件技术有限公司 Acquisition methods, device, server and the storage medium of client local log
CN110457195B (en) * 2019-08-05 2023-12-26 深圳乐信软件技术有限公司 Method and device for obtaining local log of client, server and storage medium
CN110704374A (en) * 2019-08-14 2020-01-17 交控科技股份有限公司 Storage and reading method for rail transit equipment logs
CN110704374B (en) * 2019-08-14 2022-02-15 交控科技股份有限公司 Storage and reading method for rail transit equipment logs
CN112711518A (en) * 2019-10-25 2021-04-27 腾讯科技(深圳)有限公司 Log uploading method and device
CN112711518B (en) * 2019-10-25 2024-04-12 腾讯科技(深圳)有限公司 Log uploading method and device
CN111143185A (en) * 2019-12-30 2020-05-12 珠海金山网络游戏科技有限公司 Log-based fault analysis method and device
CN111949551A (en) * 2020-09-01 2020-11-17 网易(杭州)网络有限公司 Application program testing method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN105429775B (en) 2020-06-26

Similar Documents

Publication Publication Date Title
CN105429775A (en) Method and device for reporting log
CN103327189B (en) Method and device for uploading, browsing and deleting pictures
CN104123120B (en) A kind of browser page data filtering method, device and system
CN104915241A (en) Virtual machine migration control method and device
CN105005909A (en) Method and device for predicting lost users
CN105824958A (en) Method, device and system for inquiring log
CN104462119A (en) Data migration method and device
CN104301315A (en) Method and device for limiting information access
CN105119806A (en) Message updating method and device
CN104572819A (en) Clearing method and system for junk data
CN103678502B (en) Information collection method and device
CN104717341A (en) Message prompting method and terminal
CN104111927A (en) Method, equipment and system for information classification
CN103177217B (en) A kind of file scanning method, system and client and server
CN104281600A (en) Method and device for intelligent selecting words
CN104104711A (en) Reading history processing method and device
CN104063400A (en) Data search method and data search device
CN103607431B (en) Mobile terminal resource processing method, device and equipment
CN103631625A (en) Data acquisition method, user terminal, server and system
CN103944922B (en) Data processing method, terminal, server and system
CN103631592B (en) A kind of configuration, call method, device and equipment that shows resource
CN103383701A (en) Information retrieving method, device and terminal
CN103399706A (en) Page interaction method, device and terminal
CN103561155B (en) Send the method for note, device and terminal
CN104869550A (en) Communication event processing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant