CN104598371A - User behavior data collecting method - Google Patents

User behavior data collecting method Download PDF

Info

Publication number
CN104598371A
CN104598371A CN201510041172.8A CN201510041172A CN104598371A CN 104598371 A CN104598371 A CN 104598371A CN 201510041172 A CN201510041172 A CN 201510041172A CN 104598371 A CN104598371 A CN 104598371A
Authority
CN
China
Prior art keywords
user
behavior data
user behavior
queue
data acquisition
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510041172.8A
Other languages
Chinese (zh)
Inventor
赵一峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Pinguo Technology Co Ltd
Original Assignee
Chengdu Pinguo 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 Chengdu Pinguo Technology Co Ltd filed Critical Chengdu Pinguo Technology Co Ltd
Priority to CN201510041172.8A priority Critical patent/CN104598371A/en
Publication of CN104598371A publication Critical patent/CN104598371A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

The invention relates to the technical field of data collection, and discloses a user behavior data collecting method, which concretely comprises the following steps of step I, after a program is started, starting a monitor thread, wherein the monitor thread is used for putting user behavior data into a queue when a user runs the program, and the behavior data comprises a user operation id and relevant operating information; step II, acquiring one user behavior data from the queue, and assembling the behavior data to form a meaningful statement according to defined vocabularies and semantemes, wherein the vocabularies are all pre-defined possible user behaviors; step III, saving the meaningful statement assembled by the step II into a log file, and deleting a record from the queue. Through the method, the user behavior data can be collected effectively.

Description

A kind of user behavior data acquisition method
Technical field
The present invention relates to data acquisition technology field, particularly relate to a kind of user behavior data acquisition method.
Background technology
By gathering and analyze the behavioral data of user, use habit and the experience of user can being understood, be convenient to software developer and carry out software improvement, simultaneously by understanding the use habit of user, also directedly can push some services.
The operating system inside of mobile electronic device self provides a large amount of API(Application Programming Interface, application programming interface), call when programming to facilitate software developer.Generally can call the direct recording user operation id of relevant API to upload onto the server again to file, but the Limited information that can collect like this, exist to cause because log file is excessive simultaneously and upload slower risk, and be unfavorable for the data mining of server, easily cause server interface pressure excessive, monitor the energy consumption that behavior also can strengthen mobile device simultaneously.
Summary of the invention
For the above-mentioned technical matters that user behavior data acquisition method of the prior art exists, the invention discloses a kind of new user behavior data acquisition method.
Goal of the invention of the present invention is realized by following technical proposals:
A kind of user behavior data acquisition method, after it specifically comprises the following steps: that step one, program start, monitoring thread starts, and described monitoring thread is used for when user operation program, puts in queue by the behavioral data of user; Wherein behavioral data comprises user operation id and relevant operation information; Step 2, from queue, obtain the behavioral data of a user, then according to the vocabulary defined and semanteme, behavior data assembling is become a significant statement, described vocabulary is all possible user behavior that predefined is good; Step 3, by step 2 assemble significant statement be saved in log file, then in queue, delete this record.Effectively gathered by the behavioral data of the method by user.
Further, said method also comprises when there is new statement and needing to preserve, and judges whether the threshold value of log file is greater than the threshold value of setting, is, creates new log file, otherwise be kept in original log file by statement.
Further, said method also comprises when step 3 performs, and adds the execution of an overall lock protection step 3.Prevent from uploading logging modle while keeping records to this locality also to go to operate this log file, thus cause conflict.
Further, said method also comprises when user does not operate, and monitoring thread is in dormant state, just wakes up during executable operations.Energy consumption is saved to the full extent by such method.
Further, above-mentioned when user operation program, the behavioral data of user is put in queue and is specially: needing the pre-buried statistics point in the place of counting user operation behavior.
Further, above-mentioned vocabulary comprises user operation id sublist, software function module sublist, user operation behavior sublist and operating result sublist.
Further, said method also comprises judging in queue whether also have data, if having, then continue the behavioral data obtaining user from queue, if nothing, then continues monitoring, waits for user operation.
Further, said method also comprises when program determination, and monitoring thread also terminates.
Further, said method also comprise by the user behavior data of record timing upload onto the server.Wherein timing can be regular time point, such as 0 point, 7 points, and 12 points also can be that regular time is poor, such as interval 4 hours etc.
By adopting above technical scheme, the invention has the beneficial effects as follows: the behavioral data of user is the significant operation based on vocabulary composition, and convenient service device end carries out data mining.The time interval and the minimum threshold values uploading log file size of uploading are set, are convenient to the pressure alleviating server, save cost.Consider the performance issue of mobile device, the maximum threshold values of log file is set.Use and run circulation and signalling technique, only have during user operation and just can wake monitoring thread up, to reach the lowest energy consumption of this thread.
Accompanying drawing explanation
Fig. 1 is the process flow diagram that user behavior data of the present invention gathers.
Fig. 2 is process flow diagram of being uploaded onto the server by user behavior data of the present invention.
Embodiment
In order to make object of the present invention, technical scheme and advantage clearly understand, below in conjunction with specific embodiment, the present invention is described in more detail.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.
The invention discloses a kind of user behavior data acquisition method, it specifically comprises the following steps:
Step one, the user behavior gathered as required in advance define vocabulary, and described vocabulary comprises all possible operation behavior of user; Described vocabulary can set in the following way, and it comprises user operation id sublist, software function module sublist, user operation behavior sublist and operating result sublist.The implication that described user operation id sublist represents for recording each id, such as: id_1_1 represents to take pictures in user interface of finding a view; Described software function module sublist for recording the software module of practical function, such as: Camera represents camera model; Described user operation behavior sublist is used for the behavior of recording user, such as: Click_Camera_Button represents and clicks button of taking pictures; Described operating result sublist is used for statistical operation result, such as: GetUserInfo_Requst_Result represents the result obtaining user's request.
Step 2, needing the pre-buried statistics point in the place of counting user operation behavior; Such as: we need the behavior of taking pictures of counting user, in the response function of photographing operation, then take out the id_1_1 in user operation id sublist, because the behavior is that camera model produces, then take out Camera again, then take out the information such as operation behavior Click_Camera_Button of user.
Step 3, when the program is started, open two threads, one for supervisory user behavior, obtain behavioral data, one is recorded to server for uploading.
Step 4, when user operation, by the user operation id of pre-buried for correspondence point and relevant operation information (such as: id_1_1, Camera, Click_Camera_Button etc.) composition a dictionary structure, as follows:
{
EventId = “id_1_1”,
In = “Camera”,
Action = “Click_Camera_Button”,
UserId = “A792C1D15AEF”,
…….
}
And put it in a safe queue.
Step 5, from queue obtain a dictionary data, then from dictionary, take out the value of corresponding informance, again the value of correspondence is changed into a string (such as: EventId:id_1_1 UserId:A792C1D15AEF Action:Click_Camera_Button In:Camera that is to say and there occurs event id_1_1, and user A792C1D15AEF clicks at camera model button of taking pictures) according to semantic format.
Step 6, check the size of local state-of-the-art record file, if be greater than the threshold values (can 50KB be set to, but be not limited to 50KB) of setting, then the log file that establishment one is new, if be less than the threshold values of setting, then keeping records is in the up-to-date log file in this locality.
Step 7, by this record (record namely preserved in step 6) delete from queue.And judge whether also have data in queue, if having, then get back to step 5, if nothing, then continue monitoring, wait for user operation.If program determination, then monitor and also terminate.
A concrete preference
When behavioral data is put into safe queue; add an overall lock; for the protection of the execution of this section of code; prevent from uploading logging modle while keeping records to this locality also to go to operate this log file; thus cause conflict, if successfully pin, then perform next step: from queue, obtain data; take out the message structure that this user operation is relevant, then according to semanteme, the information in this structure is assembled into a significant statement.
The process flow diagram that user behavior data of the present invention as shown in Figure 1 gathers.
1) first vocabulary is defined, wherein, vocabulary is divided into user operation id sublist (mainly to specify the concrete meaning of an id representative, such as: id_1_1 – > user takes pictures at interface of finding a view), (this sublist mainly represents the id of its function to software function module sublist, such as: Camera – > camera model), user operation behavior sublist (mainly indicates active user and what has done, such as: Click_Camera_Button – > clicks button of taking pictures), operating result sublist (is mainly used in statistical operation result needs, such as: GetUserInfo_Requst_Result – > obtains the result of user information request) etc.
2) the pre-buried statistics point in the place of counting user operation behavior is being needed (such as: we need the behavior of taking pictures of counting user, in the response function of photographing operation, then take out the id_1_1 in user operation id sublist, because the behavior is that camera model produces, then take out Camera again, then the information such as the operation behavior Click_Camera_Button taking out user)
3) when program starts, two threads will be opened, one for supervisory user behavior, obtain behavioral data, one is recorded to server for uploading.
4) use operation circulating technology, monitoring thread run always, but consider the performance of mobile device, when user's undo, this thread is in dormant state, just wakes up during executable operations, saves energy consumption to the full extent to reach.
5) when user operation, by the user operation id of pre-buried for correspondence point and relevant operation information (such as: id_1_1, Camera, Click_Camera_Button an etc.) composition structure, and put it in a safe queue.
6) lock that interpolation one is overall, for the protection of the execution (mainly prevent from uploading logging modle while keeping records to this locality also to go to operate this log file, thus cause conflict) of this section of code, if successfully pin, then performs next step.
7) from queue, data are obtained, take out the message structure that this user operation is relevant, then according to semanteme, the information in this structure is assembled into a significant statement (such as: EventId:id_1_1 UserId:A792C1D15AEF Action:Click_Camera_Button In:Camera that is to say and there occurs event id_1_1, and user A792C1D15AEF clicks at camera model button of taking pictures).
8) check the size of local state-of-the-art record file, if be greater than the threshold values (can 50KB be set to, but be not limited to 50KB) of setting, then perform 9), if be less than the threshold values of setting, then perform 10).
9) log file that establishment one is new.
10) keeping records is in the up-to-date log file in this locality.
11) unlock, then this record is deleted from queue.
12) judge whether queue is empty, if not, then gets back to 6) step, if so, then continues monitoring, waits for user operation.
13) if program determination, then monitor and also terminate.
On the basis that above-mentioned user behavior data gathers, the user behavior data of record can also be uploaded onto the server by the present invention.
The process flow diagram that user behavior data is uploaded onto the server of the present invention as shown in Figure 2.
1) according to the uplink time strategy (be not limited to certain moment, software developer can customize the time of uploading) of software developer's setting, determine when prepare to upload
2) acquisition uploaded the successful time last time, then obtained the time in this moment, and the two subtracts each other, obtain the time interval of uploading for twice, if be greater than interval threshold values (this threshold values can get 24 hours, but is not limited to 24 hours), then continue next step, otherwise this is no longer uploaded.
3) file generated the earliest in local record file is obtained
4) size of inspection record file, if this file size is greater than a threshold values (can get 5KB, but be not limited to 5KB), then perform next step, otherwise this is no longer uploaded.
5) this segment data code (while mainly preventing deletion record file, logging modle also goes to operate this file, thus causes conflict) protected by the lock that interpolation one is overall, if successfully pin, then performs next step.
6) perform the operation of uploading onto the server, if upload successfully, then delete this and upload corresponding log file.
7) unlock, this uploads end.
Above-mentioned explanation illustrate and describes a preferred embodiment of the present invention, but as previously mentioned, be to be understood that the present invention is not limited to the form disclosed by this paper, should not regard the eliminating to other embodiments as, and can be used for other combinations various, amendment and environment, and can in invention contemplated scope described herein, changed by the technology of above-mentioned instruction or association area or knowledge.And the change that those skilled in the art carry out and change do not depart from the spirit and scope of the present invention, then all should in the protection domain of claims of the present invention.

