CN104253835B - User behavior data acquisition method and its system - Google Patents

User behavior data acquisition method and its system Download PDF

Info

Publication number
CN104253835B
CN104253835B CN201310261711.XA CN201310261711A CN104253835B CN 104253835 B CN104253835 B CN 104253835B CN 201310261711 A CN201310261711 A CN 201310261711A CN 104253835 B CN104253835 B CN 104253835B
Authority
CN
China
Prior art keywords
user behavior
behavior data
data
queue file
control part
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
CN201310261711.XA
Other languages
Chinese (zh)
Other versions
CN104253835A (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.)
Advanced New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201310261711.XA priority Critical patent/CN104253835B/en
Publication of CN104253835A publication Critical patent/CN104253835A/en
Priority to HK15103313.7A priority patent/HK1204512A1/en
Application granted granted Critical
Publication of CN104253835B publication Critical patent/CN104253835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

This application discloses a kind of user behavior data acquisition methods and its system, this method to include:Browser control part receives the user behavior data from page script language;Preset offline queue file is written in the user behavior data by the browser control part;Independent process is created, and the user behavior data in offline queue file is sent to by server by the independent process.The application is cooperated by JavaScript- browser control part-independent process three by the user behavior data reliable diffusion on the page to server, and the acquisition accuracy rate of user behavior data is improved.

Description

User behavior data acquisition method and its system
Technical field
This application involves technical field of electronic commerce more particularly to a kind of user behavior data acquisition method and its systems.
Background technique
User behavior(User Behavior)Data are the data for the mode of operation that description uses the product by the user, currently, with The data acquisition of family behavior is the basis of subsequent analysis user behavior work, is related to the quality of final Result.
User behavior data acquisition is generally carried out using JavaScript AJAX technology in the prior art, which is one Data sender formula of the kind without refreshing, has the following problems in practical applications:
1, client network environment is more complicated, and user will do it while browsing webpage and largely use Internet resources Operation, cause the AJAX request on the page be likely to occur delay or obstruction the case where.
2, JavaScript runs life cycle and is limited to current page state on the page, and request meeting is sent when the page leaves It is abandoned, requests the transmission that may fail at this time.
In summary, it is known that in the prior art that request is sent in the presence of by net by page JavaScript AJAX mode Network environment is affected, and is unable to complete once user leaves page request, and can not reliably record user behavior data causes The problem of reducing the accuracy of user behavior data acquisition, it is therefore necessary to propose that improved technological means solves the above problems.
Summary of the invention
The main purpose of the application is to provide a kind of user behavior data acquisition method and its system, to solve existing skill Art is existing by page JavaScript AJAX mode to be sent request and can not reliably record user behavior data and cause to reduce and use The problem of accuracy of family behavioral data acquisition.
In order to solve the above technical problems, providing a kind of user behavior data acquisition side according to the one aspect of the application Method comprising:
Browser control part receives the user behavior data from page script language;The browser control part is by the user Preset offline queue file is written in behavioral data;Independent process is created, and by the independent process by offline queue file In user behavior data be sent to server.
Wherein, before the step of browser control part is received from the user behavior data of page script language, institute The method of stating further includes:User behavior is described as the user behavior data of predetermined structure by the page script language;
The browser control part was received from the step of user behavior data of page script language:The browser The user behavior data that control passes through predetermined structure described in calling control interface predetermined.
Wherein, the user behavior data of the predetermined structure includes following information:Page uniform resource locator, reference come Source, behavior description, record time.
Wherein, described that user behavior data in offline queue file is sent to by server by the independent process Step includes:The independent process inspect periodically in offline queue file whether the user behavior data of transmission in need, if so, Then pass through calling system interface check network state;It, will be described offline according to first-in first-out if network state is the free time User behavior data in queue file is sent to the server.
Wherein, the method also includes:Judge whether user behavior data sends success, if then by the offline queue The data in file are deleted.
According to the another aspect of the application, a kind of user behavior data acquisition system is additionally provided comprising:
Browser control part module, for receiving the user behavior data from page script language, and by user's row Preset offline queue file is written for data;Independent process module, for by the user behavior data in offline queue file It is sent to server.
Wherein, user's row that the browser control part module passes through calling control interface predetermined structure predetermined For data, wherein user behavior is described as the user behavior data of predetermined structure by the page script language.
Wherein, the user behavior data of the predetermined structure includes following information:Page uniform resource locator, reference come Source, behavior description, record time.
Wherein, the independent process module includes:Data review module, for inspect periodically in offline queue file whether There is user behavior data to be sent;Network state checks module, if for there is user's row to be sent in offline queue file For data, then pass through calling system interface check network state;Data transmission blocks are pressed if being the free time for network state The user behavior data in offline queue file is sent to the server according to first-in first-out.
Wherein, the independent process module further includes:Judgment module, for judging whether user behavior data sends into Function;Removing module deletes the data in the offline queue file if sending successfully for user behavior data It removes.
It according to the technical solution of the application, is communicated by JavaScript with browser control part, establishes offline request hair Send queue, by the user behavior data in independent process transmit queue, i.e., by JavaScript- browser control part-independence into Cheng Sanzhe cooperates the user behavior data reliable diffusion on the page to server, improves the acquisition of user behavior data Accuracy rate.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 is the flow chart according to the user behavior data acquisition method of the embodiment of the present application;
Fig. 2 is showing according to the browser control part of the embodiment of the present application reception JavaScript user behavior data transmitted It is intended to;
Fig. 3 is the composed structure schematic diagram according to the user behavior data of the embodiment of the present application;
Fig. 4 is the schematic diagram to be cooperated according to the browser control part and independent process of the embodiment of the present application by queue file;
Fig. 5 is the flow chart that queue file is handled according to the independent process of the embodiment of the present application;
Fig. 6 is the structural block diagram according to the user behavior data acquisition system of the embodiment of the present application;
Fig. 7 is the structural block diagram according to the independent process module of the embodiment of the present application.
Specific embodiment
In a typical configuration, calculating equipment includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include non-temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
Memory may include module 1, module 2, module N....
This application provides a kind of reliable user behavior data acquisition methods, by that transmission approach will be requested from existing skill The JavaScript AJAX of art is changed to call control interface, local offline queue file is written, and be responsible for transmission by independent process Mode, solve the problems, such as request there may be send it is unsuccessful, improve the acquisition success rate of user behavior data.
To keep the purposes, technical schemes and advantages of the application clearer, below in conjunction with drawings and the specific embodiments, to this Application is described in further detail.
According to an embodiment of the present application, a kind of user behavior data acquisition method, the data acquisition are provided(Data collecting)Refer to the process of that the client for using data from user is sent to server.
Fig. 1 is according to the flow chart of the user behavior data acquisition method of the embodiment of the present application, as shown in Figure 1, this method Including:
Step S102, browser control part receive the user behavior data from page script language.
User behavior(User Behavior)The mode of operation used the product by the user, for example including but be not limited to download File, online game etc. can largely use the operation of Internet resources.Page script language(JavaScript)User behavior is retouched State the user behavior data for predetermined structure, browser control part(Plug-in)By calling control interface predetermined The user behavior data of predetermined structure, in practical applications, with reference to Fig. 2, user behavior data passes through key-value pair (KeyValuePair)Form is transmitted to browser control part in a manner of character string.
Since data collection service has certain demand to the data information transmitted, to meet the data transmission need It asks, the application defines the composed structure of user behavior data, with reference to Fig. 3, according to the user behavior of the predetermined structure of the application Data include but is not limited to following information:Page uniform resource locator(URL), data reference source(The guidance page is come A upper page URL for current location), behavior description information, record the time.And, it is desirable that user behavior data has following Feature:The data volume ultimately generated is small(Less data once sends and has higher success rate), in config set(It is repaired without additional assemblies Change data), be easy to serialize(Simple data facilitates text when being presented and send upper HTTP request without complicated coding).
Preset offline queue file is written in user behavior data by step S104, browser control part.
Offline queue file is preset, the data list in the queue file is according to first in first out(FIFO)At mode Manage data.
Step S106 creates independent process, and is sent out the user behavior data in offline queue file by independent process It send to server.
With reference to Fig. 4, the browser control part and independent process of the application passes through offline queue(Such as disk file)It is assisted Make, browser control part is responsible for additional user behavior data and is sent out to tail portion, the data that independent process takes out queue head are lined up It send, to complete the accurate acquisition of user behavior data.
After independent process starting, inspect periodically in queue file whether the data of transmission in need, if there is then passing through tune The available mode that network is checked with system interface, these data are sent in network idle, are needed after being sent completely by the data It is deleted from queue.Below with reference to the process flow of the queue file of Fig. 5 detailed description independent process, in this embodiment, solely The data of vertical process detection transmission in need into queue file, and network is in idle condition can send data.With reference to Fig. 5, the process flow include:
Step S502, independent process read queue file's header data;
The data assembling on head is request data by step S504, queue;
Step S506, independent process send to server and request;
Step S508, data are sent completely, and server is return success to independent process, such as are returned by HTTP request The status code returned may determine that whether transmission succeeds;
Step S510, independent process delete the uppermost data in queue file head;
Step S512, data, which are deleted, to be completed, and continues to execute step S502 or next detection time is waited to continue to hold when reaching Row step S502.
The application establishes offline request transmit queue, and by independently of browser by communicating with browser control part Independent process is responsible for the data in transmit queue, i.e., is cooperated by JavaScript- control-independent process three by the page On user behavior data reliable diffusion to server, to improve the acquisition accuracy rate of user behavior data.
According to an embodiment of the present application, a kind of user behavior data acquisition system, with reference to Fig. 6, the system are additionally provided It includes at least:The structure and function of above-mentioned each module is described below in detail in browser control part module 610 and independent process module 620 Energy.
Browser control part module 610 is for receiving the user behavior data from page script language, and by the user Preset offline queue file is written in behavioral data.In the embodiment of the present application, user behavior is described as by page script language The user behavior data of predetermined structure, wherein the user behavior data of predetermined structure includes but is not limited to following information:Page system One Resource Locator, reference source, behavior description, record time.Browser control part module 610 is by calling control predetermined The user behavior data of part interface predetermined structure.
Independent process module 620 is used to the user behavior data in offline queue file being sent to server.
According to above-described embodiment of the application, cooperated by JavaScript- browser control part-independent process three By the user behavior data reliable diffusion on the page to server.
With reference to Fig. 7, independent process module 620 further comprises:Data review module 710, network state check module 720 With data transmission blocks 730.
Wherein, whether data review module 710 have user behavior to be sent for inspecting periodically in offline queue file Data;
Network state checks that module 720 is coupled with 710 phase of data review module, if pending for having in offline queue file The user behavior data sent then passes through calling system interface check network state;
Data transmission blocks 730 check the coupling of 720 phase of module with network state, if being the free time for network state, press The user behavior data in offline queue file is sent to server according to first-in first-out.
With continued reference to Fig. 7, the independent process module 620 further includes:
Judgment module 740 is coupled with 730 phase of data transmission blocks, for judging whether user behavior data sends success;
Removing module 750 is coupled with 740 phase of judgment module, if sending successfully for user behavior data, by offline team The data in column file are deleted.
The operating procedure of the present processes and the structure feature of system are corresponding, can be cross-referenced, no longer repeat one by one.
In conclusion being communicated by JavaScript with browser control part according to the above-mentioned technical proposal of the application, establish Offline request transmit queue passes through JavaScript- browser by the user behavior data in independent process transmit queue Control-independent process three cooperates the user behavior data reliable diffusion on the page to server, improves user's row For the acquisition accuracy rate of data.
The above description is only an example of the present application, is not intended to limit this application, for those skilled in the art For member, various changes and changes are possible in this application.Within the spirit and principles of this application, it is made it is any modification, Equivalent replacement, improvement etc., should be included within the scope of the claims of this application.
It should be understood by those skilled in the art that, embodiments herein can provide as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the application Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the application, which can be used in one or more, Usable storage medium(Including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)The computer program of upper implementation produces The form of product.

Claims (10)

1. a kind of user behavior data acquisition method, which is characterized in that including:
Browser control part receives the user behavior data from page script language, wherein the user behavior data passes through key- Value transmits form in a manner of character string;
Preset offline queue file is written in the user behavior data by the browser control part;
Independent process is created, and the user behavior data in offline queue file is sent to by service by the independent process Device.
2. coming from page script language the method according to claim 1, wherein receiving in the browser control part User behavior data the step of before, the method also includes:User behavior is described as making a reservation for by the page script language The user behavior data of structure;
The browser control part was received from the step of user behavior data of page script language:The browser control part By the user behavior data for calling predetermined structure described in control interface predetermined.
3. according to the method described in claim 2, it is characterized in that, the user behavior data of the predetermined structure includes following letter Breath:Page uniform resource locator, reference source, behavior description, record time.
4. the method according to claim 1, wherein described will be in offline queue file by the independent process User behavior data the step of being sent to server include:
The independent process inspect periodically in offline queue file whether the user behavior data of transmission in need, if so, logical It crosses calling system interface and checks network state;
If network state is the free time, the user behavior data in the offline queue file is sent according to first-in first-out To the server.
5. according to the method described in claim 4, it is characterized in that, further including:
Judge whether user behavior data sends success, if then deleting the data in the offline queue file.
6. a kind of user behavior data acquisition system, which is characterized in that including:
Browser control part module, for receiving the user behavior data from page script language, and by the user behavior number According to the preset offline queue file of write-in, wherein the user behavior data is passed form key-value in a manner of character string It passs;
Independent process module, for the user behavior data in offline queue file to be sent to server.
7. system according to claim 6, which is characterized in that the browser control part module is predetermined by calling The user behavior data of control interface predetermined structure, wherein user behavior is described as making a reservation for by the page script language The user behavior data of structure.
8. system according to claim 7, which is characterized in that the user behavior data of the predetermined structure includes following letter Breath:Page uniform resource locator, reference source, behavior description, record time.
9. system according to claim 6, which is characterized in that the independent process module includes:
Whether data review module has user behavior data to be sent for inspecting periodically in offline queue file;
Network state checks module, if for having user behavior data to be sent in offline queue file, by calling system System interface check network state;
Data transmission blocks, if being the free time for network state, according to first-in first-out by the use in offline queue file Family behavioral data is sent to the server.
10. system according to claim 9, which is characterized in that the independent process module further includes:
Judgment module, for judging whether user behavior data sends success;
Removing module deletes the data in the offline queue file if sending successfully for user behavior data It removes.
CN201310261711.XA 2013-06-27 2013-06-27 User behavior data acquisition method and its system Active CN104253835B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201310261711.XA CN104253835B (en) 2013-06-27 2013-06-27 User behavior data acquisition method and its system
HK15103313.7A HK1204512A1 (en) 2013-06-27 2015-04-01 Method for collecting user behavior data and system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310261711.XA CN104253835B (en) 2013-06-27 2013-06-27 User behavior data acquisition method and its system

