The statistics and reminding method and its device of mobile phone advertisement flow
Technical field
The present invention relates to communications field information filtering field, and in particular to the statistical method and dress of a kind of mobile phone advertisement flow
Put, and mobile phone advertisement chained address reminding method and device.
Background technology
With the development of technology, transmission on Internet scope is wide, interactivity is strong, renewal speed is fast, fundamentally changes biography
The person of broadcasting and by the relation between biography person is the destructing to the communication mode of traditional media and is overturned.And in mobile communication day increasingly
The today reached, cell phone network is also into one of important channel of advertizing.In addition to embedded advertisement on the webpage in internet,
Many application programs itself can also carry ad content.The advertisement that application program is carried can be presented in several ways, such as be notified
Column advertisement, the embedded advertisement of program, integration wall and pop-up ad etc..
Above-mentioned advertising message does not only take up the memory headroom of system, also users can be forced to be not navigate through its advertisement
The service efficiency of content, the operating experience of influence user, and user.And the advertisement of application program can pass through networking constantly conversion
Content, What is more, and some advertisement link addresses can also reconditely be networked on backstage, the flow of user is wasted, to user
Cause unnecessary loss.
Therefore, it is necessary to by the flow indication of the advertisement consumption in application program of mobile phone to user, to point out user, this is wide
There is risk in announcement.
The content of the invention
It is an object of the invention to overcome shortcoming and deficiency of the prior art, there is provided a kind of prompting of mobile phone advertisement flow
Method.
The present invention is realized using following technical scheme:A kind of mobile phone advertisement flow prompt method, including following step
Suddenly:
Step one:The network function of adapter system;
Step 2:IP address, port and link information are analyzed from the contiguous function in network function;
Step 3:Meanwhile, parse Http agreements, network address and link information from the read/write function in network function;
Step 4:According to the link information of associated steps two and three, IP address, port and Http agreements are associated with network address
Go out IP ports network address, so as to obtain mobile phone advertisement chained address;
Step 5:Show the mobile phone advertisement chained address.
And, present invention also offers a kind of suggestion device of mobile phone advertisement chained address, it includes
Adapter module, the network function of its adapter system;
IP address, port and link information acquisition module, its analyzed from the contiguous function in network function IP address,
Port and link information;
Http agreements, network address and link information acquisition module, parse Http associations from the read/write function in network function
View, network address and link information;
Relating module, it is according to IP address, port and link information acquisition module and Http agreements, network address and link information
The link information of acquisition module, associates out IP ports network address with network address, so as to obtain mobile phone by IP address, port and Http agreements
Advertisement link address;And
Display module, it shows the mobile phone advertisement chained address.
The mobile phone advertisement chained address reminding method and its device provided relative to prior art, the present invention passes through to network
Function takes over and analyzed, and obtains mobile phone advertisement chained address, the user advertisement link address can be pointed out to there is risk, with
Avoid unnecessary loss.
Further, the present invention also provides a kind of acquisition methods of mobile phone advertisement chained address, comprises the following steps:
Step one:The network function of adapter system;
Step 2:IP address, port and link information are analyzed from the contiguous function in network function;
Step 3:Meanwhile, parse Http agreements, network address and link information from the read/write function in network function;
Step 4:According to the link information of associated steps two and three, IP address, port and Http agreements are associated with network address
Go out IP ports network address, so as to obtain mobile phone advertisement chained address.
And there is provided a kind of acquisition device of mobile phone advertisement chained address, it includes
Adapter module, the network function of its adapter system;
IP address, port and link information acquisition module, its analyzed from the contiguous function in network function IP address,
Port and link information;
Http agreements, network address and link information acquisition module, parse Http associations from the read/write function in network function
View, network address and link information;And
Relating module, it is according to IP address, port and link information acquisition module and Http agreements, network address and link information
The link information of acquisition module, associates out IP ports network address with network address, so as to obtain mobile phone by IP address, port and Http agreements
Advertisement link address.
The mobile phone advertisement chained address acquisition methods and its device provided relative to prior art, the present invention pass through to network
Function takes over and analyzed, to obtain mobile phone advertisement chained address.
In order to be able to the apparent understanding present invention, the embodiment of the present invention is illustrated below with reference to brief description of the drawings.
Brief description of the drawings
Fig. 1 is the flow chart of the statistical method of the mobile phone advertisement flow of the present invention.
Fig. 2 is the system architecture diagram of Android operation system.
Fig. 3 is the module diagram of the statistic device of the mobile phone advertisement flow of the present invention.
Fig. 4 is the flow chart of the reminding method of the mobile phone advertisement flow of the present invention.
Fig. 5 is the module diagram of the suggestion device of the mobile phone advertisement flow of the present invention.
Embodiment
Embodiment 1
Referring to Fig. 1, it is the flow chart of the preparation method of the mobile phone advertisement flow of the present invention.The mobile phone advertisement chain is grounded
The acquisition methods of location include step:
Step S1:The network function of adapter system.
Wherein, Hook Mechanism is passed through(Hook)The network function of acquisition system.The network function of the system is a set of function
Race.Hook, is a platform of operating system message processing facility, and application program can set sub- journey specified to monitor above
Certain message of window, and the window monitored can other processes created.After message is reached, in target window
Handle function pre-treatment it.Hook Mechanism allows application program to intercept and capture processing operating system message or particular event.Hook is real
It is the program segment of a processing message on border, is called by system, it is linked into system.Whenever specific message is sent, do not having
Have before arrival purpose window, hook program just first captures the message, that is, Hook Function first obtains control.At this moment Hook Function
I.e. can be with working process(Change)The message, can not also deal with and continue to transmit the message, end can also be forced to disappear
The transmission of breath.
Below by taking the Android operation system of mobile phone terminal as an example, illustrate the network function method of adapter system of the present invention
Realization.
Referring to Fig. 2, it is the system architecture diagram of Android operation system.The Android operation system includes
APPLICATION(Application program)、APPLICATION FRAMEWORK(Application framework)、LIBRARIES(Storehouse)、
ANDROID RUNTIME(When Android is run)、LINUX KERNEL(Linux kernel heart program)Five layers.
Wherein, in KERNEL layers of LINUX, Android is based on Linux2.6 and provides core system service, for example:Safety,
Memory management, management of process, network stack, driving model.Linux Kernel also serve as the level of abstraction between hardware and software,
It hides particular hardware details and unified service is provided for upper strata.One is included in RUNTIME layers of ANDROID, Android
The set of core library available function in Java programming language core class libraries there is provided major part.Each Android application journey
Sequence is the example in Dalvik virtual machine, in the process for operating in themselves.At LIBRARIES layers, Android includes one
The set in C/C++ storehouses, is used for each component of android system.The application framework that these functions pass through Android
(application framework) is exposed to developer.In FRAMEWORK layers of APPLICATION, pass through and provide open
Development platform, Android, which enables developers to work out, extremely to be enriched and novel application program.And at APPLICATION layers,
Android assemble a core application set, including email client, SMS programs, calendar, map, browser,
Contact person and other settings.All application programs are all write with Java programming languages.
In the network function method of the adapter system of the present invention, by replacing LIBRARIES layers of Libc interfaces, to it
Network function takes over, further to obtain the network link information of application program.
Step S2:The flow whether detection advertisement produces.
Specifically, network function includes contiguous function(connect)With read/write function(read/write).Wherein, read/
Write function(read/write)Include the data message for the packet for sending and returning, the numerical value of its packet returned is stream
Amount.Contiguous function(connect)With read/write function(read/write)Include the network address or IP address of request networking, can carry
Take out network linking address.Further, through the following steps that detecting whether the flow produced for advertisement:
Step S21:From the contiguous function in network function(connect)In analyze IP address, port and link information
(socket).
Step S22:Meanwhile, from the read/write function in network function(read/write)In parse Http agreements, network address
(URL)And link information(socket).
Step S23:According to associated steps S22 and S23 link information, by IP address, port and Http agreements and network address
IP ports network address is associated out, so as to obtain the chained address of all networkings.
Step S24:The chained address of all networkings of acquisition is compared with an advertisement link address base, if having
The chained address matched with advertisement link address base, then judge that advertisement generates flow.
Step S3:Count and record the flow produced by advertisement.Due to the read/write function in network function(read/
write)Returned data bag in record have flow value, then can directly count and record advertisement link address packet produce
Flow value.
Referring to Fig. 3, it is the module diagram of the statistic device of the mobile phone advertisement flow of the present invention.The mobile phone advertisement stream
The statistic device of amount includes adapter module 1, detection module 2 and statistical module 3.Wherein, the detection module 2 includes IP address, end
Mouth and link information acquisition module 21, Http agreements, network address and link information acquisition module 22, relating module 23 and comparing module
24, and an advertisement link address base 25.
The network function of the adapter system of adapter module 1.Specifically, by taking the Android operation system of mobile phone terminal as an example,
The adapter module 1 is taken over to its network function, answered with further by replacing LIBRARIES layers of Libc interfaces
With the network link information of program.
The flow whether detection module 2 detection advertisement produces.
Specifically, the IP address, port and link information acquisition module 21 are from the contiguous function in network function
(connect)In analyze IP address, port and link information(socket).
The Http agreements, network address and link information acquisition module 22 are simultaneously from the read/write function in network function(read/
write)In parse Http agreements, network address(URL)And link information(socket).
The relating module 23 according to the IP address, port and link information acquisition module 21 and the Http agreements, network address and
The link information that link information acquisition module 22 is obtained, IP ports are associated out with network address by IP address, port and Http agreements
Network address, so as to obtain the chained address of all networkings.
The chained address of all networkings of acquisition and advertisement link address base 25 are compared the comparing module 24, if
With the chained address matched with advertisement link address base 25, then judge that advertisement generates flow.
The statistical module 3 counts and recorded the flow produced by advertisement.Due to the read/write function in network function(read/
write)Returned data bag in record have flow value, then directly can be counted according to the comparison result of comparing module 24 and record extensively
Accuse the flow value that the packet of chained address is produced.
The statistical method and its device of the mobile phone advertisement flow provided relative to prior art, the present invention pass through to network letter
Number takes over and analyzed, and obtains mobile phone advertisement chained address and counts the flow of its consumption, can point out user the advertisement chain
There is risk in ground connection location, to avoid unnecessary loss.
Embodiment 2
Further, present invention also offers a kind of reminding method of mobile phone advertisement flow, it is in above-mentioned mobile phone advertisement stream
By the information alert of acquisition to user on the basis of the statistical method of amount.Referring to Fig. 4, it is the mobile phone advertisement chain of the present invention
It is grounded the flow chart of the reminding method of location.Specifically include following steps:
Step S1:The network function of adapter system.Specifically, by taking the Android operation system of mobile phone terminal as an example, this connects
Tube module 11 is taken over by replacing LIBRARIES layers of Libc interfaces to its network function, and journey is applied with further acquisition
The network link information of sequence.
Step S2:The flow whether detection advertisement produces.
Specifically, network function includes contiguous function(connect)With read/write function(read/write).Wherein, read/
Write function(read/write)Include the data message for the packet for sending and returning, the numerical value of its packet returned is stream
Amount.Contiguous function(connect)With read/write function(read/write)Include the network address or IP address of request networking, can carry
Take out network linking address.Further, through the following steps that detecting whether the flow produced for advertisement:
Step S21:From the contiguous function in network function(connect)In analyze IP address, port and link information
(socket).
Step S22:Meanwhile, from the read/write function in network function(read/write)In parse Http agreements, network address
(URL)And link information(socket).
Step S23:According to associated steps S22 and S23 link information, by IP address, port and Http agreements and network address
IP ports network address is associated out, so as to obtain the chained address of all networkings.Step S24:By the link of all networkings of acquisition
Address is compared with an advertisement link address base, if with the chained address matched with advertisement link address base, judging wide
Announcement generates flow.
Step S3:Count and record the flow produced by advertisement.Due to the read/write function in network function(read/
write)Returned data bag in record have flow value, then can directly count and record advertisement link address packet produce
Flow value.
Step S4:The mobile phone advertisement flow is shown, to point out user.
Accordingly, the invention provides a kind of suggestion device of mobile phone advertisement flow.Referring to Fig. 5, it is of the invention
The module diagram of the suggestion device of mobile phone advertisement flow.The statistic device of the mobile phone advertisement flow includes adapter module 1, detection
Module 2, statistical module 3 and display module 4.Wherein, the detection module 2 includes IP address, port and link information acquisition module
21st, Http agreements, network address and link information acquisition module 22, relating module 23 and comparing module 24, and an advertisement link
Location storehouse 25.
The network function of the adapter system of adapter module 1.Specifically, by taking the Android operation system of mobile phone terminal as an example,
The adapter module 1 is taken over to its network function, answered with further by replacing LIBRARIES layers of Libc interfaces
With the network link information of program.
The flow whether detection module 2 detection advertisement produces.
Specifically, the IP address, port and link information acquisition module 21 are from the contiguous function in network function
(connect)In analyze IP address, port and link information(socket).
The Http agreements, network address and link information acquisition module 22 are simultaneously from the read/write function in network function(read/
write)In parse Http agreements, network address(URL)And link information(socket).
The relating module 23 according to the IP address, port and link information acquisition module 21 and the Http agreements, network address and
The link information that link information acquisition module 22 is obtained, IP ports are associated out with network address by IP address, port and Http agreements
Network address, so as to obtain the chained address of all networkings.
The chained address of all networkings of acquisition and advertisement link address base 25 are compared the comparing module 24, if
With the chained address matched with advertisement link address base 25, then judge that advertisement generates flow.
The statistical module 3 counts and recorded the flow produced by advertisement.Due to the read/write function in network function(read/
write)Returned data bag in record have flow value, then directly can be counted according to the comparison result of comparing module 24 and record extensively
Accuse the flow value that the packet of chained address is produced.
The display module 4 shows the mobile phone advertisement flow, to point out user.
The mobile phone advertisement flow prompt method and its device provided relative to prior art, the present invention passes through to network function
Take over and analyze, obtain mobile phone advertisement chained address and count the flow of its consumption, user can be pointed out the advertisement link
There is risk in address, to avoid unnecessary loss.
The invention is not limited in above-mentioned embodiment, if the various changes or deformation to the present invention do not depart from the present invention
Spirit and scope, if these are changed and deformation belongs within the scope of the claim and equivalent technologies of the present invention, then this hair
It is bright to be also intended to comprising these changes and deform.