CN109446067A - Method of data capture, device, computer equipment and storage medium - Google Patents
Method of data capture, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN109446067A CN109446067A CN201811122839.7A CN201811122839A CN109446067A CN 109446067 A CN109446067 A CN 109446067A CN 201811122839 A CN201811122839 A CN 201811122839A CN 109446067 A CN109446067 A CN 109446067A
- Authority
- CN
- China
- Prior art keywords
- primary function
- function
- application program
- data
- key
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 62
- 238000013481 data capture Methods 0.000 title claims abstract description 15
- 230000009471 action Effects 0.000 claims abstract description 81
- 238000013480 data collection Methods 0.000 claims abstract description 60
- 238000012545 processing Methods 0.000 claims abstract description 43
- 238000012544 monitoring process Methods 0.000 claims abstract description 26
- 230000008569 process Effects 0.000 claims abstract description 22
- 230000006870 function Effects 0.000 claims description 391
- 230000006399 behavior Effects 0.000 claims description 101
- 238000004590 computer program Methods 0.000 claims description 19
- 239000000284 extract Substances 0.000 claims description 15
- 238000000605 extraction Methods 0.000 claims description 15
- 230000011218 segmentation Effects 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 8
- 238000005516 engineering process Methods 0.000 description 7
- 238000004458 analytical method Methods 0.000 description 6
- 230000003542 behavioural effect Effects 0.000 description 5
- 239000000203 mixture Substances 0.000 description 5
- 238000007796 conventional method Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 4
- 230000018109 developmental process Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 230000003068 static effect Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 238000010801 machine learning Methods 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 241001269238 Data Species 0.000 description 1
- 230000000712 assembly Effects 0.000 description 1
- 238000000429 assembly Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000004069 differentiation Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012549 training Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3604—Software analysis for verifying properties of programs
- G06F11/3612—Software analysis for verifying properties of programs by runtime analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Telephonic Communication Services (AREA)
Abstract
This application involves a kind of method of data capture based on big data technical field, device, computer equipment and storage mediums.The described method includes: determining crucial primary function in application program launching;The primary function of key is subjected to function with customized data collection function and exchanges processing;In the operational process of the application program, the action event for being directed to the application program is monitored;When the primary function that the action event of monitoring to be called is the crucial primary function, then by calling the data collection function swapped with the primary function of key, operation behavior data corresponding with the action event are collected;After data collection, triggering calls the primary function of the key to execute handle corresponding with the action event.Carrying out data collection using this method can be improved the service performance of application program.
Description
Technical field
This application involves field of computer technology, more particularly to a kind of method of data capture, device, computer equipment and
Storage medium.
Background technique
With the rapid development of science and technology, the type of application program (Application, APP) and function become increasingly abundant.
With the rapid development of science and technology, the type of application program and function become increasingly abundant.In the routine work, study and life of people
In work, it is often necessary to handle corresponding thing using various application programs.In general, using the mistake of application program in user
The operation behavior data of counting user are needed in journey, pointedly to be analyzed.
In conventional method, need developer in the development phase of application program, it is initiatively pre-buried inside service code
A large amount of statistics codes unite to operation behavior of user during using application program by pre-buried statistics codes
Meter.Obviously, mix statistics codes in service code in conventional method, will lead to code and mix, to influence application program
Service performance causes the service performance of application program poor.
Summary of the invention
Based on this, it is necessary in view of the above technical problems, provide a kind of number of service performance that can be improved application program
According to collection method, device, computer equipment and storage medium.
A kind of method of data capture, which comprises
In application program launching, crucial primary function is determined;
The primary function of key is subjected to function with customized data collection function and exchanges processing;
In the operational process of the application program, the action event for being directed to the application program is monitored;
When the primary function that the action event of monitoring to be called is the crucial primary function, then
By calling the data collection function swapped with the primary function of key, collect and the action event pair
The operation behavior data answered;
After data collection, triggering calls the primary function of the key to execute locate corresponding with the action event
Reason.
It is described in application program launching in one of the embodiments, determine that crucial primary function includes:
In application program launching, starting notice is sent to server;
Receive the data acquisition instruction that the server is sent after receiving the starting notice;
Extract the data type mark carried in the data acquisition instruction;
Processing is corresponded into the primary function of the data of data type mark as crucial primary function.
It is described in application program launching in one of the embodiments, determine that crucial primary function includes:
In application program launching, type identification corresponding to the application program is obtained;
Obtain the corresponding relationship between the primary function of pre-set key and type identification;
According to the corresponding relationship, the primary function of key corresponding with the type identification found is determined.
It is described in application program launching in one of the embodiments, determine that crucial primary function includes:
In application program launching, the Key Functions mark in advance for application program addition is obtained;
The Key Functions are identified and are matched with the primary function that operating system provides;
Matched primary function is identified with the Key Functions in the primary function that the operating system is provided, as pass
The primary function of key.
In one of the embodiments, described in application program launching, after determining crucial primary function, the side
Method further include:
The primary function of key determined is added into corresponding key signature;
Described in the operational process of the application program, after monitoring the action event for the application program,
The method also includes:
Determine the action event primary function to be called listened to;
Whether there is corresponding key signature in the primary function determined by detecting;
When the primary function has corresponding key signature, determine the primary function for crucial primary function.
In one of the embodiments, the method also includes:
Obtain the operation behavior data collected by the data collection function;
Feature extraction is carried out to the operation behavior data;
Obtained characteristic will be extracted and report to server.
The operation behavior data include text data in one of the embodiments,;The characteristic be characterized to
Amount;It is described to include: to operation behavior data progress feature extraction
Word segmentation processing is carried out to the operation behavior data of text, obtains word segment;
Keyword segment is extracted from each word segment;
Obtained each keyword segment will be extracted and be quantified as corresponding term vector;
Obtained each term vector is combined according to the precedence relationship of the corresponding position in operation behavior data, is obtained
The feature vector of operation behavior data.
A kind of transacter, described device include:
Key Functions determining module, in application program launching, determining crucial primary function;
Function Switching Module is exchanged for the primary function of key to be carried out function with customized data collection function
Processing;
Data collection module, for monitoring the behaviour for being directed to the application program in the operational process of the application program
Make event;When the primary function that the action event of monitoring to be called is the crucial primary function, then pass through calling and institute
The data collection function that crucial primary function swaps is stated, operation behavior data corresponding with the action event are collected;
Processing module, for after data collection, triggering to call the primary function of the key to execute and the operation
Event is handled accordingly.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing
Device performs the steps of when executing the computer program
In application program launching, crucial primary function is determined;
The primary function of key is subjected to function with customized data collection function and exchanges processing;
In the operational process of the application program, the action event for being directed to the application program is monitored;
When the primary function that the action event of monitoring to be called is the crucial primary function, then
By calling the data collection function swapped with the primary function of key, collect and the action event pair
The operation behavior data answered;
After data collection, triggering calls the primary function of the key to execute locate corresponding with the action event
Reason.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
It is performed the steps of when row
In application program launching, crucial primary function is determined;
The primary function of key is subjected to function with customized data collection function and exchanges processing;
In the operational process of the application program, the action event for being directed to the application program is monitored;
When the primary function that the action event of monitoring to be called is the crucial primary function, then
By calling the data collection function swapped with the primary function of key, collect and the action event pair
The operation behavior data answered;
After data collection, triggering calls the primary function of the key to execute locate corresponding with the action event
Reason.
Above-mentioned method of data capture, device, computer equipment and storage medium determine crucial in application program launching
Primary function;Crucial primary function is subjected to function with customized data collection function and exchanges processing;In the fortune of application program
During row, the action event for being directed to application program is monitored;When the primary function that the action event of monitoring to be called is key
When primary function, then by calling the data collection function swapped with crucial primary function, collect corresponding with action event
Operation behavior data;After data collection, triggering calls crucial primary function to execute handle corresponding with action event.
It is equivalent in the case where not influencing normal data processing, the collection to operation behavior data is realized by function exchange,
Mix statistics codes in service code and shadow without avoiding as conventional method pre-buried statistics codes in service code
The problem of ringing the service performance of application program, to improve the service performance of application program.
Detailed description of the invention
Fig. 1 is the application scenario diagram of method of data capture in one embodiment;
Fig. 2 is the flow diagram of method of data capture in one embodiment;
Fig. 3 is the flow diagram that crucial primary function determines step in one embodiment;
Fig. 4 is the flow diagram that data report in one embodiment;
Fig. 5 is the structural block diagram of transacter in one embodiment;
Fig. 6 is the structural block diagram of transacter in another embodiment;
Fig. 7 is the structural block diagram of characteristic extracting module in one embodiment;
Fig. 8 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Method of data capture provided by the present application can be applied in application environment as shown in Figure 1.Wherein, terminal 110
It is communicated with server 120 by network by network.Wherein, terminal 110 can be, but not limited to be various personal computers,
Laptop, smart phone, tablet computer and portable wearable device, server 120 can with independent server or
Person is the server cluster of multiple server compositions to realize.It should be noted that being equipped with application in terminal 110.The application
Method of data capture provided in each embodiment be mainly used for be installed on the local target application to be monitored of terminal 110 into
Row performance monitoring.
Terminal 110 can determine crucial primary function in application program launching;By crucial primary function with it is customized
Data collection function carries out function exchange processing.In the operational process of application program, terminal 110 can be monitored for using journey
The action event of sequence.When the primary function that the action event of monitoring to be called is crucial primary function, terminal 110 then can be with
By calling the data collection function swapped with crucial primary function, operation behavior number corresponding with action event is collected
According to.After data collection, terminal 110 can trigger the crucial primary function of calling and execute handle corresponding with action event.
Further, the operation behavior data of collection can also be reported to server 120 by terminal 110, so that server 120 can root
Corresponding analysis processing is carried out according to the operation behavior data reported.It should be noted that in other embodiments, terminal 110 is also
It can be in the operation behavior data that local analytics are collected without reporting to server 120.The embodiment of the present application do not limit whether
The operation behavior data of collection are reported.
In one embodiment, as shown in Fig. 2, providing a kind of method of data capture, it is applied in Fig. 1 in this way
It is illustrated for terminal 110, comprising the following steps:
S202 determines crucial primary function in application program launching.
Wherein, primary function is the included function of system.Crucial primary function is crucial to need to carry out function exchange
The primary function of processing.
Function exchange processing, refers to and swaps the objective function for actually wanting to call with other functions, so that being intended to
The function exchanged therewith is preferentially called when invocation target function, then recalls the objective function.For example, by function A and function B
It swaps, then, when carrying out data processing, if it is desired to call function A, then can first call function B, until function B is called
After, just call function A.
In one embodiment, crucial primary function, can preset in development and application program.I.e. research staff can
With the primary function of designated key from primary function in advance according to actual needs.In one embodiment, step S202 is being applied
When program starts, determine that crucial primary function includes: to obtain in advance in application program launching for the pass of application program addition
Key function identification;Key Functions are identified and are matched with the primary function that operating system provides;The original that operating system is provided
Matched primary function is identified with Key Functions in raw function, as crucial primary function.
Wherein, Key Functions identify, for the primary function of key corresponding to unique identification application program.
Specifically, research staff can be to preassign the primary function of key corresponding to application program, and is using journey
Sequence adds corresponding Key Functions mark.Key Functions can be identified the primary function progress provided with operating system by terminal
Match, identify matched primary function with Key Functions in the primary function that operating system is provided, as crucial primary function.
In above-described embodiment, different application programs can be equivalent to the primary function of application program rank designated key
The different primary functions of key can be corresponded to, it is contemplated that due to different application required collection data differentiation because
Element improves specific aim and accuracy.
In other embodiments, crucial primary function can also carry out corresponding analysis in application program launching, with from
Crucial primary function is dynamically determined out in the primary function of system.
Crucial primary function is carried out function with customized data collection function and exchanges processing by S204.
Wherein, behavioral data function is function customized, for collecting operation behavior data.It is appreciated that making by oneself
The data collection function of justice, and the primary function that nonsystematic is included.
Specifically, terminal can use run-time library (Runtime) mechanism, and the function number institute that action event is directed to is right
The first function pointer modified answered is second function pointer, and crucial primary function and customized data collection function are carried out
Exchange.So, in application program operational process, when needing to carry out data processing, customized data can first be called
Function is collected, crucial primary function is then recalled.
Wherein, first function pointer is the function pointer for saving the address of crucial primary function.Second function refers to
Needle is the function pointer for saving the address of custom function.Function number (SEL, selector) represents the label of function
Name, can't be directed toward function.Function pointer (IMP), saves the address of function.
S206 monitors the action event for being directed to application program in the operational process of application program.
Wherein, action event is the operation that can be identified with controlled member.
Specifically, in the operational process of application program, user can be operated application program, each energy of user
The operation of enough controlled member identification is an action event, and terminal can monitor the action event for application program.
S208, when the primary function that the action event of monitoring to be called is crucial primary function, then by call with
The data collection function that crucial primary function swaps, collects operation behavior data corresponding with action event.
It is appreciated that each action event requires that corresponding primary function is called to be handled under regular situation.Each
Action event all corresponds to certain operation behavior data.Operation behavior data are retouching for operation behavior represented by action event
State information.
Terminal can determine whether the primary function that the action event of monitoring to be called is crucial primary function, if so,
The customized data collection function swapped with crucial primary function is then called, is collected by the data collection function of calling
Operation behavior data corresponding with action event.In one embodiment, when the action event of the monitoring primary letter to be called
When number is crucial primary function, terminal can intercept the calling to crucial primary function, and record according to when carrying out function exchange
Commutative relation, it is determining swapped with the primary function of the key after customized data collection function.
It is appreciated that when the primary function that the action event of monitoring is wanted to call is not crucial primary function, due to
Function exchange processing is not carried out to the primary function of non-key primary function, it is possible to call directly and want the primary of calling
Function executes handle corresponding with action event.
S210, after data collection, triggering calls crucial primary function to execute handle corresponding with action event.
It is appreciated that after data collection, can with the triggering terminal call operation event primary function to be called,
Handle corresponding with action event is executed by the primary function.It is equivalent to the collection not only realized to operation behavior data, but also
Normal data processing is not influenced.
In one embodiment, terminal can report the operation behavior data of collection, to report to server.It can
To understand, the original operation behavior data being collected into directly directly can be reported to server by terminal.Terminal can also be from
Critical data is extracted in original operation behavior data collected, then reports extracted critical data.
Above-mentioned method of data capture determines crucial primary function in application program launching;By crucial primary function and certainly
The data collection function of definition carries out function exchange processing;In the operational process of application program, monitor for application program
Action event;When the primary function that the action event of monitoring to be called is crucial primary function, then by call with it is crucial
The data collection function that primary function swaps collects operation behavior data corresponding with action event;It is complete in data collection
Bi Hou, triggering call crucial primary function to execute handle corresponding with action event.Being equivalent to is not influencing at normal data
In the case where reason, the collection to operation behavior data is realized by function exchange, without as conventional method is in business generation
Pre-buried statistics codes in code avoid and mix statistics codes in service code and the service performance that influences application program is asked
Topic, to improve the service performance of application program.
In addition, realize collection to operation behavior data by function exchange, avoid it is traditional take considerable time it is pre-
The lower problem of the whole efficiency of data collection caused by statistics codes is buried, thus, improve the efficiency of data collection.
As shown in figure 3, in one embodiment, step S202 determines crucial primary function (letter in application program launching
Crucial primary function is claimed to determine step), specifically includes the following steps:
S302 sends starting notice to server in application program launching.
Wherein, starting notice, this thing for application program to be started are informed.
Specifically, terminal can send starting notice to server, with tell the server application in application program launching
Program starts.
S304 receives the data retrieval commands that server is sent after receiving starting notice.
Wherein, data retrieval commands are the orders for being used to indicate terminal and obtaining operation behavior data.
Specifically, server then can send data retrieval commands to terminal after receiving starting notice.
It is appreciated that server can automatically generate data retrieval commands and be sent to after receiving starting notice
Terminal.In one embodiment, it is stored in server for triggering the configuration information for generating data retrieval commands.Matched according to this
Confidence breath, server can automatically generate data retrieval commands and be sent to terminal.Data retrieval commands are generated for triggering
Configuration information may include data type mark etc. information.
In other embodiments, it is also possible to server after receiving starting notice, which is forwarded to and is used to obtain
Technology terminal used in the technical staff of extract operation behavioral data.Technical staff can select to want to obtain in technology terminal
The data type of the operation behavior data taken, technology terminal obtain corresponding data type and identify and report to server, with touching
It sends out server and generation data retrieval commands is identified according to the data type of the selection, and data retrieval commands are issued to terminal
(it is appreciated that " terminal " here is the user terminal that the collected application program certainly of operation behavior data is installed on, and simultaneously
Technology terminal used in non-technical personnel).
S306 extracts the data type mark carried in data retrieval commands.
It is appreciated that including that data type identifies in data retrieval commands.In other embodiments, data retrieval commands are also
It may include the other information in addition to data type identification, do not limit this.
Wherein, data type identifies unique identification data type.Data type is to act on operation behavior data with behavior
The type that object is divided.Behavior effective object, the targeted object of user's operation behavior.Behavior effective object includes
Interface, functionality controls etc., therefore, data type may include interface display class and functionality controls class etc..
Further, data type can also include the secondary classification type under interface display class and functionality controls class.
I.e. interface display class and functionality controls class are first-level class type.In one embodiment, the secondary classification class of interface display class
Type includes that static page shows class and dynamic page jump class.The secondary classification type of functionality controls class can be actual function
Control, i.e., each functionality controls are a secondary classification type.
It should be noted that the primary function of key that the data type mark of first-level class type is corresponding, may include
The all or part of the corresponding primary function of key of all secondary classification types under the first-level class type.
Specifically, terminal can parse data retrieval commands, entrained by the extraction from data retrieval commands
Data type mark.
Processing is corresponded to the primary function of the data of data type mark as crucial primary function by S308.
In one embodiment, the corresponding relationship between data type mark and primary function is stored in terminal.Wherein,
The corresponding relationship is correspondingly arranged according to primary function and the data type mark of data handled by the primary function
, i.e., primary function is used to handle and the data of its data type mark with corresponding relationship.Terminal can be according to the correspondence
Relationship obtains primary function corresponding with the data type mark extracted, using the primary function as crucial primary function.
In order to make it easy to understand, the determination process of crucial primary function is explained in existing citing.For example, technical staff
If wanting the operation behavior data (i.e. operation behavior data of the user to control) of collecting function control class, service can be passed through
Device sends data retrieval commands, and it is corresponding that terminal can will identify (i.e. functionality controls class identifies) with the data type in the order
Primary function UIControl is as crucial primary function.For another example, if technical staff wants to collect the behaviour of dynamic page jump class
It, can will be corresponding with dynamic page jump class mark when making behavioral data (i.e. operation behavior data of the user to page jump)
Primary function viewDidAppear, viewDidDisappear etc. are as crucial primary function.Wherein, UIControl is created
User interface controls object is built, is creation various assemblies (such as button, static text box, pop-up menu etc.) on forms,
And specify the call back function of these components.ViewDidAppear is the primary letter called when view is transitioned on screen completely
Number.ViewDidDisappear is the primary function called when view has been disappeared, is capped or hidden.
In above-described embodiment, according to the data acquisition demand of server, the dynamically primary function of designated key, compared to pre-
First specific aim and accuracy broadly are improved for the primary function of designated key.
In one embodiment, step S202 determines that crucial primary function includes: using journey in application program launching
When sequence starts, type identification corresponding to application program is obtained;Obtain the primary function of pre-set key and type identification it
Between corresponding relationship;According to corresponding relationship, the primary function of key corresponding with the type identification found is determined.
Wherein, type identification, is the mark of the type of application program, the type for unique identification application program.It can be with
Understand, type identification is referred to as application type mark.In one embodiment, the type of application program, including interface are aobvious
Show class and communication class.The single orders such as interface display class and communication class type can also include second order type.Interface display class can be with
Including game application and the second orders type such as shopping application program.Communication class includes instant messaging class and content publication class etc.
Second order type.
Specifically, in application program launching, terminal can from server request it is corresponding with the application program
Type identification.Terminal can also extract type mark corresponding to the application program in local mount message from application program
Know.Terminal can obtain the corresponding relationship between the primary function of pre-set key and type identification from local or server,
According to corresponding relationship, the primary function of key corresponding with the type identification obtained is determined.
For example, APP is interface display class APP (for example, interface game APP, shopping APP etc. are chiefly used in interface display), then
Illustrate that the load of the page can be frequently referred to and jump, then can by viewDidLoad, viewDidAppear,
ViewDidDisappear is determined as crucial primary function.Wherein, viewDidLoad is the primary of calling after the completion of view creates
Function.
It, can be according to different applications with the primary function of type level designated key of application program in above-described embodiment
The type of program determines the different primary functions of key, it is contemplated that the required difference for collecting data as caused by type difference
Alienation factor, and do not have to broadly specify the fixed primary function of key, improve specific aim and accuracy.
In one embodiment, in application program launching, step S202 is determined crucial primary in application program launching
Function includes: to send starting notice to server in application program launching;Server is received to send after receiving starting notice
Data acquisition instruction;Extract the data type mark carried in data acquisition instruction;Determination is corresponding with data type mark
Primary function obtains type identification corresponding to application program;From determining primary function, it is right with application program institute to filter out
The corresponding primary function of the type identification answered, as crucial primary function.
In above-described embodiment, the data acquisition demand of server is combined with the type of application program, is come dynamically really
Fixed crucial primary function, avoids technical staff in request operation behavior data, and do not know about the type of application program,
And cause to obtain unnecessary operation behavior data, further increase accuracy.
In one embodiment, in step S202 in application program launching, after determining crucial primary function, this method
Further include: the primary function of key determined is added into corresponding key signature.Step S206 application program operation
Cheng Zhong, after monitoring the action event for application program, this method further include: determine that the action event listened to be called
Primary function;Whether there is corresponding key signature in primary function determined by detecting;When primary function has corresponding close
When key label, determine primary function for crucial primary function.
Wherein, key signature is for being the label of crucial primary function by primary function identification.It is appreciated that having
The primary function of corresponding key signature is crucial primary function.
Specifically, in step S206 in the operational process of application program, monitor for application program action event it
Afterwards, this method further includes the steps that whether the primary function that determining action event to be called is crucial primary function.Specifically,
Terminal can determine the action event listened to the primary function to be called, and detect whether the primary function to be called has
There is corresponding key signature, when primary function has corresponding key signature, determines that primary function for crucial primary function, works as original
When raw function does not have corresponding key signature, determine that primary function is non-key primary function.
In above-described embodiment, by adding key signature, and detect whether that there are key signatures to determine action event institute
Whether the primary function to be called is crucial primary function, can more quickly identify that action event to be called primary
Whether function is crucial primary function.
As shown in figure 4, in one embodiment, this method further includes that data report step, specifically includes the following steps:
S402 obtains the operation behavior data collected by data collection function.
Wherein, the operation behavior data that data collection function is collected are the original operation behavior data collected.It can manage
Solution, original operation behavior data are collected operation behavior data itself, do not do further data processing or add
Work.
S404 carries out feature extraction to operation behavior data.
Specifically, terminal carries out feature extraction to original operation behavior data, to extract characteristic.Wherein, special
Data are levied, are the critical datas that can express operation behavior data essential characteristics tersely.It is appreciated that characteristic phase
For original operation behavior data, substantive feature was not only remained, but also relatively terse.
In one embodiment, operation behavior data include text data.Step S404 carries out operation behavior data special
It includes: to carry out word segmentation processing to the operation behavior data of text that sign, which is extracted, obtains word segment;Key is extracted from each word segment
Word segment;Obtained each keyword segment will be extracted and be quantified as corresponding term vector;By obtained each term vector according to
The precedence relationship of corresponding position is combined in operation behavior data, obtains the feature vector of operation behavior data.
Wherein, word segment, i.e. word.Keyword segment is the word segment with substantive significance.It is appreciated that key
Word segment, being capable of expression characteristic.Term vector (Word embedding), is the calculating being converted to by the words in natural language
The vector that machine is understood that.
Specifically, terminal can operation behavior data to text carry out word segmentation processing, obtain word segment, and from each word piece
Keyword segment is extracted in section.In one embodiment, keywords database can be stored in advance in terminal.It is wrapped in keywords database
Include one or more predetermined keywords.Terminal can by word segment that word segmentation processing obtains respectively with it is each pre- in keywords database
If keyword is matched, using the word segment in keywords database there are matched predetermined keyword as keyword segment.
Terminal can will extract obtained each keyword segment and be quantified as corresponding term vector.In one embodiment,
Keyword segment can be designated as 1 at the matched predetermined keyword present position of institute in keywords database by terminal, by keywords database
In be designated as 0 at remaining predetermined keyword present position, then available corresponding term vector of keyword segment.It needs to illustrate
It is, it in other embodiments, can also be by keyword segment in keywords database at the matched predetermined keyword present position of institute
Be designated as 0,1 will be designated as at remaining predetermined keyword present position in keywords database, and obtain the corresponding word of keyword segment to
Amount.
Then, terminal can be by obtained each term vector according to the precedence relationship of the corresponding position in operation behavior data
It is combined, obtains the feature vector of operation behavior data.Wherein, term vector corresponding position in operation behavior data, as
Corresponding position of the keyword segment in operation behavior data corresponding to the term vector.It is appreciated that obtained feature vector
Belong to characteristic.
S406 will extract obtained characteristic and report to server.
Specifically, the terse characteristic of extraction can be reported to server by terminal.In one embodiment, terminal
The feature vector of extraction can be reported into server.
In one embodiment, the characteristic or feature vector reported is used to indicate the characteristic that server will report
According to or feature vector input in corresponding analysis model, to export corresponding analysis result.Wherein, analysis model is server
The machine learning model for analysis that machine learning training obtains is carried out in advance.
In above-described embodiment, the initial data of the operation behavior data of acquisition is not reported directly, but to operation behavior
Data carry out feature extraction, and report characteristic, for characteristic is compared to initial data, can either retain and be analyzed
The feature of Shi Suoxu, and volume of transmitted data can be reduced, thus the Internet resources and raising data that give the correct time spent on reducing
Report efficiency.
In addition, combining to obtain feature vector by the term vector of keyword segment, data volume can be further reduced.And
And it also can easier, accurately reflect the feature of operation behavior data.
It should be understood that although each step in the flow chart of Fig. 2-4 is successively shown according to the instruction of arrow,
These steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly stating otherwise herein, these steps
Execution there is no stringent sequences to limit, these steps can execute in other order.Moreover, at least one in Fig. 2-4
Part steps may include that perhaps these sub-steps of multiple stages or stage are not necessarily in synchronization to multiple sub-steps
Completion is executed, but can be executed at different times, the execution sequence in these sub-steps or stage is also not necessarily successively
It carries out, but can be at least part of the sub-step or stage of other steps or other steps in turn or alternately
It executes.
In one embodiment, as shown in figure 5, providing a kind of transacter 500, comprising: Key Functions determine
Module 502, function Switching Module 504, data collection module 506 and processing module 508, in which:
Key Functions determining module 502, in application program launching, determining crucial primary function.
Function Switching Module 504 is exchanged for crucial primary function to be carried out function with customized data collection function
Processing.
Data collection module 506, for monitoring the operation thing for being directed to application program in the operational process of application program
Part;When the primary function that the action event of monitoring to be called is crucial primary function, then by calling and crucial primary letter
The data collection function that number swaps collects operation behavior data corresponding with action event.
Processing module 508, for after data collection, triggering to call crucial primary function to execute and action event phase
The processing answered.
In one embodiment, Key Functions determining module 502 is also used in application program launching, sends starting notice
To server;Receive the data acquisition instruction that server is sent after receiving starting notice;It extracts and is carried in data acquisition instruction
Data type mark;Processing is corresponded into the primary function of the data of data type mark as crucial primary function.
In one embodiment, Key Functions determining module 502 is also used in application program launching, obtains application program
Corresponding type identification;Obtain the corresponding relationship between the primary function of pre-set key and type identification;According to correspondence
Relationship determines the primary function of key corresponding with the type identification found.
In one embodiment, Key Functions determining module 502 is also used in application program launching, and acquisition is directed in advance
The Key Functions mark of application program addition;Key Functions are identified and are matched with the primary function that operating system provides;It will
Matched primary function is identified with Key Functions in the primary function that operating system provides, as crucial primary function.
In one embodiment, the primary function addition phase of the key that Key Functions determining module 502 is also used to determine
The key signature answered;Data collection module 506 is also used to determine the action event primary function to be called listened to;Detection
Whether there is corresponding key signature in identified primary function;When primary function has corresponding key signature, determine former
Raw function is crucial primary function.
As shown in fig. 6, in one embodiment, the device 500 further include:
Characteristic extracting module 510, for obtaining the operation behavior data collected by data collection function;To operation behavior
Data carry out feature extraction.
Data reporting module 512 reports to server for will extract obtained characteristic.
As shown in fig. 7, in one embodiment, operation behavior data include text data;Characteristic is feature vector.
Characteristic extracting module 510, comprising:
Word segmentation module 510a carries out word segmentation processing for the operation behavior data to text, obtains word segment;From each word piece
Keyword segment is extracted in section.
Feature vector generation module 510b, for will extract obtained each keyword segment be quantified as corresponding word to
Amount;Obtained each term vector is combined according to the precedence relationship of the corresponding position in operation behavior data, is operated
The feature vector of behavioral data.
Specific about transacter limits the restriction that may refer to above for method of data capture, herein not
It repeats again.Modules in above-mentioned transacter can be realized fully or partially through software, hardware and combinations thereof.On
Stating each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also store in a software form
In memory in computer equipment, the corresponding operation of the above modules is executed in order to which processor calls.
In one embodiment, a kind of computer equipment is provided, which can be the terminal 110 in Fig. 1,
Its internal structure chart can be as shown in Figure 8.The computer equipment includes processor, the memory, net connected by system bus
Network interface, display screen and input unit.Wherein, the processor of the computer equipment is for providing calculating and control ability.The meter
The memory for calculating machine equipment includes non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operation system
System and computer program.The built-in storage provides for the operation of operating system and computer program in non-volatile memory medium
Environment.The network interface of the computer equipment is used to communicate with external terminal by network connection.The computer program is located
It manages when device executes to realize a kind of method of data capture.The display screen of the computer equipment can be liquid crystal display or electronics
Ink display screen, the input unit of the computer equipment can be the touch layer covered on display screen, are also possible to computer and set
Key, trace ball or the Trackpad being arranged on standby shell, can also be external keyboard, Trackpad or mouse etc..
It will be understood by those skilled in the art that structure shown in Fig. 8, only part relevant to application scheme is tied
The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment
It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, which is stored with
Computer program, the processor perform the steps of when executing computer program in application program launching, determine crucial primary
Function;Crucial primary function is subjected to function with customized data collection function and exchanges processing;In the operation of application program
Cheng Zhong monitors the action event for being directed to application program;When the primary function that the action event of monitoring to be called is crucial primary
When function, then by calling the data collection function swapped with crucial primary function, behaviour corresponding with action event is collected
Make behavioral data;After data collection, triggering calls crucial primary function to execute handle corresponding with action event.
In one embodiment, in application program launching, determine that crucial primary function includes: in application program launching
When, starting notice is sent to server;Receive the data acquisition instruction that server is sent after receiving starting notice;Extract data
The data type mark carried in acquisition instruction;Processing is corresponded into the primary function of the data of data type mark as key
Primary function.
In one embodiment, in application program launching, determine that crucial primary function includes: in application program launching
When, obtain type identification corresponding to application program;Obtain pair between the primary function of pre-set key and type identification
It should be related to;According to corresponding relationship, the primary function of key corresponding with the type identification found is determined.
In one embodiment, in application program launching, determine that crucial primary function includes: in application program launching
When, obtain the Key Functions mark in advance for application program addition;Key Functions are identified provide with operating system it is primary
Function is matched;Matched primary function is identified with Key Functions in the primary function that operating system is provided, as key
Primary function.
In one embodiment, after in application program launching, determining crucial primary function, which executes meter
The key primary function that will be determined also is performed the steps of when calculation machine program adds corresponding key signature;Applying journey
In the operational process of sequence, after monitoring the action event for application program, method further include: determine the action event listened to
The primary function to be called;Whether there is corresponding key signature in primary function determined by detecting;When primary function has
When having corresponding key signature, determine primary function for crucial primary function.
In one embodiment, acquisition is also performed the steps of when which executes computer program to receive by data
The operation behavior data that set function is collected;Feature extraction is carried out to operation behavior data;Obtained characteristic will be extracted to report
To server.
In one embodiment, operation behavior data include text data;Characteristic is feature vector;To operation behavior
It includes: to carry out word segmentation processing to the operation behavior data of text that data, which carry out feature extraction, obtains word segment;From each word segment
Extract keyword segment;Obtained each keyword segment will be extracted and be quantified as corresponding term vector;The each word that will be obtained
Vector is combined according to the precedence relationship of the corresponding position in operation behavior data, obtain the features of operation behavior data to
Amount.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
Machine program is performed the steps of when being executed by processor in application program launching, determines crucial primary function;It will be crucial primary
Function carries out function with customized data collection function and exchanges processing;In the operational process of application program, monitors to be directed to and answer
With the action event of program;When the primary function that the action event of monitoring to be called is crucial primary function, then pass through tune
With the data collection function swapped with crucial primary function, operation behavior data corresponding with action event are collected;In number
After collection, triggering calls crucial primary function to execute handle corresponding with action event.
In one embodiment, in application program launching, determine that crucial primary function includes: in application program launching
When, starting notice is sent to server;Receive the data acquisition instruction that server is sent after receiving starting notice;Extract data
The data type mark carried in acquisition instruction;Processing is corresponded into the primary function of the data of data type mark as key
Primary function.
In one embodiment, in application program launching, determine that crucial primary function includes: in application program launching
When, obtain type identification corresponding to application program;Obtain pair between the primary function of pre-set key and type identification
It should be related to;According to corresponding relationship, the primary function of key corresponding with the type identification found is determined.
In one embodiment, in application program launching, determine that crucial primary function includes: in application program launching
When, obtain the Key Functions mark in advance for application program addition;Key Functions are identified provide with operating system it is primary
Function is matched;Matched primary function is identified with Key Functions in the primary function that operating system is provided, as key
Primary function.
In one embodiment, after in application program launching, determining crucial primary function, which executes meter
The key primary function that will be determined also is performed the steps of when calculation machine program adds corresponding key signature;Applying journey
In the operational process of sequence, after monitoring the action event for application program, method further include: determine the action event listened to
The primary function to be called;Whether there is corresponding key signature in primary function determined by detecting;When primary function has
When having corresponding key signature, determine primary function for crucial primary function.Conversely, when primary function does not have corresponding key signature
When, then determining the system function not is crucial primary function.
In one embodiment, acquisition is also performed the steps of when which executes computer program to receive by data
The operation behavior data that set function is collected;Feature extraction is carried out to operation behavior data;Obtained characteristic will be extracted to report
To server.
In one embodiment, operation behavior data include text data;Characteristic is feature vector;To operation behavior
It includes: to carry out word segmentation processing to the operation behavior data of text that data, which carry out feature extraction, obtains word segment;From each word segment
Extract keyword segment;Obtained each keyword segment will be extracted and be quantified as corresponding term vector;The each word that will be obtained
Vector is combined according to the precedence relationship of the corresponding position in operation behavior data, obtain the features of operation behavior data to
Amount.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.
Claims (10)
1. a kind of method of data capture, which comprises
In application program launching, crucial primary function is determined;
The primary function of key is subjected to function with customized data collection function and exchanges processing;
In the operational process of the application program, the action event for being directed to the application program is monitored;
When the primary function that the action event of monitoring to be called is the crucial primary function, then
By calling the data collection function swapped with the primary function of key, collect corresponding with the action event
Operation behavior data;
After data collection, triggering calls the primary function of the key to execute handle corresponding with the action event.
2. the method according to claim 1, wherein described in application program launching, determining crucial primary letter
Number includes:
In application program launching, starting notice is sent to server;
Receive the data acquisition instruction that the server is sent after receiving the starting notice;
Extract the data type mark carried in the data acquisition instruction;
Processing is corresponded into the primary function of the data of data type mark as crucial primary function.
3. the method according to claim 1, wherein described in application program launching, determining crucial primary letter
Number includes:
In application program launching, type identification corresponding to the application program is obtained;
Obtain the corresponding relationship between the primary function of pre-set key and type identification;
According to the corresponding relationship, the primary function of key corresponding with the type identification found is determined.
4. the method according to claim 1, wherein described in application program launching, determining crucial primary letter
Number includes:
In application program launching, the Key Functions mark in advance for application program addition is obtained;
The Key Functions are identified and are matched with the primary function that operating system provides;
Matched primary function is identified with the Key Functions in the primary function that the operating system is provided, as crucial former
Raw function.
5. the method according to claim 1, wherein being determined crucial primary described in application program launching
After function, the method also includes:
The primary function of key determined is added into corresponding key signature;
It is described after monitoring the action event for the application program described in the operational process of the application program
Method further include:
Determine the action event primary function to be called listened to;
Whether there is corresponding key signature in the primary function determined by detecting;
When the primary function has corresponding key signature, determine the primary function for crucial primary function.
6. the method according to claim 1, wherein the method also includes:
Obtain the operation behavior data collected by the data collection function;
Feature extraction is carried out to the operation behavior data;
Obtained characteristic will be extracted and report to server.
7. according to the method described in claim 6, it is characterized in that, the operation behavior data include text data;The spy
Sign data are feature vector;It is described to include: to operation behavior data progress feature extraction
Word segmentation processing is carried out to the operation behavior data of text, obtains word segment;
Keyword segment is extracted from each word segment;
Obtained each keyword segment will be extracted and be quantified as corresponding term vector;
Obtained each term vector is combined according to the precedence relationship of the corresponding position in operation behavior data, is obtained described
The feature vector of operation behavior data.
8. a kind of transacter, which is characterized in that described device includes:
Key Functions determining module, in application program launching, determining crucial primary function;
Function Switching Module exchanges place for the primary function of key to be carried out function with customized data collection function
Reason;
Data collection module, for monitoring the operation thing for being directed to the application program in the operational process of the application program
Part;When the primary function that the action event of monitoring to be called is the crucial primary function, then by calling and the pass
The data collection function that the primary function of key swaps collects operation behavior data corresponding with the action event;
Processing module, for after data collection, triggering to call the primary function of the key to execute and the action event
Corresponding processing.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists
In the step of processor realizes any one of claims 1 to 7 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811122839.7A CN109446067A (en) | 2018-09-26 | 2018-09-26 | Method of data capture, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811122839.7A CN109446067A (en) | 2018-09-26 | 2018-09-26 | Method of data capture, device, computer equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109446067A true CN109446067A (en) | 2019-03-08 |
Family
ID=65544552
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811122839.7A Pending CN109446067A (en) | 2018-09-26 | 2018-09-26 | Method of data capture, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109446067A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120204193A1 (en) * | 2011-02-08 | 2012-08-09 | Nethercutt Glenn T | Methods and computer program products for monitoring system calls using safely removable system function table chaining |
US20140059525A1 (en) * | 2012-08-24 | 2014-02-27 | Vmware, Inc. | Method and system for facilitating replacement of system calls |
CN104281520A (en) * | 2013-07-10 | 2015-01-14 | 腾讯科技(深圳)有限公司 | Tracking and debugging method, device and system |
US20160110236A1 (en) * | 2011-12-06 | 2016-04-21 | Introspex, Inc. | Analytics data collection with low integration cost for dynamic message passing systems |
CN106294408A (en) * | 2015-05-22 | 2017-01-04 | 阿里巴巴集团控股有限公司 | The method and apparatus that the Asynchronous Request of dynamic web page is monitored |
CN106844181A (en) * | 2017-02-07 | 2017-06-13 | 网易(杭州)网络有限公司 | Method, system and mobile terminal for recording user behavior |
CN106980614A (en) * | 2016-01-15 | 2017-07-25 | 中国科学院声学研究所 | A kind of Web page speech control implementation method extended based on JavaScript |
-
2018
- 2018-09-26 CN CN201811122839.7A patent/CN109446067A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120204193A1 (en) * | 2011-02-08 | 2012-08-09 | Nethercutt Glenn T | Methods and computer program products for monitoring system calls using safely removable system function table chaining |
US20160110236A1 (en) * | 2011-12-06 | 2016-04-21 | Introspex, Inc. | Analytics data collection with low integration cost for dynamic message passing systems |
US20140059525A1 (en) * | 2012-08-24 | 2014-02-27 | Vmware, Inc. | Method and system for facilitating replacement of system calls |
CN104281520A (en) * | 2013-07-10 | 2015-01-14 | 腾讯科技(深圳)有限公司 | Tracking and debugging method, device and system |
CN106294408A (en) * | 2015-05-22 | 2017-01-04 | 阿里巴巴集团控股有限公司 | The method and apparatus that the Asynchronous Request of dynamic web page is monitored |
CN106980614A (en) * | 2016-01-15 | 2017-07-25 | 中国科学院声学研究所 | A kind of Web page speech control implementation method extended based on JavaScript |
CN106844181A (en) * | 2017-02-07 | 2017-06-13 | 网易(杭州)网络有限公司 | Method, system and mobile terminal for recording user behavior |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109672741B (en) | Micro-service monitoring method and device, computer equipment and storage medium | |
Kong et al. | Automated testing of android apps: A systematic literature review | |
CN109284269B (en) | Abnormal log analysis method and device, storage medium and server | |
CN107783899B (en) | Method and device for testing H5 page in application program and computer equipment | |
CN110290212A (en) | Service call recording method, device, computer equipment and storage medium | |
CN103984626B (en) | A kind of method and device for generating test case script | |
CN107193743B (en) | Application evaluation method and device, computer equipment and storage medium | |
CN110825618A (en) | Method and related device for generating test case | |
CN107003931B (en) | Decoupling test validation from test execution | |
CN111552633A (en) | Interface abnormal call testing method and device, computer equipment and storage medium | |
CN109783365A (en) | Automated testing method, device, computer equipment and storage medium | |
CN112597020A (en) | Interface testing method and device, computer equipment and storage medium | |
CN112115038A (en) | Application testing method and device and storage medium | |
CN114996103A (en) | Page abnormity detection method and device, electronic equipment and storage medium | |
CN110232018A (en) | Interface test method, device, computer equipment | |
WO2021061185A1 (en) | Test automation of application | |
CN112395182A (en) | Automatic testing method, device, equipment and computer readable storage medium | |
CN111414309A (en) | Automatic test method of application program, computer equipment and storage medium | |
CN109446067A (en) | Method of data capture, device, computer equipment and storage medium | |
CN109995931B (en) | Method and device for realizing automatic calling | |
CN115794583A (en) | Kernel analysis method and device | |
CN112817782B (en) | Data acquisition reporting method and device, electronic equipment and storage medium | |
CN109359295A (en) | Semantic analytic method, device, computer equipment and the storage medium of natural language | |
CN108563578A (en) | SDK compatibility detection method, device, equipment and readable storage medium storing program for executing | |
CN115016775A (en) | Interface simulation method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |