Invention content
In view of this, the application provide a kind of domestic consumer's behavioral data acquisition method based on smart television, device and
Computer readable storage medium is solved the problems, such as or is at least partly solved above-mentioned.
In order to solve the above technical problems, technical solution provided by the invention is a kind of domestic consumer's row based on smart television
For collecting method, including:
Judge whether to receive the user behavior data of smart television, if so, generating active user's user behaviors log, and enters
In next step, if it is not, being then failure to actuate;
The online equipment data of home network where obtaining smart television simultaneously generate current online equipment daily record, to currently existing
Line device log is pre-processed;
Domestic consumer's user behaviors log is generated according to active user's user behaviors log and pretreated current online equipment daily record
Data simultaneously store.
More preferably, it is described obtain smart television where home network online equipment data and generate current online equipment day
The method of will, including:
The arp tables of the network equipment of home network, generate current online equipment daily record where reading smart television;Wherein,
The current online equipment daily record includes logging time, smart television mac, online equipment mac and online equipment ip;
Filtering is not required to the current online equipment daily record preserved.
More preferably, the method that the filtering is not required to the current online equipment daily record preserved, including:
Obtain logging device mac to be filtered set, filter online equipment mac in current online equipment daily record with it is to be filtered
The identical current online equipment daily records of equipment mac in logging device mac set;
Filter the current online equipment daily record that the online equipment mac in current online equipment daily record is smart television mac;
Filter the current online equipment daily record that the online equipment ip suffix in current online equipment daily record is .1 and .255.
More preferably, described that pretreated method is carried out to current online equipment daily record, including:
The corresponding device types of online equipment mac in current online equipment daily record are determined, by the current online equipment
Daily record is updated to include logging time, smart television mac, online equipment mac and device type;
Go out current online equipment daily record to be analyzed according to preset Log Filter conditional filtering, traversal is described to be analyzed
Current online equipment daily record, updates current online equipment mac lists.
More preferably, the method for the corresponding device types of online equipment mac in the current online equipment daily record of the determination, packet
It includes:
Obtain equipment mac corresponding device type lists;
Online equipment in being inquired in the equipment mac corresponding device type lists and obtaining current online equipment daily record
The corresponding device types of mac;
If failing to inquire in the equipment mac corresponding device type lists, existed by the inquiry of other online modes
The corresponding device types of line equipment mac, and by online equipment mac and the corresponding device type inquired update to mac pairs of equipment
It answers in device type list.
More preferably, the method for generating active user's user behaviors log, including:
The user behavior data of smart television is received, active user's user behaviors log is generated;Active user's user behaviors log
Including logging time, smart television mac and user behavior data.
More preferably, it is described according to active user's user behaviors log and pretreated current online equipment daily record generate it is home-use
Family user behaviors log data and the method for storage, including:
Active user's user behaviors log and current online equipment mac lists are obtained, generates domestic consumer's user behaviors log data simultaneously
Storage;Wherein, domestic consumer's user behaviors log data include logging time, smart television mac, user behavior data and current
Online equipment mac lists.
More preferably, the acquisition method further includes:
Judge whether domestic consumer's user behaviors log data of storage reach default upload condition, if so, will be described
Domestic consumer's user behaviors log data of storage upload, if it is not, being then failure to actuate.
The present invention also provides a kind of domestic consumer's behavioral data harvester based on smart television, including:
User behavior data processing module, the user behavior data for judging whether to receive smart television, if so, raw
At active user's user behaviors log, and enter online equipment data processing module, if it is not, being then failure to actuate;
Online equipment data processing module, online equipment data for obtaining home network where smart television simultaneously generate
Current online equipment daily record, pre-processes current online equipment daily record;
Family's daily record data generation module, for according to active user's user behaviors log and pretreated current online equipment
Daily record generates domestic consumer's user behaviors log data and stores.
More preferably, the online equipment data processing module includes:
Online equipment data acquisition unit, the ARP table of the network equipment for home network where reading smart television are raw
At current online equipment daily record;Wherein, the current online equipment daily record includes logging time, smart television mac, online equipment
Mac and online equipment ip;
Online equipment data filtering units, for filtering the current online equipment daily record for being not required to preserve.
More preferably, the online equipment data filtering units include:
First daily record filter assemblies are filtered for obtaining logging device mac set to be filtered in current online equipment daily record
Online equipment mac and logging device mac to be filtered gather in the identical current online equipment daily records of equipment mac;
Second daily record filter assemblies are smart television mac for filtering the online equipment mac in current online equipment daily record
Current online equipment daily record;
Third daily record filter assemblies are .1 and .255 for filtering the online equipment ip suffix in current online equipment daily record
Current online equipment daily record.
More preferably, the online equipment data processing module further includes:
Online equipment type identification unit is set for determining that the online equipment mac in current online equipment daily record is corresponding
Standby type, the current online equipment daily record is updated to include logging time, smart television mac, online equipment mac and equipment
Type;
Online equipment Log Filter unit, it is to be analyzed current online for going out according to preset Log Filter conditional filtering
Device log traverses current online equipment daily record to be analyzed, updates current online equipment mac lists.
More preferably, the online equipment type identification unit includes:
Device type securing component, for obtaining equipment mac corresponding device type lists;
Device type enquiring component currently exists for inquiring and obtaining in the equipment mac corresponding device type lists
The corresponding device types of online equipment mac in line device log;
Device type more New Parent, for when failing to inquire in the equipment mac corresponding device type lists, then leading to
Cross the corresponding device types of other online modes inquiry online equipment mac, and by online equipment mac and the corresponding equipment that inquires
In type update to equipment mac corresponding device type lists.
More preferably, the user behavior data processing module includes:
User behavior data processing unit, the user behavior data for receiving smart television generate active user's behavior
Daily record;Active user's user behaviors log includes logging time, smart television mac and user behavior data.
More preferably, family's daily record data generation module includes:
Family's daily record data generating unit, it is raw for obtaining active user's user behaviors log and current online equipment mac lists
At family's User action log data and store;Wherein, domestic consumer's user behaviors log data include logging time, intelligence electricity
Depending on mac, user behavior data and current online equipment mac lists.
More preferably, the harvester further includes:
Family's daily record data uploading module, for judging whether domestic consumer's user behaviors log data of storage reach pre-
If the condition of upload, if so, domestic consumer's user behaviors log data of the storage are uploaded, if it is not, being then failure to actuate.
The present invention also provides a kind of domestic consumer's behavioral data harvester based on smart television, including:
Memory, for storing computer program;
Processor, for executing the computer program to realize above-mentioned domestic consumer's behavioral data based on smart television
The step of acquisition method.
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the meter
Calculation machine program realizes the step of above-mentioned domestic consumer's behavioral data acquisition method based on smart television when being executed by processor.
Compared with prior art, detailed description are as follows for advantage by the application:It is provided by the present application to be based on smart television
Domestic consumer's behavioral data acquisition method, by acquire smart television user behavior data while acquire smart television
The data of the online equipment data of place home network, acquisition generate domestic consumer's user behaviors log data for high in the clouds after processing
Server uses.Domestic consumer's user behaviors log data of generation can be used in the structure of subscriber household portrait and for not consanguinity
The personal program of front yard user is recommended, and the user experience is improved, further meets personalized recommendation of the client to smart television
It is required that.
Specific implementation mode
It is below in conjunction with the accompanying drawings and specific real in order to make those skilled in the art more fully understand technical scheme of the present invention
Applying example, the present invention is described in further detail.
As shown in Figure 1, the embodiment of the present invention one provides a kind of domestic consumer's behavioral data acquisition side based on smart television
Method, including:
S1:Judge whether to receive the user behavior data of smart television, if so, into S21, and enter S22, if it is not,
Then it is failure to actuate;
S21:Generate active user's user behaviors log;
S22:The online equipment data of home network where obtaining smart television simultaneously generate current online equipment daily record, enter
S23;
S23:Current online equipment daily record is pre-processed;
S3:Domestic consumer's behavior day is generated according to active user's user behaviors log and pretreated current online equipment daily record
Will data simultaneously store.
Work as it should be noted that obtaining the online equipment data of smart television place home network in step S22 and generating
The method of preceding online equipment daily record, including:
S221:The ARP table of the network equipment of home network, generates current online equipment daily record where reading smart television;
Wherein, the current online equipment daily record includes logging time, smart television mac, online equipment mac and online equipment ip;
S222:Filtering is not required to the current online equipment daily record preserved.
Specifically, the method that filtering is not required to the current online equipment daily record preserved in step S222, including:
S2221:Obtain logging device mac to be filtered set, filter online equipment mac in current online equipment daily record with
The identical current online equipment daily records of equipment mac in logging device mac set to be filtered;
S2222:Filter the current online equipment that the online equipment mac in current online equipment daily record is smart television mac
Daily record;
S2223:Filter the current online equipment that the online equipment ip suffix in current online equipment daily record is .1 and .255
Daily record.
Wherein, the method that logging device mac to be filtered gathers is obtained in step S2221, may include:(1) intelligence is obtained
The mac of TV monitors smart television networking broadcast;(2) it is carried to cloud server device_server by smart television mac
The api interface of confession obtains the logging device mac set exclude_device_temp to be filtered of some smart television.(3) if
It is failed to obtain exclude_device_temp, then the already existing exclude_device of smart television is used, if obtained
Value successful then that former exclude_device is replaced with to exclude_device_temp.Wherein, the network equipment can be routing
The network equipments such as device, interchanger.
It, can also be (such as 3 points at interval of certain time specifically, when user does not operate smart television
Clock), smart television obtains current arp information by local arp tables, and generates current online equipment daily record, current online
Device log is<Logging time, TV mac, equipment mac, equipment ip>.
After filtering out equipment mac to be filtered corresponding current online equipment daily records, if current there is also what need to be uploaded
Online equipment daily record device_log, then carry out next step, otherwise waits for data collection next time.Next step includes filtering
Smart television oneself mac and ip suffix is the current online equipment daily record of xxx.1 (gateway) and xxx.255 (broadcast).
It should be noted that pretreated method is carried out to current online equipment daily record in step S23, including:
S231:Determine the corresponding device types of online equipment mac in current online equipment daily record, it will be described current online
Device log is updated to include logging time, smart television mac, online equipment mac and device type;
S232:Go out current online equipment daily record to be analyzed according to preset Log Filter conditional filtering, traversal is to be analyzed
Current online equipment daily record, update current online equipment mac lists.
Specifically, determining the corresponding device types of online equipment mac in current online equipment daily record in step S231
Method, including:
S2311:Obtain equipment mac corresponding device type lists;
S2312:Inquired in the equipment mac corresponding device type lists and obtain in current online equipment daily record
The corresponding device types of line equipment mac;
S2313:If failing to inquire in the equipment mac corresponding device type lists, pass through other online modes
The corresponding device types of online equipment mac are inquired, and online equipment mac and the corresponding device type inquired are updated to equipment
In mac corresponding device type lists.
Wherein, the method that equipment mac corresponding device type lists are obtained in step S2311, can be by connecting high in the clouds clothes
Business device, the device_server of cloud server is for preserving smart television and place home network environment equipment mac and correspondence
Device type, storage format are<TV mac, equipment mac, device type>, obtain equipment mac corresponding device type lists and also may be used
With by reading the equipment mac corresponding device type lists being locally stored.
In step S2313, the corresponding device type of online equipment mac is inquired by other online modes, it can be by the
Tripartite api is realized.After inquiring, need online equipment mac and the corresponding device type inquired update to mac pairs of equipment
It answers in device type list, by local update or cloud server update can be uploaded to.
Specifically, carrying out pretreated method to current online equipment daily record in step S23, can also include:
S233:Filter out the current online equipment daily record of exception or absent field.Current online equipment daily record is carried out
Log_clear is generated as after pretreatment.
Specifically, going out current online equipment daily record to be analyzed in step S232 according to preset Log Filter conditional filtering
Method, the daily record log_phone for selecting that device type in current online equipment is mobile phone can be filtered, preserving format is<Day
Will time, TV mac, equipment mac, device type, online hours>.Wherein online hours are the acquisition interval time.
Specifically, traversing current online equipment daily record to be analyzed in step S232, current online equipment mac lists are updated
Method, including:(1) traverse the daily record set of each equipment mac successively, (2) with 30 minutes for a period, by mac's
Online hours are cumulative, and whether (3) compare first 30 minutes or latter 30 minutes more than 30 points if certain period is more than 30 minutes
Clock is less than, and redundance is added to its relative time section.
It should be noted that the method that active user's user behaviors log is generated in step S21, including:
The user behavior data of smart television is received, active user's user behaviors log is generated;Active user's user behaviors log
Including logging time, smart television mac and user behavior data.
It should be noted that according to active user's user behaviors log and pretreated current online equipment daily record in step S3
Domestic consumer's user behaviors log data and the method for storage are generated, including:
Active user's user behaviors log and current online equipment mac lists are obtained, generates domestic consumer's user behaviors log data simultaneously
Storage;Wherein, domestic consumer's user behaviors log data include logging time, smart television mac, user behavior data and current
Online equipment mac lists.
Wherein, current online equipment mac lists can be the online equipment mac lists that device type is mobile phone.User's row
Include for data:Film is clicked, plays (including duration), collection etc..
As shown in Fig. 2, the embodiment of the present invention two also provides a kind of domestic consumer's behavioral data acquisition based on smart television
Method, on the basis of embodiment one, acquisition method further includes:
S4:Judge whether domestic consumer's user behaviors log data of storage reach default upload condition, if so, into
S5, if it is not, being then failure to actuate;
S5:Domestic consumer's user behaviors log data of the storage are uploaded.
Specifically, domestic consumer's user behaviors log is uploaded to the condition of cloud server to be:(1) file size is monitored
Whether more than 1M, if it exceeds then uploading;(2) timing (every 1 minute) uploads journal file.
Cloud server receives daily record and the method for cleaning includes:(1) log server receives daily record, and (2) clean data,
Including shortage of data or the non-type data of format, (3) remove corresponding click thing if same film has broadcast event
Part.
As shown in figure 3, the embodiment of the present invention three provides a kind of domestic consumer's behavioral data acquisition dress based on smart television
It sets, including:
User behavior data processing module, the user behavior data for judging whether to receive smart television, if so, raw
At active user's user behaviors log, and enter online equipment data processing module, if it is not, being then failure to actuate;
Online equipment data processing module, online equipment data for obtaining home network where smart television simultaneously generate
Current online equipment daily record, pre-processes current online equipment daily record;
Family's daily record data generation module, for according to active user's user behaviors log and pretreated current online equipment
Daily record generates domestic consumer's user behaviors log data and stores.
It should be noted that online equipment data processing module includes:
Online equipment data acquisition unit, the ARP table of the network equipment for home network where reading smart television are raw
At current online equipment daily record;Wherein, the current online equipment daily record includes logging time, smart television mac, online equipment
Mac and online equipment ip;
Online equipment data filtering units, for filtering the current online equipment daily record for being not required to preserve.
Wherein, online equipment data filtering units include:
First daily record filter assemblies are filtered for obtaining logging device mac set to be filtered in current online equipment daily record
Online equipment mac and logging device mac to be filtered gather in the identical current online equipment daily records of equipment mac;
Second daily record filter assemblies are smart television mac for filtering the online equipment mac in current online equipment daily record
Current online equipment daily record;
Third daily record filter assemblies are .1 and .255 for filtering the online equipment ip suffix in current online equipment daily record
Current online equipment daily record.
Specifically, online equipment data processing module further includes:
Online equipment type identification unit is set for determining that the online equipment mac in current online equipment daily record is corresponding
Standby type, the current online equipment daily record is updated to include logging time, smart television mac, online equipment mac and equipment
Type;
Online equipment Log Filter unit, it is to be analyzed current online for going out according to preset Log Filter conditional filtering
Device log traverses current online equipment daily record to be analyzed, updates current online equipment mac lists.
Wherein, online equipment type identification unit includes:
Device type securing component, for obtaining equipment mac corresponding device type lists;
Device type enquiring component currently exists for inquiring and obtaining in the equipment mac corresponding device type lists
The corresponding device types of online equipment mac in line device log;
Device type more New Parent, for when failing to inquire in the equipment mac corresponding device type lists, then leading to
Cross the corresponding device types of other online modes inquiry online equipment mac, and by online equipment mac and the corresponding equipment that inquires
In type update to equipment mac corresponding device type lists.
It should be noted that user behavior data processing module includes:
User behavior data processing unit, the user behavior data for receiving smart television generate active user's behavior
Daily record;Active user's user behaviors log includes logging time, smart television mac and user behavior data.
It should be noted that family's daily record data generation module includes:
Family's daily record data generating unit, it is raw for obtaining active user's user behaviors log and current online equipment mac lists
At family's User action log data and store;Wherein, domestic consumer's user behaviors log data include logging time, intelligence electricity
Depending on mac, user behavior data and current online equipment mac lists.
As shown in figure 4, the embodiment of the present invention four also provides a kind of domestic consumer's behavioral data acquisition based on smart television
Device, on the basis of embodiment three, harvester further includes:
Family's daily record data uploading module, for judging whether domestic consumer's user behaviors log data of storage reach pre-
If the condition of upload, if so, domestic consumer's user behaviors log data of the storage are uploaded, if it is not, being then failure to actuate.
Fig. 3 and the explanation of feature in embodiment corresponding to Fig. 4 may refer to mutually speaking on somebody's behalf for Fig. 1 and embodiment corresponding to Fig. 2
It is bright, it no longer repeats one by one here.
The embodiment of the present invention five also provides a kind of domestic consumer's behavioral data harvester based on smart television, including:
Memory, for storing computer program;
Processor, for executing the computer program to realize above-mentioned domestic consumer's behavioral data based on smart television
The step of acquisition method.
The embodiment of the present invention six also provides a kind of computer readable storage medium, the computer-readable recording medium storage
There are computer program, the computer program to realize above-mentioned domestic consumer's behavior number based on smart television when being executed by processor
The step of according to acquisition method.
The inventive principle of the present invention:Average family uses a router, and existing smart machine can network.It is logical
The facility information read in local arp tables acquisition current network is crossed, the operation information of smart television is combined with the user of acquisition
After processing timing/it is quantitative data are reported into large data center (cloud server), large data center passes through to data analysis
Smart machine quantity (mobile phone, computer, pad, speaker etc.) in the home network miscellaneous equipment usage behavior of user, network is excavated to transport
Turn situation, different periods domestic consumer number of members and be used the member of equipment, home intelligent equipment working order structure
Domestic consumer draws a portrait.
Be provided for the embodiments of the invention above a kind of domestic consumer's behavioral data acquisition method based on smart television,
Device and computer readable storage medium are described in detail.Each embodiment is described by the way of progressive in specification,
Each embodiment focuses on the differences from other embodiments, and identical similar portion is mutual between each embodiment
Referring to.For the device disclosed in the embodiment, since it is corresponded to the methods disclosed in the examples, so the ratio of description
Relatively simple, reference may be made to the description of the method.It should be pointed out that coming for those skilled in the art
It says, without departing from the principle of the present invention, can be with several improvements and modifications are made to the present invention, these improvement and modification
It also falls within the protection scope of the claims of the present invention.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure
And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is implemented in hardware or software actually, depends on the specific application and design constraint of technical solution.Profession
Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered
Think beyond the scope of this invention.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor
The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.