Claims (9)

1. a user behavior data acquisition method, after it specifically comprises the following steps: that step one, program start, monitoring thread starts, and described monitoring thread is used for when user operation program, puts in queue by the behavioral data of user; Wherein behavioral data comprises user operation id and relevant operation information; Step 2, from queue, obtain the behavioral data of a user, then according to the vocabulary defined and semanteme, behavior data assembling is become a significant statement, described vocabulary is all possible user behavior that predefined is good; Step 3, by step 2 assemble significant statement be saved in log file, then in queue, delete this record.
2. user behavior data acquisition method as claimed in claim 1, it is characterized in that described method also comprises when there is new statement and needing to preserve, judge whether the threshold value of log file is greater than the threshold value of setting, be create new log file, otherwise statement is kept in original log file.
3. user behavior data acquisition method as claimed in claim 2, is characterized in that described method also comprises when step 3 performs, adds the execution that step 3 protected by an overall lock.
4. user behavior data acquisition method as claimed in claim 3, it is characterized in that described method also comprises when user does not operate, monitoring thread is in dormant state, just wakes up during executable operations.
5. user behavior data acquisition method as claimed in claim 4, is characterized in that described when user operation program, is put in queue by the behavioral data of user and be specially: needing the pre-buried statistics point in the place of counting user operation behavior.
6. user behavior data acquisition method as claimed in claim 5, is characterized in that described vocabulary comprises user operation id sublist, software function module sublist, user operation behavior sublist and operating result sublist.
7. user behavior data acquisition method as claimed in claim 6, is characterized in that described method also comprises and judges whether also have data in queue, if having, then continue the behavioral data obtaining user from queue, if nothing, then continue monitoring, wait for user operation.
8. user behavior data acquisition method as claimed in claim 7, it is characterized in that described method also comprises when program determination, monitoring thread also terminates.
9. user behavior data acquisition method as claimed in claim 8, is characterized in that described method also comprises and the timing of the user behavior data of record is uploaded onto the server.
CN201510041172.8A 2015-01-28 2015-01-28 User behavior data collecting method Pending CN104598371A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510041172.8A CN104598371A (en) 2015-01-28 2015-01-28 User behavior data collecting method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510041172.8A CN104598371A (en) 2015-01-28 2015-01-28 User behavior data collecting method

