Disclosure of Invention
In view of this, an object of the present invention is to provide an advertisement exposure monitoring method, apparatus and system, so as to solve the problem that in the prior art, a server cannot determine whether a program really completes a complete exposure of an advertisement, thereby resulting in lower authenticity of advertisement exposure data stored in the server.
In order to achieve the purpose, the invention adopts the following technical scheme:
an advertisement exposure monitoring method, comprising:
acquiring all screen elements in the current screen state based on an Android screen mechanism;
traversing all the screen elements, and extracting current exposure information corresponding to the preselected target advertisement;
storing the current exposure information into a preset storage space;
collecting the current exposure information in the preset storage space and historical exposure information matched with the current exposure information to obtain an exposure set corresponding to the preselected target advertisement;
detecting whether the exposure set meets a preset advertisement integrity rule or not;
and if the exposure set conforms to the preset advertisement complete rule, adding one to the recorded exposure times of the preselected target advertisement so as to monitor the exposure of the preselected target advertisement.
Further, in the advertisement exposure monitoring method, the Android-based screen mechanism obtains all screen elements in a current screen state, including:
acquiring a root view element from interactive page information in a current screen state by using a first acquisition mode based on an Android screen mechanism;
acquiring all sub-view elements from the interactive page information by using a second acquisition mode and the root view element;
and taking the root view element and all the child view elements as screen elements.
Further, in the advertisement exposure monitoring method, the current exposure information includes: an exposure image of the pre-targeted advertisement and a current exposure time.
Further, in the advertisement exposure monitoring method, the detecting whether the exposure set meets a preset advertisement integrity rule includes:
detecting whether complete advertisement exposure information matched with the current exposure time exists in the exposure set or not according to the current exposure time of the current exposure information;
if the exposure set has complete advertisement exposure information matched with the current exposure time, the exposure set is in accordance with a preset complete advertisement rule;
and if the complete advertisement exposure information matched with the current exposure time does not exist in the exposure set, indicating that the exposure set does not accord with the preset complete advertisement rule.
Further, in the advertisement exposure monitoring method, the complete exposure information of the advertisement includes: advertisement initial exposure information, advertisement intermediate exposure information and advertisement end exposure information.
The invention also provides an advertisement exposure monitoring device, comprising:
the acquisition module is used for acquiring all screen elements in the current screen state based on an Android screen mechanism;
the extraction module is used for traversing all the screen elements and extracting the current exposure information corresponding to the preselected target advertisement;
the storage module is used for storing the current exposure information into a preset storage space;
the aggregation module is used for aggregating the current exposure information in the preset storage space and historical exposure information matched with the current exposure information to obtain an exposure aggregation corresponding to the preselected target advertisement;
the detection module is used for detecting whether the exposure set meets the preset advertisement integrity rule or not;
and the monitoring module is used for adding one to the recorded exposure times of the preselected target advertisement so as to monitor the exposure of the preselected target advertisement if the exposure set conforms to a preset advertisement integrity rule.
Further, in the advertisement exposure monitoring apparatus, the obtaining module is specifically configured to:
acquiring a root view element from interactive page information in a current screen state by using a first acquisition mode based on an Android screen mechanism;
acquiring all sub-view elements from the interactive page information by using a second acquisition mode and the root view element;
and taking the root view element and all the child view elements as screen elements.
Further, in the advertisement exposure monitoring apparatus, the current exposure information includes: an exposure image of the pre-targeted advertisement and a current exposure time.
Further, in the advertisement exposure monitoring apparatus, the detection module is specifically configured to:
detecting whether complete advertisement exposure information matched with the current exposure time exists in the exposure set or not according to the current exposure time of the current exposure information;
if the exposure set has complete advertisement exposure information matched with the current exposure time, the exposure set is in accordance with a preset complete advertisement rule;
and if the complete advertisement exposure information matched with the current exposure time does not exist in the exposure set, indicating that the exposure set does not accord with the preset complete advertisement rule.
The invention also provides an advertisement exposure monitoring system, which comprises: the system comprises a processor and a memory connected with the processor;
the memory is used for storing a computer program, and the computer program is at least used for executing the advertisement exposure monitoring method;
the processor is used for calling and executing the computer program.
An advertisement exposure monitoring method, device and system, the method includes: acquiring all screen elements in the current screen state based on an Android screen mechanism; traversing all screen elements, and extracting current exposure information corresponding to the preselected target advertisement; storing the current exposure information into a preset storage space; collecting current exposure information in a preset storage space and historical exposure information matched with the current exposure information to obtain an exposure set corresponding to a preselected target advertisement; detecting whether the exposure set meets preset advertisement integrity rules or not; and if the exposure set conforms to the preset advertisement integrity rule, adding one to the recorded exposure times of the preselected target advertisement so as to monitor the exposure of the preselected target advertisement. By adopting the technical scheme of the invention, the advertisement exposure of the Android client can be monitored, and the advertisement exposure can be recorded only when the monitored advertisement exposure meets the advertisement integrity rule, so that the recording of incomplete advertisement exposure is avoided, the monitoring of the advertisement exposure integrity is realized, and the authenticity of advertisement exposure data is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
Fig. 1 is a flowchart provided by an embodiment of the advertisement exposure monitoring method of the present invention, and as shown in fig. 1, the advertisement exposure monitoring method of the present embodiment specifically includes the following steps:
s101, acquiring all screen elements in the current screen state based on an Android screen mechanism.
In this embodiment, an application and an Android client are preferably selected, and all screen elements in the current screen state are acquired firstly by using a screen mechanism based on the Android of the client. Wherein the acquiring is a real-time acquiring.
The method comprises the following specific steps:
firstly, a root view element is obtained from interactive page information in a current screen state by using a first obtaining mode based on an Android screen mechanism.
Based on an Android screen mechanism, views (views) on a screen are all carried through interactive pages (activities). Therefore, first, a root view element needs to be acquired from the interactive page information in the current screen state by using a first acquisition mode. The root view is a main line in the current screen state, and all elements (no matter pictures, videos, buttons and the like) to be displayed on the device are displayed according to the main line. The first obtaining mode may adopt a program of getWindow (). getdecoview ().
And secondly, acquiring all the child view elements from the interactive page information by using a second acquisition mode and the root view element.
And after the root view element is acquired, acquiring all the child view elements from the interactive page information by using a second acquisition mode and the root view element. The second obtaining manner may adopt a procedure of getChildAt (). The view is the same as the tree, one node below the other, and all nodes have parent nodes, that is, the control main line of the child view element is the root view element.
Third, the root view element and all child view elements are treated as screen elements.
S102, traversing all screen elements, and extracting current exposure information corresponding to the preselected target advertisement.
After all screen elements are acquired, traversing all screen elements, screening nodes in the traversing process, extracting elements matched with the preselected target advertisement, carrying out screenshot on the elements to obtain an exposure image of the preselected target advertisement, and taking the current screenshot time as the current exposure time. And then taking the exposure image and the current exposure time of the preselected target advertisement as the current exposure information corresponding to the preselected target advertisement. Wherein the pre-selected target advertisement is a pre-selected advertisement requiring exposure monitoring.
And S103, storing the current exposure information into a preset storage space.
In this embodiment, a corresponding storage space is opened up in advance as a preset storage space, and after the current exposure information corresponding to the preselected target advertisement is extracted, the current exposure information is stored in the preset storage space. Because the screen elements in this embodiment are acquired in real time, the preset storage space stores the exposure information corresponding to the preselected target advertisement acquired in real time each time.
And S104, collecting the current exposure information in the preset storage space and the historical exposure information matched with the current exposure information to obtain an exposure set corresponding to the preselected target advertisement.
The present embodiment needs to acquire historical exposure information matching the current exposure information from a preset storage space. Wherein, the exposure time first needs to be matched with the current exposure time in matching with the current exposure information, and the exposure image also needs to be matched. For example, if the total time length of the preselected target advertisement is 6 minutes, the current exposure time is 10 points, and the exposure image is the advertisement initial exposure image of the preselected target advertisement, the exposure time is 10 points and 3 points, and the exposure information of the advertisement intermediate exposure image of which the exposure image is the preselected target advertisement is the historical exposure information matched with the current exposure information; the exposure time is 10 points and 6 points, and the exposure information of the advertisement ending exposure image of which the exposure image is the pre-selected target advertisement is also the historical exposure information matched with the current exposure information.
After historical exposure information matched with the current exposure information is acquired from a preset storage space, the historical exposure information and the current exposure information need to be aggregated to be used as an exposure set corresponding to the preselected target advertisement.
And S105, detecting whether the exposure set meets the preset advertisement complete rule or not.
After determining an exposure set corresponding to a preselected target advertisement, detecting whether the exposure set meets a preset advertisement integrity rule, specifically comprising the following steps:
firstly, detecting whether complete advertisement exposure information matched with the current exposure time exists in an exposure set or not according to the current exposure time of the current exposure information.
Firstly, whether the historical exposure information and the current exposure information in the exposure set can form the complete exposure information of the advertisement is detected according to the current exposure time of the current exposure information and the historical exposure information in the exposure set. Wherein, the complete exposure information of the advertisement comprises: advertisement initial exposure information, advertisement intermediate exposure information and advertisement end exposure information. If the exposure information formed by the historical exposure information and the current exposure information lacks any one of the information, the exposure set does not have the complete advertisement exposure information, and the exposure set can be indicated to have the complete advertisement exposure information only if the initial advertisement exposure information, the intermediate advertisement exposure information and the end advertisement exposure information all comprise the initial advertisement exposure information, the intermediate advertisement exposure information and the end advertisement exposure information.
Secondly, if the complete advertisement exposure information matched with the current exposure time exists in the exposure set, the exposure set is shown to accord with the preset complete advertisement rule; if the complete advertisement exposure information matched with the current exposure time does not exist in the exposure set, the exposure set is represented to be not in accordance with the preset complete advertisement rule.
Only if the exposure of the preselected target advertisement is determined to accord with the advertisement integrity rule, the preselected target advertisement can be proved to complete the complete exposure, the detection of the step avoids recording of incomplete advertisement exposure, and the monitoring of the advertisement exposure integrity is realized.
And S106, if the exposure set accords with the preset advertisement complete rule, adding one to the recorded exposure times of the preselected target advertisement so as to monitor the exposure of the preselected target advertisement.
If the exposure set is detected to be in accordance with the preset advertisement integrity rule, the preselected target advertisement is indicated to complete the exposure, and the recorded exposure times of the preselected target advertisement are increased by one so as to perform exposure monitoring on the preselected target advertisement. If the exposure set is detected to be not in accordance with the preset advertisement integrity rule, the exposure of the preselected target advertisement is incomplete, the exposure is not recorded, all screen elements in the screen state are continuously acquired, and therefore advertisement exposure monitoring is continuously carried out.
According to the advertisement exposure monitoring method, all screen elements in the current screen state are acquired based on the Android screen mechanism; traversing all screen elements, and extracting current exposure information corresponding to the preselected target advertisement; storing the current exposure information into a preset storage space; collecting current exposure information in a preset storage space and historical exposure information matched with the current exposure information to obtain an exposure set corresponding to a preselected target advertisement; detecting whether the exposure set meets preset advertisement integrity rules or not; and if the exposure set conforms to the preset advertisement integrity rule, adding one to the recorded exposure times of the preselected target advertisement so as to monitor the exposure of the preselected target advertisement. By adopting the technical scheme of the embodiment, the advertisement exposure of the Android client can be monitored, and the advertisement exposure can be recorded only when the monitored advertisement exposure meets the advertisement integrity rule, so that the recording of incomplete advertisement exposure is avoided, the monitoring of the advertisement exposure integrity is realized, and the authenticity of advertisement exposure data is improved.
In order to be more comprehensive, the application also provides an advertisement exposure monitoring device corresponding to the advertisement exposure monitoring method provided by the embodiment of the invention.
Fig. 2 is a schematic structural diagram provided by an embodiment of the advertisement exposure monitoring device of the present invention, and as shown in fig. 2, the advertisement exposure monitoring device of the present embodiment includes: the device comprises anacquisition module 11, anextraction module 12, astorage module 13, anaggregation module 14, adetection module 15 and amonitoring module 16.
Theacquisition module 11 is configured to acquire all screen elements in a current screen state based on an Android screen mechanism;
theextraction module 12 is configured to traverse all screen elements and extract current exposure information corresponding to a preselected target advertisement;
thestorage module 13 is used for storing the current exposure information into a preset storage space;
theaggregation module 14 is configured to aggregate current exposure information in a preset storage space and historical exposure information matched with the current exposure information to obtain an exposure aggregation corresponding to a preselected target advertisement;
thedetection module 15 is used for detecting whether the exposure set meets the preset advertisement integrity rule;
and themonitoring module 16 is configured to add one to the recorded exposure times of the preselected target advertisement to perform exposure monitoring on the preselected target advertisement if the exposure set meets a preset advertisement integrity rule.
The advertisement exposure monitoring device of this embodiment can monitor the advertisement exposure of Android client to monitor that the advertisement exposure accords with the complete rule of advertisement and just can carry out the record to the advertisement exposure, avoided the record to incomplete advertisement exposure, realized the monitoring to advertisement exposure integrality, improved the authenticity of advertisement exposure data.
Further, in the advertisement exposure monitoring apparatus of this embodiment, the obtainingmodule 11 is specifically configured to:
acquiring a root view element from interactive page information in a current screen state by using a first acquisition mode based on an Android screen mechanism; acquiring all sub-view elements from the interactive page information by using a second acquisition mode and the root view element; and taking the root view element and all the child view elements as screen elements.
Further, in the advertisement exposure monitoring apparatus of this embodiment, the current exposure information includes: an exposure image of the pre-targeted advertisement and a current exposure time. Thedetection module 15 is specifically configured to:
detecting whether complete advertisement exposure information matched with the current exposure time exists in the exposure set or not according to the current exposure time of the current exposure information;
if the complete advertisement exposure information matched with the current exposure time exists in the exposure set, the exposure set is expressed to accord with the preset complete advertisement rule; if the complete advertisement exposure information matched with the current exposure time does not exist in the exposure set, the exposure set is represented to be not in accordance with the preset complete advertisement rule. Wherein, the complete exposure information of the advertisement comprises: advertisement initial exposure information, advertisement intermediate exposure information and advertisement end exposure information.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 3 is a schematic structural diagram provided by an embodiment of the advertisement exposure monitoring system of the present invention, and as shown in fig. 3, the advertisement exposure monitoring system of the present embodiment includes: aprocessor 21 and amemory 22 connected to theprocessor 21; thememory 22 is used for storing a computer program for executing at least the advertisement exposure monitoring method of the above-described embodiment; theprocessor 21 is used to call and execute the computer program.
The advertisement exposure monitoring system of this embodiment can monitor the advertisement exposure of Android client to monitor that the advertisement exposure accords with the complete rule of advertisement and just can carry out the record to the advertisement exposure, avoided the record to incomplete advertisement exposure, realized the monitoring to advertisement exposure integrality, improved the authenticity of advertisement exposure data.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present invention, the meaning of "a plurality" means at least two unless otherwise specified.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.