Publications (2)

Publication Number Publication Date
CN104253835A CN104253835A (en) 2014-12-31
CN104253835B true CN104253835B (en) 2018-11-16

Family

ID=52188367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310261711.XA Active CN104253835B (en) 2013-06-27 2013-06-27 User behavior data acquisition method and its system

Country Status (2)

Country Link
CN (1) CN104253835B (en)
HK (1) HK1204512A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104598371A (en) * 2015-01-28 2015-05-06 成都品果科技有限公司 User behavior data collecting method
CN105975351A (en) * 2016-04-25 2016-09-28 乐视控股(北京)有限公司 User behavior message reporting method and apparatus
CN109948025B (en) * 2019-03-20 2023-10-20 上海古鳌电子科技股份有限公司 Data reference recording method
CN111913911A (en) * 2020-07-15 2020-11-10 杭州鸿泉物联网技术股份有限公司 Service data forwarding method and server

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6018619A (en) * 1996-05-24 2000-01-25 Microsoft Corporation Method, system and apparatus for client-side usage tracking of information server systems
CN101034997A (en) * 2006-03-09 2007-09-12 新数通兴业科技(北京)有限公司 Method and system for accurately publishing the data information
CN101087210A (en) * 2007-05-22 2007-12-12 网御神州科技(北京)有限公司 High-performance Syslog processing and storage method
CN101222349A (en) * 2007-01-12 2008-07-16 中国电信股份有限公司 Method and system for collecting web user action and performance data
CN102385549A (en) * 2010-09-02 2012-03-21 北京无限立通通讯技术有限责任公司 Log processing system, log processing method and log storage sub-system
CN102891873A (en) * 2011-07-21 2013-01-23 腾讯科技(深圳)有限公司 Method for storing log data and log data storage system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166827A (en) * 2011-12-09 2013-06-19 北京神州泰岳软件股份有限公司 Method and system for user behavior data reporting

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6018619A (en) * 1996-05-24 2000-01-25 Microsoft Corporation Method, system and apparatus for client-side usage tracking of information server systems
CN101034997A (en) * 2006-03-09 2007-09-12 新数通兴业科技(北京)有限公司 Method and system for accurately publishing the data information
CN101222349A (en) * 2007-01-12 2008-07-16 中国电信股份有限公司 Method and system for collecting web user action and performance data
CN101087210A (en) * 2007-05-22 2007-12-12 网御神州科技(北京)有限公司 High-performance Syslog processing and storage method
CN102385549A (en) * 2010-09-02 2012-03-21 北京无限立通通讯技术有限责任公司 Log processing system, log processing method and log storage sub-system
CN102891873A (en) * 2011-07-21 2013-01-23 腾讯科技(深圳)有限公司 Method for storing log data and log data storage system

Also Published As

Publication number Publication date
HK1204512A1 (en) 2015-11-20
CN104253835A (en) 2014-12-31

Similar Documents

Publication Publication Date Title
US10635735B2 (en) Method and apparatus for displaying information
US10747828B2 (en) Systems and methods for single page application server side renderer
US9516091B2 (en) Web page script management
US10362086B2 (en) Method and system for automating submission of issue reports
US8990429B2 (en) HTTP-based synchronization method and apparatus
CN107508720B (en) Automatic testing method and device
US10158691B2 (en) Method and apparatus for providing network resources at intermediary server
CN104253835B (en) User behavior data acquisition method and its system
US9787521B1 (en) Concurrent loading of session-based information
CN103729380B (en) A kind of data processing method, system and device
CN103347092A (en) Method and device for recognizing cacheable file
CN109829121B (en) Method and device for reporting click behavior data
US20220407907A1 (en) Web application component migration to a cloud computing system
CN105871976A (en) Data cross-domain request method and system, and devices
CN103546829A (en) Method and device for processing video service
CN103856540A (en) Response processing method and device
CN105450771A (en) Information push and information push optimization methods, servers and systems
CN103051722B (en) A kind ofly determine the method whether page is held as a hostage and relevant device
US9754327B2 (en) Method and apparatus for configuring social networking site sharing functions
CN105245446B (en) A kind of file transmitting method and gateway
US20160315905A1 (en) Method and System for Determining and Tracking an Email Open Duration
CN102694802B (en) Network access information recording method and device
KR102196403B1 (en) Reduced redirection
CN108920589B (en) Browsing hijacking identification method, device, server and storage medium
CN110390067B (en) Webpage labeling method and device, storage medium and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1204512

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20191209

Address after: P.O. Box 31119, grand exhibition hall, hibiscus street, 802 West Bay Road, Grand Cayman, Cayman Islands

Patentee after: Innovative advanced technology Co., Ltd

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Patentee before: Alibaba Group Holding Co., Ltd.

TR01 Transfer of patent right