CN104935465B - Log production method and device and server, the medium of client application - Google Patents

Log production method and device and server, the medium of client application Download PDF

Info

Publication number
CN104935465B
CN104935465B CN201510336584.4A CN201510336584A CN104935465B CN 104935465 B CN104935465 B CN 104935465B CN 201510336584 A CN201510336584 A CN 201510336584A CN 104935465 B CN104935465 B CN 104935465B
Authority
CN
China
Prior art keywords
time
log
client
application
operation log
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510336584.4A
Other languages
Chinese (zh)
Other versions
CN104935465A (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201510336584.4A priority Critical patent/CN104935465B/en
Publication of CN104935465A publication Critical patent/CN104935465A/en
Application granted granted Critical
Publication of CN104935465B publication Critical patent/CN104935465B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/18Delegation of network management function, e.g. customer network management [CNM]

Landscapes

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

Abstract

The present invention provides the log production method and device and server of a kind of client application, the log production method of client application includes: application server time obtaining step, by the connection thread established with application server, the time of application server is obtained;Step is generated with operation log, the request time that the time of the application server obtained in the application server time obtaining step is operated as client application generates operation log.

Description

Log production method and device and server, the medium of client application
Technical field
The present invention relates to the log production method and device and server of client application more particularly to users The method and apparatus for generating operation log when operating application program, and the log uploaded from client is counted, is analyzed Server.
Background technique
In order to analyze the behavioural habits on website with counting user, the operation trace by user on website is needed to remember Record is got off.As mobile end subscriber is more and more, the operation log statistics of client also becomes particularly important.
In the prior art, as shown in figure 5, when user's operation application program app, each step can all generate operation log, In the program of record log, using request time of the time of mobile client as operation log is obtained, log is kept in Log is uploaded in batches in the case where the conditions permits such as network in mobile client to server.
By analyzing the matter of time of log, discovery mobile terminal application product is during recording operation log, generally Use " client time " " request time " as user's operation.But client time disunity, user can be according to certainly Oneself daily habits are freely set, so the mobile terminal operation log being thus collected into, no matter from client angle or from clothes All there is large error in the behavior of business device end angle analysis user.
Request time using the time of client as operation log, if user according to oneself daily habits again The mobile terminal time is set, the log stored at this time there is certain error about temporal record, influence from time angle Degree analyzes the behavioural habits of mobile end subscriber, so as to generate the guidance of mistake.
Summary of the invention
Therefore, in order to solve the problems in the existing technology, the present invention is proposed.It is an object of the invention to improve point The accuracy for analysing user behavior habit, by the mobile client sync server end time, using server time as user In the request time of client operation log, make to aim at the day being collected into unified, true, effective on request time.
On the other hand, the present invention records the standard network time of user's there and then simultaneously, for correcting because of the region time difference The time error of generation, the behavioural habits for analyzing different geographical, having time difference user improve the standard of analysis user behavior habit True property.
To achieve the goals above, according to the invention it is proposed that a kind of log production method of client application, packet Include: application server time obtaining step, by the connection thread established with application server, obtain application server when Between;Step is generated with operation log, the time of the application server obtained in the application server time obtaining step is made For the request time that client application is operated, operation log is generated.
In addition, according to the above method connection thread can also be made in the application server time obtaining step Including variable synchronization time, using the time of the application server got in the communication with the application server as described same The value for walking time variable generates in step in the operation log, obtains variable synchronization time of the connection thread Value is used as the request time.
In addition, variable synchronization time can also be made to have from the function of increasing according to the above method.
In addition, according to the above method application service can also be executed when each client application is operated Device time obtaining step and the operation log generate step.
In addition, according to the above method, the application server can also be executed when client application is activated every time Time obtaining step when each client application is operated, executes the operation log and generates step.
In addition, can also be judged whether there is described when each client application is operated according to the above method Thread is connected, if the connection thread exists, is obtained described in the value conduct of variable synchronization time for connecting thread Request time establishes the connection thread if the connection thread is not present.
In addition, can also include: the step of obtaining the standard network time of user locality according to the above method;With by institute The step in log is recorded in the standard network time of acquisition.
Further it is proposed that the log production method of client application a kind of, comprising: the application server time Obtaining step obtains the time of application server by the connection thread established with application server;Request time correction step Suddenly, according to the time of the application server obtained in client local zone time and the application server time obtaining step, school The request time that the client application recorded in positive operation log is operated;Step is reported with operation log, it will be by described The corrected operation log of request time aligning step is reported to server.
Further it is proposed that the log generation device of client application a kind of, comprising: the application server time Acquiring unit obtains the time of application server by the connection thread established with application server;It is generated with operation log Unit, the time for the application server that the application server time acquisition unit is obtained is as client application quilt The request time of operation generates operation log.
Further it is proposed that a kind of service for being counted, being analyzed using operation log caused by the above method Device.
According to the present invention, by the connection thread established with application server, the time of application server is obtained, will be obtained The time of the application server taken generates operation log as the request time that client application is operated, and improves record The accuracy of operation log so that aim at the day being collected into it is authentic and valid on request time, thus improve analysis user behavior practise Used accuracy.
It include variable synchronization time by making the connection thread established with application server in addition, according to the present invention, it will be with Initial value of the time of the application server got in the communication of application server as variable synchronization time further makes same Walking time variable has the request operated using the value of variable synchronization time as client application from the function of increasing Time generates operation log, thus on the basis of maintaining existing statistical log mode to the full extent, in mobile client The sync server end time improves record operation using server time as user in the request time of client operation log The accuracy of log so that aim at the day being collected into it is authentic and valid on request time, thus improve analysis user behavior habit Accuracy.
In addition, according to the present invention, by the way that the standard network time of user's there and then to be recorded in log, correcting because of ground The time error that the domain time difference generates, improves the accuracy of analysis user behavior habit, and can be used in analyzing different geographical, have The behavioural habits of time difference user.
Detailed description of the invention
Detailed description by reference to following combination attached drawing to used preferred embodiment, above-mentioned mesh of the invention , advantages and features will become more apparent from, in which:
Fig. 1 is the structural schematic diagram of the log generation device of client application of the invention.
Fig. 2 is the general flowchart of the log production method of client application of the invention.
Fig. 3 is the detail flowchart of the log production method of client application of the invention.
Fig. 4 is the flow chart that the log of client application of the invention reports.
Fig. 5 is the flow chart of the log production method of existing client application.
Specific embodiment
In the following, referring to attached drawing, the present invention is described in detail.
Present inventors noted that user opens application program in mobile client, when each run application program, It needs to establish connection thread with application server, can be got in the communication with application server using the thread using clothes The time of business device.Accordingly, the present invention is completed.
Fig. 1 is the structural schematic diagram of the log generation device of client application of the invention.Fig. 2 is visitor of the invention The general flowchart of the log production method of family end application program.As shown in Figure 1, the log generation device of client application Unit 102 is generated including application server time acquisition unit 101 and operation log.Application server time acquisition unit is used for By the connection thread established with application server, the time of application server is obtained.Operation log generates unit for that will answer The request time that the time for the application server for using server time acquiring unit to obtain is operated as client application, Generate operation log.
As shown in Fig. 2, user opens application program in mobile client, S201 when generating operation to application program every time, By the connection thread established with application server, the time S202 of application server is obtained.By by accessed application The request time that the time of server is operated as client application generates operation log S203.Hereby it is possible to improve Record operation log accuracy so that aim at the day being collected into it is authentic and valid on request time, thus improve analysis user's row For the accuracy of habit.
In addition, client application can also use as prior art in other embodiments of the invention Client local zone time generates operation log as the request time that client application is operated, unlike the prior art , when reporting operation log to server, using the time and client local zone time of server to remembering in operation log The request time of record is corrected, and reports corrected operation log to server.
In addition, in the present invention, on the basis of maintaining existing statistical log mode to the full extent, in mobile visitor The family end sync server end time improves record using server time as user in the request time of client operation log The accuracy of operation log, in the connection thread that user establishes when mobile client opens application program with application server Increase by one synchronization time variable SynchronizationTime, utilize synchronization time variable SynchronizationTime To obtain the request time that the time of application server is operated as client application, generation operation log.
In the following, present embodiment is described in detail referring to Fig. 3.
Fig. 3 is the detail flowchart of the log production method of client application of the invention.In the following, mainly to this hair The bright difference with the prior art (referring to Fig. 5) is illustrated.As shown in figure 3, in the present invention, user opens in mobile client Application program when each run application program, increases in the connection thread established with application server and becomes a synchronization time SynchronizationTime is measured, the time ServiceTime of application server is obtained in the communication with application server, ServiceTime is assigned to SynchronizationTime, the initial value S303 as SynchronizationTime.Often When the secondary generation operation S301 to application program, first judge that the connection thread of the application program and application server whether there is S302, if the thread has (in step S302: yes), the value for obtaining the SynchronizationTime in the thread is made For the request time requestTime S305 of user's operation, S307 in log is recorded.If (step is not present in the thread In S302: no), such as the thread is killed or exception, then application program can re-establish connection thread, repeat step S303. In addition, SynchronizationTime is assigned from the function of increasing, it can be at any time with the frequency steady-state growth of millisecond.
In addition, available user was at that time in order to the behavioural habits accurately analyzed different geographical, have time difference user Local standard network time S306, is recorded in log.For step S306, when can both operate application program every time It repeats, can also only be executed when starting application program primary.
In the case where the conditions permits such as network (step S308: yes), batch upload log to server (step S310), Otherwise, continue record log (step S309).
Fig. 4 is the flow chart that the log of client application of the invention reports, and shows the one of log report flow Example.Log, which reports, follows following judgment rule: will do it verification when writing log every time: (1) whether calibration database log reaches To predetermined item number, such as 10000;(2) whether log is written success;(3) whether the database time meets and calls time.
On to respond with item number preferential, directly reported after meeting item number, if really bar number is unsatisfactory for, then judge that time, time meet It then carries out log to report, otherwise not report.
Time determines: when the difference of the write time of newest log and the write time of first log are as determining in database Between.
Meet report condition, started counting from first item record, is counted after meeting upper tape number, data are packaged, and are gone forward side by side Row base64 compression reports to server after encryption, local to have reported deletion after server returned data is properly received mark Data.
In addition, can also be obtained only when each client application is activated in other embodiments of the invention Take the time of application server.
In the server, it is counted using log caused by log production method of the invention, to analyze user couple In the behavioural habits of application program.Because aim at collected day it is authentic and valid on request time, so as to improve analysis The accuracy of user behavior habit.
Although having been combined the preferred embodiment of the present invention above shows the present invention, those skilled in the art will It will be appreciated that without departing from the spirit and scope of the present invention, can carry out various modifications, replace and change to the present invention Become.Therefore, the present invention should not be limited by above-described embodiment, and should be limited by appended claims and its equivalent.

Claims (18)

1. a kind of log production method of client application, comprising:
Application server time obtaining step obtains application clothes in client by the connection thread established with application server The time of business device;With
Operation log generates step, when client generates the operation log of client application, by the application server The request time that the time of the application server obtained in time obtaining step is operated as client application generates behaviour Make log.
2. according to the method described in claim 1, wherein,
In the application server time obtaining step, making the connection thread includes variable synchronization time, will be answered with described Use the time of the application server got in the communication of server as the value of variable synchronization time,
It generates in step in the operation log, is asked described in the value conduct for obtaining variable synchronization time of the connection thread Seeking time.
3. according to the method described in claim 2, wherein,
There is variable synchronization time from the function of increasing.
4. according to the method described in claim 1, wherein,
When each client application is operated, executes the application server time obtaining step and the operation log produces Raw step.
5. according to the method described in claim 1, wherein,
When each client application is activated, the application server time obtaining step, each client application are executed When program is operated, executes the operation log and generate step.
6. according to the method described in claim 3, wherein,
When each client application is operated, the connection thread is judged whether there is,
If the connection thread exists, when obtaining the value of variable synchronization time of the connection thread as the request Between,
If the connection thread is not present, the connection thread is established.
7. method as claimed in any of claims 1 to 6, wherein further include:
The step of obtaining the standard network time of user locality;With
The step in log is recorded in the acquired standard network time.
8. according to the method described in claim 1, wherein, further includes:
Operation log reports step, will generate operation log caused by step as the operation log and be reported to server,
It is operated when the quantity of the operation log reaches predetermined quantity, or in the write time of current operation log and first item When calling time in the difference satisfaction of the write time of log, executes the operation log and report step.
9. a kind of log production method of client application, comprising:
Application server time obtaining step obtains application clothes in client by the connection thread established with application server The time of business device;
Operation log generates step, in the request that client uses client local zone time to be operated as client application Time generates operation log;
Request time aligning step, in client according in client local zone time and the application server time obtaining step The time of the application server of acquisition, the request time recorded in correct operation log;With
Operation log reports step, and client will be reported to service by the corrected operation log of request time aligning step Device.
10. a kind of log generation device of client application, comprising:
Application server time acquisition unit obtains application in client by the connection thread established with application server The time of server;With
Operation log generates unit, when client generates the operation log of client application, by the application service The request time that the time for the application server that device time acquisition unit obtains is operated as client application generates behaviour Make log.
11. a kind of counted using operation log caused by method described in any one of claim 1 to 6, analyzed Server.
12. the server that operation log caused by a kind of method using method of claim 7 is counted, analyzed.
13. a kind of server for being counted, being analyzed using operation log caused by method according to any one of claims 8.
14. a kind of server for being counted, being analyzed using operation log caused by method as claimed in claim 9.
15. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer to refer to It enables, the log such as client application described in any one of claims 1 to 6 is realized when described instruction is executed by processor Production method.
16. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer to refer to It enables, the log production method of client application as claimed in claim 7 is realized when described instruction is executed by processor.
17. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer to refer to It enables, the log production method of client application as claimed in claim 8 is realized when described instruction is executed by processor.
18. a kind of computer readable storage medium, which is characterized in that the computer-readable recording medium storage has computer to refer to It enables, the log production method of client application as claimed in claim 9 is realized when described instruction is executed by processor.
CN201510336584.4A 2015-06-17 2015-06-17 Log production method and device and server, the medium of client application Active CN104935465B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510336584.4A CN104935465B (en) 2015-06-17 2015-06-17 Log production method and device and server, the medium of client application

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510336584.4A CN104935465B (en) 2015-06-17 2015-06-17 Log production method and device and server, the medium of client application

Publications (2)

Publication Number Publication Date
CN104935465A CN104935465A (en) 2015-09-23
CN104935465B true CN104935465B (en) 2019-01-01

Family

ID=54122441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510336584.4A Active CN104935465B (en) 2015-06-17 2015-06-17 Log production method and device and server, the medium of client application

Country Status (1)

Country Link
CN (1) CN104935465B (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603255B (en) * 2015-10-14 2021-04-20 中兴通讯股份有限公司 Method and device for managing time information in network management system
CN105242974A (en) * 2015-10-27 2016-01-13 广州视睿电子科技有限公司 Time acquiring method and apparatus
CN106776802A (en) * 2016-11-23 2017-05-31 山东浪潮云服务信息科技有限公司 A kind of data processing method and device
CN108243029B (en) * 2016-12-23 2021-02-19 北京国双科技有限公司 Method for restoring generation time of log, client and server
CN109213652A (en) * 2017-06-30 2019-01-15 北京嘀嘀无限科技发展有限公司 User behavior data acquisition method and device
CN107562815B (en) * 2017-08-16 2022-05-27 深圳市合和舍科技有限公司 Statistical method and device for client application platform
CN107767716B (en) * 2017-10-27 2020-06-30 广东小天才科技有限公司 Data processing method and device, mobile terminal and storage medium
CN108449206B (en) * 2018-03-12 2020-11-27 新华三技术有限公司 Time synchronization method, device, equipment and storage medium
CN108509293A (en) * 2018-03-21 2018-09-07 四川斐讯信息技术有限公司 A kind of user journal timestamp fault-tolerance approach and system
CN108874568B (en) * 2018-05-30 2023-08-29 杭州吉吉知识产权运营有限公司 Correction method and system for historical data timestamp of intelligent water cup
CN109120366B (en) * 2018-07-09 2021-10-29 平安科技(深圳)有限公司 Log time correction method, device and storage medium based on SIP protocol
CN109409040B (en) * 2018-10-31 2020-09-11 厦门市美亚柏科信息股份有限公司 Method and device for judging time reliability of operating system
CN110213347B (en) * 2019-05-15 2021-12-07 国网江苏省电力有限公司常州供电分公司 Control method of communication manager and communication manager
CN112804565B (en) * 2019-11-14 2023-08-11 上海哔哩哔哩科技有限公司 Interactive video playing method, device, system, computer equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103997432A (en) * 2013-07-31 2014-08-20 中国人民解放军理工大学 Measuring system and method for supporting analysis of OpenFlow application performance

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741597A (en) * 2008-11-26 2010-06-16 英业达股份有限公司 Server system for automatically correcting time and method thereof
CN101546169B (en) * 2009-04-15 2010-11-10 北京航空航天大学 Method and device for calibrating time
CN101866399A (en) * 2009-04-16 2010-10-20 成都市华为赛门铁克科技有限公司 Method and terminal for offline file control
CN104601349B (en) * 2013-10-30 2017-12-05 北京灵集科技有限公司 The bearing calibration of network behavior logging time and device
JP2015092907A (en) * 2013-11-08 2015-05-18 ブラザー工業株式会社 Sewing machine, method for controlling sewing machine, and program for controlling sewing machine

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103997432A (en) * 2013-07-31 2014-08-20 中国人民解放军理工大学 Measuring system and method for supporting analysis of OpenFlow application performance

Also Published As

Publication number Publication date
CN104935465A (en) 2015-09-23

Similar Documents

Publication Publication Date Title
CN104935465B (en) Log production method and device and server, the medium of client application
US20230385170A1 (en) Systems and methods for collecting, tracking, and storing system performance and event data for computing devices
JP6423486B2 (en) Method, apparatus and storage medium for sharing online media impression data
CN104246767B (en) Telemetry system for cloud synchronization system
CN104994133B (en) A kind of mobile Web web page access user experience perception evaluating method based on network KPI
WO2016101464A1 (en) Quality of experience estimation method, device, terminal and server
CN106951765A (en) A kind of zero authority mobile device recognition methods based on browser fingerprint similarity
CN106303515A (en) A kind of online live video quality detecting method and device
US11830040B2 (en) Methods and apparatus to expand panelist enrollment
US10740118B1 (en) Monitoring mobile device usage
US9571360B2 (en) Method and score management node for supporting service evaluation
JP2006053616A (en) Server device, web site recommendation method and program
KR101744696B1 (en) Method, device, program and recording medium for filtering information
US10271225B2 (en) Performance index determination for a communication service
US8543066B2 (en) User experienced remote monitoring of a communications network
CN109491702A (en) A kind of prioritization scheme determines method, apparatus, terminal device and storage medium
JP2012008873A (en) Attribute information update method and information update method
CN110971673B (en) Computer device and method for acquiring user activity of deep learning platform
CN105788055A (en) Voting system and method for social networking site
CN108628901A (en) A kind of data-updating method and device
US10616306B2 (en) System and method for large-scale capture and tracking of web-based application parameters
CN107786420B (en) Message revocation method, message revocation server and user equipment
Seufert et al. Mind the (QoE) gap: On the incompatibility of web and video QoE models in the wild
US20160232150A1 (en) Method and System for Generating a User Activity Grid Table
CN107861984B (en) Method, storage medium, device and system for acquiring state of active entry

Legal Events

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