Publications (1)

Publication Number Publication Date
CN104598371A true CN104598371A (en) 2015-05-06

Family

ID=53124183

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510041172.8A Pending CN104598371A (en) 2015-01-28 2015-01-28 User behavior data collecting method

Country Status (1)

Country Link
CN (1) CN104598371A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106534486A (en) * 2016-10-13 2017-03-22 努比亚技术有限公司 Data reporting apparatus, method and mobile terminal
CN109766253A (en) * 2018-12-15 2019-05-17 平安证券股份有限公司 A kind of performance data sending method, device, computer equipment and storage medium
CN112632595A (en) * 2019-09-24 2021-04-09 中国石油化工股份有限公司 Information collection method and system based on seismic data interpretation software

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080086558A1 (en) * 2006-10-06 2008-04-10 Coremetrics, Inc. Session based web usage reporter
CN102368788B (en) * 2011-12-09 2013-12-25 中国电信股份有限公司 Information pushing method and apparatus thereof
CN104253835A (en) * 2013-06-27 2014-12-31 阿里巴巴集团控股有限公司 User behavior data acquisition method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080086558A1 (en) * 2006-10-06 2008-04-10 Coremetrics, Inc. Session based web usage reporter
CN102368788B (en) * 2011-12-09 2013-12-25 中国电信股份有限公司 Information pushing method and apparatus thereof
CN104253835A (en) * 2013-06-27 2014-12-31 阿里巴巴集团控股有限公司 User behavior data acquisition method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106534486A (en) * 2016-10-13 2017-03-22 努比亚技术有限公司 Data reporting apparatus, method and mobile terminal
CN109766253A (en) * 2018-12-15 2019-05-17 平安证券股份有限公司 A kind of performance data sending method, device, computer equipment and storage medium
CN112632595A (en) * 2019-09-24 2021-04-09 中国石油化工股份有限公司 Information collection method and system based on seismic data interpretation software
CN112632595B (en) * 2019-09-24 2024-04-09 中国石油化工股份有限公司 Information collection method and system based on seismic data interpretation software

Similar Documents

Publication Publication Date Title
CN110147411B (en) Data synchronization method, device, computer equipment and storage medium
CN108345524B (en) Application program monitoring method and application program monitoring device
KR101835303B1 (en) Systems and methods for collecting, tracking, and storing system performance and event data for computing devices
CN102799514B (en) Method and system for managing log records
JP6027689B2 (en) APP MANAGEMENT METHOD, DEVICE, SERVER, TERMINAL DEVICE, PROGRAM, AND RECORDING MEDIUM
US20160283711A1 (en) eMMC Monitoring Method and Apparatus
CN108847977A (en) A kind of monitoring method of business datum, storage medium and server
WO2014117653A1 (en) Method, device and terminal equipment for cleaning up memory
AU2012200088A1 (en) Saveless documents
CN109460343A (en) System exception monitoring method, device, equipment and storage medium based on log
CN113835985B (en) Method, device and equipment for monitoring and analyzing jamming reason
WO2021093365A1 (en) Gpu video memory management control method and related device
WO2020232871A1 (en) Method and device for microservice dependency analysis
CN104598371A (en) User behavior data collecting method
CN103530029A (en) EMS graphical dynamic menu display method based on human-computer interface user behavior analysis
CN102968337A (en) Application program cleaning method and system
CN105893471B (en) Data processing method and electronic equipment
CN104978352B (en) The method and client of information processing
CN106557146B (en) Power saving method, device and terminal
CN110162563B (en) Data warehousing method and system, electronic equipment and storage medium
CN104424246A (en) Data storage system and method
CN105893221B (en) The alarm method and device of terminal operating duration
US10795657B2 (en) Method of managing applications and computing device using the same
CN103677882A (en) Virtual installation device and method of mobile phone program
CN106775480A (en) A kind of real-time monitoring system data recording method based on LabVIEW

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150506