WO2020134662A1 - Heat map drawing method and device - Google Patents

Heat map drawing method and device Download PDF

Info

Publication number
WO2020134662A1
WO2020134662A1 PCT/CN2019/117496 CN2019117496W WO2020134662A1 WO 2020134662 A1 WO2020134662 A1 WO 2020134662A1 CN 2019117496 W CN2019117496 W CN 2019117496W WO 2020134662 A1 WO2020134662 A1 WO 2020134662A1
Authority
WO
WIPO (PCT)
Prior art keywords
click
target
rate
template
coordinate
Prior art date
Application number
PCT/CN2019/117496
Other languages
French (fr)
Chinese (zh)
Inventor
姚宇豪
Original Assignee
北京国双科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京国双科技有限公司 filed Critical 北京国双科技有限公司
Publication of WO2020134662A1 publication Critical patent/WO2020134662A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance

Definitions

  • the invention relates to the technical field of data processing, in particular to a method and device for drawing a thermal map.
  • the heat map is a very effective tool for user clustering analysis. On the page, different brightness is used to distinguish the user's "heat" in different areas, so that he can know what the user is more interested in.
  • the present invention provides a method and device for drawing a heat map, which maps click data of page elements at different resolutions to a reference resolution and draws a heat map.
  • the present invention provides a method for drawing a heat map, which includes:
  • click data corresponding to page elements of the target page at various original resolutions, the click data at least including: click position coordinates;
  • the thermal map of the target page is drawn at the reference resolution.
  • determining that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution includes:
  • the template click data includes at least one template click position coordinate of the target page element
  • the first offset rate, the second offset rate, and the element block size calculate the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution .
  • the method before calculating the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution, the method further includes:
  • the reference position coordinate is used to locate the page element
  • the first offset rate includes a first lateral offset rate and a first longitudinal offset rate
  • the second offset rate includes a second lateral offset rate and a second longitudinal offset rate
  • the The size of the element block includes the width of the element block and the height of the element block.
  • the first offset rate is calculated according to the following formula:
  • mc_elm_offx_rate (click_x-element_x)/element_width
  • mc_elm_offy_rate (click_y-element_y)/element_height;
  • mc_elm_offx_rate is the first lateral offset rate
  • click_x is the horizontal coordinate of the click position coordinate
  • element_x is the horizontal coordinate of the target reference position coordinate
  • element_width is the width of the element block
  • mc_elm_offy_rate is the first vertical offset rate
  • click_y is the vertical coordinate of the click position coordinate
  • element_y is the vertical coordinate of the target reference position coordinate
  • element_height is the height of the element block
  • the second offset rate is calculated according to the following formula:
  • template_mc_elm_offx_rate (accurate_click_x-element_x)/element_width
  • template_mc_elm_offy_rate (accurate_click_y-element_y)/element_height;
  • template_mc_elm_offx_rate is the second horizontal offset rate
  • accurate_click_x is the horizontal coordinate of the template click position coordinate
  • element_x is the horizontal coordinate of the target reference position coordinate
  • element_width is the width of the element block
  • template_mc_elm_offy_rate is the second vertical offset rate
  • accurate_click_y is the vertical coordinate of the template click position coordinate
  • element_y is the vertical coordinate of the target reference position coordinate
  • element_height is the height of the element block.
  • the first offset rate, the second offset rate, and the element block size calculate the corresponding mapping of the click position coordinates to the reference resolution Target click location coordinates, including:
  • element_x accurate_click_x-template_mc_elm_offx_rate*element_width
  • element_y accurate_click_y-template_mc_elm_offy_rate*element_height
  • element_x is the horizontal coordinate of the target reference position coordinate
  • accurate_click_x is the horizontal coordinate of the template click position coordinate
  • template_mc_elm_offx_rate is the second horizontal offset rate
  • element_width is the width of the element block
  • element_y is the vertical coordinate of the target reference position coordinate
  • accurate_click_y is the vertical coordinate of the template click position coordinate
  • template_mc_elm_offy_rate is the second vertical offset rate
  • element_height is the height of the element block
  • the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution are calculated by the following formula:
  • mapping_x element_x+mc_elm_offx_rate*element_width
  • mapping_y element_y+mc_elm_offy_rate*element_height
  • mapping_x is the horizontal coordinate of the target click position coordinate
  • element_x is the horizontal coordinate of the target reference position coordinate
  • mc_elm_offx_rate is the first horizontal offset rate
  • element_width is the width of the element block
  • mapping_y is the vertical coordinate of the target click position coordinate
  • element_y is the vertical coordinate of the target reference position coordinate
  • mc_elm_offy_rate is the first vertical offset rate
  • element_height is the height of the element block.
  • the determining the reference resolution based on the multiple original resolutions includes:
  • the click data further includes: the amount of click data, and determining the reference resolution based on the multiple original resolutions includes:
  • the original resolution with the largest amount of click data is determined as the reference resolution.
  • the present invention also provides a device for drawing a heat map, which includes:
  • the obtaining unit is configured to obtain the click data corresponding to the page elements of the target page at various original resolutions, and the click data includes at least: click position coordinates.
  • the determining unit is configured to determine a reference resolution based on the multiple original resolutions.
  • the determining unit is further configured to determine that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution.
  • the drawing unit is configured to draw the thermal map of the target page at the reference resolution according to the coordinates of the target click position.
  • the device further includes:
  • the searching unit is configured to search for the page element mapped to the corresponding target page element at the reference resolution according to the preset page element path.
  • the searching unit is also used to search for the template click position coordinates mapped to the corresponding template click position coordinates at the reference resolution from the template click data of the target page element pre-stored, the template click data is Obtained by clicking on the target page element at the reference resolution, the template click data includes at least one template click position coordinate of the target page element.
  • the acquiring unit is further configured to acquire a first offset rate of the click position coordinates of the page element in the page element, and a second offset rate of the template click position coordinates in the target page element .
  • the determining module is used to determine the element block size corresponding to the target page element.
  • a calculation module configured to calculate the mapping of the click position coordinates to the reference resolution according to the template click position coordinates, the first offset rate, the second offset rate and the element block size The coordinates of the target click position.
  • the device further includes: a search unit,
  • the determining unit is further configured to determine a reference position coordinate in the page element, and the reference position coordinate is used to locate the page element.
  • the searching unit is configured to search for the reference position coordinates mapped to the corresponding target reference position coordinates at the reference resolution from the template click data.
  • the device further includes:
  • the first calculation unit is configured to calculate the first offset rate according to the following formula:
  • mc_elm_offx_rate (click_x-element_x)/element_width
  • mc_elm_offy_rate (click_y-element_y)/element_height;
  • mc_elm_offx_rate is the first lateral offset rate
  • click_x is the horizontal coordinate of the click position coordinate
  • element_x is the horizontal coordinate of the target reference position coordinate
  • element_width is the width of the element block
  • mc_elm_offy_rate is the first vertical offset rate
  • click_y is the vertical coordinate of the click position coordinate
  • element_y is the vertical coordinate of the target reference position coordinate
  • element_height is the height of the element block.
  • the second calculation unit is configured to calculate the second offset rate according to the following formula:
  • template_mc_elm_offy_rate (accurate_click_y-element_y)/element_height;
  • template_mc_elm_offx_rate is the second horizontal offset rate
  • accurate_click_x is the horizontal coordinate of the template click position coordinate
  • element_x is the horizontal coordinate of the target reference position coordinate
  • element_width is the width of the element block
  • template_mc_elm_offy_rate is the second vertical offset rate
  • accurate_click_y is the vertical coordinate of the template click position coordinate
  • element_y is the vertical coordinate of the target reference position coordinate
  • element_height is the height of the element block.
  • the calculation module includes:
  • the determination submodule is used to calculate the target reference position coordinates according to the following formula:
  • element_x accurate_click_x-template_mc_elm_offx_rate*element_width
  • element_y accurate_click_y-template_mc_elm_offy_rate*element_height
  • element_x is the horizontal coordinate of the target reference position coordinate
  • accurate_click_x is the horizontal coordinate of the template click position coordinate
  • template_mc_elm_offx_rate is the second horizontal offset rate
  • element_width is the width of the element block
  • element_y is the vertical coordinate of the target reference position coordinate
  • accurate_click_y is the vertical coordinate of the template click position coordinate
  • template_mc_elm_offy_rate is the second vertical offset rate
  • element_height is the height of the element block
  • the calculation submodule is used for calculating the click position coordinates to be mapped to the corresponding target click position coordinates at the reference resolution according to the target reference position coordinates by the following formula:
  • mapping_x element_x+mc_elm_offx_rate*element_width
  • mapping_y element_y+mc_elm_offy_rate*element_height
  • mapping_x is the horizontal coordinate of the target click position coordinate
  • element_x is the horizontal coordinate of the target reference position coordinate
  • mc_elm_offx_rate is the first horizontal offset rate
  • element_width is the width of the element block
  • mapping_y is the vertical coordinate of the target click position coordinate
  • element_y is the vertical coordinate of the target reference position coordinate
  • mc_elm_offy_rate is the first vertical offset rate
  • element_height is the height of the element block.
  • the determining unit includes:
  • the first determining module is configured to determine any one of the original resolutions of the plurality of original resolutions as the reference resolution.
  • the second determination module is configured to acquire the click data amount corresponding to the page element at each original resolution and determine the original resolution with the largest click data amount as the reference resolution.
  • a storage medium including a stored program, wherein, when the program is running, the device where the storage medium is located is controlled to execute the above-mentioned thermal power Drawing method of the graph.
  • a processor for running a program wherein the method for drawing the thermal map described above is executed when the program is executed.
  • the method and device for drawing a heat map maps the click positions generated on web pages of different sizes to the same base map according to the page scale when drawing the heat map of the web page in the prior art
  • the present invention obtains the click data corresponding to the page elements of the target page at multiple original resolutions, then determines the reference resolution based on the multiple original resolutions, and then determines the click The position coordinates are mapped to the corresponding target click position coordinates at the reference resolution, and finally the heat map of the target page is drawn at the reference resolution according to the target click position coordinates.
  • the present invention When drawing the thermal map of the page, the click data of the page elements of the target page at various original resolutions can be mapped to the corresponding target click position at the base resolution, and the target heat can be drawn according to the target click position at the base resolution Figure can accurately determine the actual click position of each page element in the target page, and draw the heat map according to the click amount corresponding to each actual click position, which can effectively improve the accuracy of the heat map drawing.
  • FIG. 1 is a schematic structural diagram of a webpage resource acquisition system provided by some embodiments of this application.
  • FIG. 2 is a first architectural diagram of an Android operating system provided by some embodiments of this application.
  • FIG. 3 is a schematic flowchart of a method for acquiring a webpage resource provided by some embodiments of this application;
  • FIG. 4 is a second schematic flowchart of a method for acquiring webpage resources provided by some embodiments of the present application.
  • FIG. 5 is a third schematic flowchart of a method for acquiring webpage resources provided by some embodiments of the present application.
  • FIG. 6 is a first schematic structural diagram of a terminal device provided by some embodiments of the present application.
  • FIG. 7 is a second schematic structural diagram of a terminal device provided by some embodiments of this application.
  • FIG. 8 is a schematic structural diagram 3 of a terminal device provided by some embodiments of the present application.
  • FIG. 9 is a schematic structural diagram 1 of a server provided by some embodiments of the present application.
  • FIG. 10 is a second structural diagram of a server provided by some embodiments of the present application.
  • an embodiment of the present invention provides a drawing method of the heat map. As shown in FIG. 1, the method includes:
  • the click data at least includes: click position coordinates.
  • the resolution is the resolution of the display screen corresponding to the browser display window that loads and displays the target page.
  • the reference coordinate point can be selected in practice to locate the click position coordinate.
  • the upper left corner of the browser display window can be selected as the coordinate origin, and the coordinate value of the user's actual click point relative to the coordinate origin is the click position coordinate described in this step.
  • the reference resolution may be any resolution specified by the user as the reference resolution, or it may be the click amount of each resolution included in the click data collected by statistics, and the resolution with the highest click amount is determined as the reference
  • the resolution is not specifically limited in the embodiment of the present invention.
  • the target click position coordinate may be the pixel coordinate corresponding to the actual click point at the reference resolution.
  • each target webpage is presented by multiple page elements according to the pre-edited logical relationship and position, and each page element exists in the form of an element block in the webpage.
  • CSS CSS
  • page elements are put into a box model. Using this box model, CSS can control the layout style of each page element on the web page.
  • the box containing the page element is the corresponding element block.
  • the page element is the text information "Jingdong".
  • the thermal map can be drawn by the actual click data amount (or thermal value) corresponding to each target click position, that is, the areas corresponding to the pixels with different thermal values are subjected to different brightness and color Display, etc., to ensure that the heat map drawn can truly reflect the actual click situation.
  • the method for drawing a heat map obtained by the embodiment of the present invention obtains the click data corresponding to the page elements of the target page at various original resolutions, then determines the reference resolution based on the various original resolutions, and then determines the coordinate mapping of the click position Go to the corresponding target click position coordinates at the reference resolution, and finally draw the thermal map of the target page at the reference resolution according to the target click position coordinates. Therefore, compared with the prior art, When drawing, you can map the click data of the page elements of the target page at various original resolutions to the corresponding target click position at the reference resolution, and draw the target heat map according to the target click position at the reference resolution. Accurately determine the actual click position of each page element in the target page, and draw the heat map according to the click amount corresponding to each actual click position, which can effectively improve the accuracy of the heat map drawing.
  • an embodiment of the present invention also provides another method for drawing a thermal map, as shown in FIG. 2.
  • the click data at least includes: click position coordinates.
  • click position coordinates For the conceptual explanation of the click position coordinates and the specific implementation of this step, reference may be made to the corresponding description in step 101, and details are not described herein again in this embodiment of the present invention.
  • the step 202 may include: determining any one of the plurality of original resolutions as the reference resolution. For example, specify 800 ⁇ 600 resolution as the reference resolution.
  • the click data acquired in the above step may also include the click data amount. Therefore, in order to reduce the amount of data processing and improve the efficiency of drawing the heat map, the step 202 may further include: acquiring each original resolution The amount of click data corresponding to the page element of is; the original resolution with the largest amount of click data is determined as the reference resolution.
  • the click data at the original resolution is mapped to the reference resolution
  • the click data processing since the click data volume at the reference resolution is the largest, there is no need to perform additional mapping calculations, and the data processing volume can be reduced to the greatest extent, thereby improving the efficiency of data processing and the efficiency of heat map drawing.
  • the path of the page element is an inherent property of the pre-generated page, and the path of each page element is often generated when the web page is generated.
  • the objects that make up the page (or document) are organized in a tree structure.
  • the standard model used to represent the objects in the document is called DOM, and the structure of the page and the position of the page object can be determined by DOM parsing. Wait.
  • the content information of the target webpage is the same at the original resolution and the reference resolution, that is to say, the target page at each resolution has the same page structure, so the The source code is used to know the position of the target element in the target page, but the specific method is not limited by the embodiment of the present invention. Since the page content of the target page is always the same, the location of the page element can be accurately found through the generation path of the page element at any resolution, so that the accuracy of the click position determination is improved, thereby improving the drawing of the heat map accuracy.
  • the template click data is obtained by clicking the target page element at the reference resolution
  • the template click data includes at least one template click position coordinate of the target page element.
  • the template click data can be obtained by simulating the target page element at the reference resolution in advance; or, the historical click data of the target page element at the reference resolution can be used as the template click data in this step.
  • the template click data includes the coordinates of the click position of each template as the pixel coordinates of the click position at the reference resolution.
  • the collected click data contains the identification information of the page element corresponding to each click position. Therefore, after the click data of the page element is obtained in the above step, it can be included in the template click data according to the page element identification Perform a search to obtain template click data.
  • the element block size includes the width of the element block and the height of the element block.
  • the code of the target page can be parsed, such as: HTML file, CSS file, JS file, etc., and the corresponding element of the page element can be known The position and size of the element block.
  • the first offset rate includes a first lateral offset rate and a first longitudinal offset rate
  • the second offset rate includes a second lateral offset rate and a second longitudinal offset rate.
  • page elements are often represented by element blocks with a certain size. When any position within the effective range of this element block is clicked, the effect of clicking the page element may be generated.
  • One of the page elements can be selected.
  • the reference point is used to locate the page element
  • the offset rate is an index used to measure the deviation of the actual click position within the page element relative to the position of the page element reference point.
  • the offset rate can be obtained by the difference between the actual click position and the element reference point position, and then divided by the width (or height) of the element block.
  • the offset rate in the page elements at different resolutions is the same, that is, the above-mentioned first offset rate can be determined by the click position at the original resolution relative to the element at the resolution
  • the offset of the block reference position and the element block size at this resolution can be calculated; it can also be calculated by mapping the click position to the reference resolution and offset from the target reference position coordinates of the target page element.
  • the specifics can be arbitrarily selected according to needs, and the embodiments of the present invention are not specifically limited.
  • the first offset rate can be calculated according to the following formula:
  • mc_elm_offx_rate (click_x-element_x)/element_width
  • mc_elm_offy_rate (click_y-element_y)/element_height;
  • mc_elm_offx_rate is the first lateral offset rate
  • click_x is the horizontal coordinate of the click position coordinate
  • element_x is the horizontal coordinate of the target reference position coordinate
  • element_width is the width of the element block
  • mc_elm_offy_rate is the first vertical offset rate
  • click_y is the vertical coordinate of the click position coordinate
  • element_y is the vertical coordinate of the target reference position coordinate
  • element_height is the height of the element block
  • the second offset rate is calculated according to the following formula:
  • template_mc_elm_offx_rate (accurate_click_x-element_x)/element_width
  • template_mc_elm_offy_rate (accurate_click_y-element_y)/element_height;
  • template_mc_elm_offx_rate is the second horizontal offset rate
  • accurate_click_x is the horizontal coordinate of the template click position coordinate
  • element_x is the horizontal coordinate of the target reference position coordinate
  • element_width is the width of the element block
  • template_mc_elm_offy_rate is the second vertical offset rate
  • accurate_click_y is the vertical coordinate of the template click position coordinate
  • element_y is the vertical coordinate of the target reference position coordinate
  • element_height is the height of the element block.
  • this step may first calculate the position coordinates of the target reference position according to the second offset rate of the template click position coordinate and the template click position coordinate, and then determine the click according to the offset rate between the click position and the target reference position The target click position whose position is at the reference resolution.
  • the method may further include: determining a reference position coordinate in the page element, where the reference position coordinate is used to locate the page element; and searching the template click data from the template
  • the reference position coordinates are mapped to the corresponding target reference position coordinates at the reference resolution.
  • the reference position coordinate may be any position of the element block, such as the upper left corner coordinate of the element block of the page element.
  • target reference position coordinates are calculated according to the following formula:
  • element_x accurate_click_x-template_mc_elm_offx_rate*element_width
  • element_y accurate_click_y-template_mc_elm_offy_rate*element_height
  • element_x is the horizontal coordinate of the target reference position coordinate
  • accurate_click_x is the horizontal coordinate of the template click position coordinate
  • template_mc_elm_offx_rate is the second horizontal offset rate
  • element_width is the width of the element block
  • element_y is the vertical coordinate of the target reference position coordinate
  • accurate_click_y is the vertical coordinate of the template click position coordinate
  • template_mc_elm_offy_rate is the second vertical offset rate
  • element_height is the height of the element block
  • the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution are calculated by the following formula:
  • mapping_x element_x+mc_elm_offx_rate*element_width
  • mapping_y element_y+mc_elm_offy_rate*element_height
  • mapping_x is the horizontal coordinate of the target click position coordinate
  • element_x is the horizontal coordinate of the target reference position coordinate
  • mc_elm_offx_rate is the first horizontal offset rate
  • element_width is the width of the element block
  • mapping_y is the vertical coordinate of the target click position coordinate
  • element_y is the vertical coordinate of the target reference position coordinate
  • mc_elm_offy_rate is the first vertical offset rate
  • element_height is the height of the element block.
  • the pixel coordinates of the target reference position at the reference resolution can be determined according to the second offset rate, and then the target click position of the click position coordinate at the reference resolution can be determined based on the obtained pixel coordinates and the first offset rate.
  • the offset rate can accurately locate the target click position of the click position at the reference resolution, thereby ensuring the accuracy of the click position mapping and improving the accuracy of the heat map drawing.
  • step 104 For the specific implementation manner in this step, reference may be made to the corresponding description in step 104, and details are not described herein again.
  • an embodiment of the present invention further provides a device for drawing a thermal map for implementing the method shown in FIG. 1.
  • the device embodiment corresponds to the foregoing method embodiment.
  • the device embodiment will not repeat the details of the foregoing method embodiment one by one, but it should be clear that the device in this embodiment can implement the aforementioned method correspondingly. All the content in the example.
  • the device includes: an obtaining unit 31, a determining unit 32, and a drawing unit 33, wherein
  • the obtaining unit 31 may be used to obtain the click data corresponding to the page elements of the target page at various original resolutions, where the click data includes at least: click position coordinates.
  • the determining unit 32 may be used to determine a reference resolution based on the multiple original resolutions.
  • the determining unit 32 may also be used to determine that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution.
  • the drawing unit 33 may be used to draw the heat map of the target page at the reference resolution according to the coordinates of the target click position.
  • an embodiment of the present invention further provides another apparatus for drawing a thermal map for implementing the method shown in FIG. 2.
  • This device embodiment corresponds to the foregoing method embodiment.
  • the device embodiment will not repeat the details of the foregoing method embodiment one by one, but it should be clear that the device in this embodiment can implement the aforementioned method correspondingly. All the content in the example.
  • the device includes: an acquiring unit 41, a determining unit 42, and a drawing unit 43, wherein,
  • the obtaining unit 41 may be used to obtain the click data corresponding to the page elements of the target page at various original resolutions, where the click data includes at least: click position coordinates.
  • the determining unit 42 may be used to determine a reference resolution based on the multiple original resolutions.
  • the determining unit 42 may also be used to determine that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution.
  • the drawing unit 43 may be used to draw the heat map of the target page at the reference resolution according to the coordinates of the target click position.
  • the determining unit 42 includes:
  • the first determining module 4201 may be used to determine any one of the original resolutions as the reference resolution.
  • the obtaining module 4202 may be used to obtain the amount of click data corresponding to each page element at each original resolution.
  • the second determination module 4203 may be used to determine the original resolution with the largest amount of click data as the reference resolution.
  • the device further includes: a searching unit 44.
  • the searching unit 44 may be configured to search for the page element mapped to the corresponding target page element at the reference resolution according to the preset page element path.
  • the searching unit 44 can also be used to search the template click data of the target page element from the pre-stored template click data to map the corresponding coordinates of the template click position at the reference resolution.
  • the acquiring unit 41 may also be used to acquire a first offset rate of the click position coordinates of the page element in the page element, and a second offset of the template click position coordinates in the target page element Shift rate.
  • the determining unit 42 may also be used to determine the element block size corresponding to the target page element.
  • the device further includes: a calculation unit 45.
  • the calculation unit 45 may be configured to calculate the click position coordinates to be mapped to the reference according to the template click position coordinates, the first offset rate, the second offset rate, and the element block size The coordinates of the corresponding target click position at the resolution.
  • the determining unit 42 may also be used to determine a reference position coordinate in the page element, and the reference position coordinate is used to locate the page element.
  • the searching unit 44 may also be used to search for the reference position coordinates mapped to the corresponding target reference position coordinates at the reference resolution from the template click data.
  • the device includes: an acquiring unit, a determining unit and a drawing unit.
  • an acquiring unit when drawing a heat map of a web page, when the click positions generated on web pages of different sizes are mapped to the same base map according to the page ratio, the accuracy of drawing the heat map is low.
  • the page elements of the page correspond to the click data at multiple original resolutions, and then determine the reference resolution based on the multiple original resolutions, and then determine the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution, and finally according to the The target click position coordinate is used to draw the thermal map of the target page at the reference resolution.
  • the present invention can draw the page elements of the target page in a variety of originals when drawing the thermal map of the page
  • the click data at the resolution is mapped to the corresponding target click position at the reference resolution, and the target heat map is drawn according to the target click position at the reference resolution, which can accurately determine the actual click position of each page element in the target page.
  • Drawing a heat map with the click amount corresponding to each actual click position can effectively improve the accuracy of drawing the heat map.
  • the text processing device includes a processor and a memory, and the above-mentioned acquisition unit 31, determination unit 32, drawing unit 33, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to achieve corresponding functions .
  • the processor contains a core, and the core retrieves the corresponding program unit from the memory.
  • One or more kernels can be set to improve the accuracy of the heat map drawing by adjusting the kernel parameters.
  • the memory may include non-permanent memory, random access memory (RAM) and/or non-volatile memory in a computer-readable medium, such as read only memory (ROM) or flash memory (flash RAM), and the memory includes at least one Memory chip.
  • RAM random access memory
  • ROM read only memory
  • flash RAM flash memory
  • An embodiment of the present invention provides a storage medium on which a program is stored, and when the program is executed by a processor, the method for drawing the heat map is implemented.
  • An embodiment of the present invention provides a processor for running a program, wherein the method for drawing a heat map is executed when the program is run.
  • An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored on the memory and executable on the processor.
  • the processor executes the program, the following steps are realized: the page elements of the target page are obtained in various original Corresponding click data at a resolution, the click data at least includes: click position coordinates; based on the multiple original resolutions, a reference resolution is determined; and the click position coordinates are mapped to the corresponding at the reference resolution Target click position coordinates; according to the target click position coordinates, draw a heat map of the target page at the reference resolution.
  • determining that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution includes:
  • the template click data includes at least one template click position coordinate of the target page element
  • the first offset rate, the second offset rate, and the element block size calculate the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution .
  • the method further includes:
  • the reference position coordinate is used to locate the page element
  • the first offset rate includes a first horizontal offset rate and a first vertical offset rate
  • the second offset rate includes a second horizontal offset rate and a second vertical offset rate
  • the element The block size includes the width of the element block and the height of the element block.
  • the first offset rate is calculated according to the following formula:
  • template_mc_elm_offx_rate (accurate_click_x-element_x)/element_width
  • template_mc_elm_offy_rate (accurate_click_y-element_y)/element_height;
  • template_mc_elm_offx_rate is the first horizontal offset rate
  • accurate_click_x is the horizontal coordinate of the template click position coordinate
  • element_x is the horizontal coordinate of the target reference position coordinate
  • element_width is the width of the element block
  • template_mc_elm_offy_rate is the first vertical offset rate
  • accurate_click_y is the vertical coordinate of the template click position coordinate
  • element_y is the vertical coordinate of the target reference position coordinate
  • element_height is the height of the element block
  • the second offset rate is calculated according to the following formula:
  • mc_elm_offx_rate (click_x-element_x)/element_width
  • mc_elm_offy_rate (click_y-element_y)/element_height;
  • mc_elm_offx_rate is the second horizontal offset rate
  • click_x is the horizontal coordinate of the click position coordinate
  • element_x is the horizontal coordinate of the target reference position coordinate
  • element_width is the width of the element block
  • mc_elm_offy_rate is the second vertical offset rate
  • click_y is the vertical coordinate of the click position coordinate
  • element_y is the vertical coordinate of the target reference position coordinate
  • element_height is the height of the element block.
  • the first offset rate, the second offset rate, and the element block size calculate the click position coordinates mapped to the corresponding target at the reference resolution Click location coordinates, including:
  • element_x accurate_click_x-template_mc_elm_offx_rate*element_width
  • element_y accurate_click_y-template_mc_elm_offy_rate*element_height
  • element_x is the horizontal coordinate of the target reference position coordinate
  • accurate_click_x is the horizontal coordinate of the template click position coordinate
  • template_mc_elm_offx_rate is the first horizontal offset rate
  • element_width is the width of the element block
  • element_y is the vertical coordinate of the target reference position coordinate
  • accurate_click_y is the vertical coordinate of the template click position coordinate
  • template_mc_elm_offy_rate is the first vertical offset rate
  • element_height is the height of the element block
  • the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution are calculated by the following formula:
  • mapping_x element_x+mc_elm_offx_rate*element_width
  • mapping_y element_y+mc_elm_offy_rate*element_height
  • mapping_x is the horizontal coordinate of the target click position coordinate
  • element_x is the horizontal coordinate of the target reference position coordinate
  • mc_elm_offx_rate is the second horizontal offset rate
  • element_width is the width of the element block
  • mapping_y is the vertical coordinate of the target click position coordinate
  • element_y is the vertical coordinate of the target reference position coordinate
  • mc_elm_offy_rate is the second vertical offset rate
  • element_height is the height of the element block.
  • the determining the reference resolution based on the multiple original resolutions includes:
  • the click data further includes: the amount of click data, and determining the reference resolution based on the multiple original resolutions includes:
  • the original resolution with the largest amount of click data is determined as the reference resolution.
  • the device in the embodiment of the present invention may be a server, a PC, a PAD, a mobile phone, or the like.
  • An embodiment of the present invention also provides a computer program product which, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: acquiring click data corresponding to page elements of a target page at various original resolutions ,
  • the click data includes at least: click position coordinates; based on the plurality of original resolutions, determine a reference resolution; determine the click position coordinates mapped to the corresponding target click position coordinates under the reference resolution; according to The target click position coordinate is used to draw a thermal map of the target page at the reference resolution.
  • determining that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution includes:
  • the template click data includes at least one template click position coordinate of the target page element
  • the first offset rate, the second offset rate, and the element block size calculate the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution .
  • the method further includes:
  • the first offset rate includes a first horizontal offset rate and a first vertical offset rate
  • the second offset rate includes a second horizontal offset rate and a second vertical offset rate
  • the element The block size includes the width of the element block and the height of the element block.
  • the calculation method of the first offset rate and the second offset rate refers to the above calculation method, which will not be repeated here.
  • the first offset rate, the second offset rate, and the element block size calculate the click position coordinates mapped to the corresponding target at the reference resolution Click location coordinates, including:
  • element_x accurate_click_x-template_mc_elm_offx_rate*element_width
  • element_y accurate_click_y-template_mc_elm_offy_rate*element_height
  • element_x is the horizontal coordinate of the target reference position coordinate
  • accurate_click_x is the horizontal coordinate of the template click position coordinate
  • template_mc_elm_offx_rate is the first horizontal offset rate
  • element_width is the width of the element block
  • element_y is the vertical coordinate of the target reference position coordinate
  • accurate_click_y is the vertical coordinate of the template click position coordinate
  • template_mc_elm_offy_rate is the first vertical offset rate
  • element_height is the height of the element block
  • the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution are calculated by the following formula:
  • mapping_x element_x+mc_elm_offx_rate*element_width
  • mapping_y element_y+mc_elm_offy_rate*element_height
  • mapping_x is the horizontal coordinate of the target click position coordinate
  • element_x is the horizontal coordinate of the target reference position coordinate
  • mc_elm_offx_rate is the second horizontal offset rate
  • element_width is the width of the element block
  • mapping_y is the vertical coordinate of the target click position coordinate
  • element_y is the vertical coordinate of the target reference position coordinate
  • mc_elm_offy_rate is the second vertical offset rate
  • element_height is the height of the element block.
  • the determining the reference resolution based on the multiple original resolutions includes:
  • the click data further includes: the amount of click data, and determining the reference resolution based on the multiple original resolutions includes:
  • the original resolution with the largest amount of click data is determined as the reference resolution.
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
  • computer usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, the instructions
  • the device implements the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operating steps are performed on the computer or other programmable device to produce computer-implemented processing, which is executed on the computer or other programmable device
  • the instructions provide steps for implementing the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.
  • the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
  • processors CPUs
  • input/output interfaces network interfaces
  • memory volatile and non-volatile memory
  • the memory may include non-permanent memory, random access memory (RAM) and/or non-volatile memory in a computer-readable medium, such as read only memory (ROM) or flash memory (flash RAM).
  • RAM random access memory
  • ROM read only memory
  • flash RAM flash memory
  • Computer readable media including permanent and non-permanent, removable and non-removable media, can store information by any method or technology.
  • the information may be computer readable instructions, data structures, modules of programs, or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices.
  • computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
  • computer usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.

Abstract

The present invention discloses a heat map drawing method and a device, and relates to the technical field of data processing, and is directed at solving the problem of relatively low heat map drawing accuracy resulting from existing heat map drawing methods using page scale for taking click positions generated on webpages having different dimensions and mapping said click positions to the same basemap. The method of the present invention comprising: obtaining click data corresponding to a plurality of original resolutions of a page element of a target page; on the basis of the plurality of original resolutions, determining a reference resolution; determining target click position coordinates corresponding to click position coordinates mapped to the reference resolution; in accordance with the target click position coordinates, using the reference resolution for drawing a heat map of the target page. The present invention is suited to applications in the drawing of heat maps.

Description

一种热力图的绘制方法及装置Method and device for drawing thermal map
本申请要求于2018年12月28日提交中国专利局、申请号为201811622998.3、申请名称为“一种热力图的绘制方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires the priority of the Chinese patent application filed on December 28, 2018 in the Chinese Patent Office with the application number 201811622998.3 and the application name "A method and device for drawing thermal maps", the entire contents of which are incorporated by reference in this document Applying.
技术领域Technical field
本发明涉及数据处理技术领域,尤其涉及一种热力图的绘制方法及装置。The invention relates to the technical field of data processing, in particular to a method and device for drawing a thermal map.
背景技术Background technique
随着用户对网络的依赖越来越强,越来越多的人开始关注用户的访问行为,通过对用户访问行为的分析,能够得到用户的爱好与兴趣分布,从而进一步指导网站的优化,提升用户使用体验。而热力图则是进行用户聚类分析的非常有效的工具,在页面上通过不同亮度来区分用户对各个不同区域的“热度”,能够得知用户对什么更感兴趣。As users become more and more dependent on the Internet, more and more people begin to pay attention to the user's access behavior. Through the analysis of the user's access behavior, the user's hobbies and interests distribution can be obtained, thereby further guiding the optimization of the website and improving User experience. The heat map is a very effective tool for user clustering analysis. On the page, different brightness is used to distinguish the user's "heat" in different areas, so that he can know what the user is more interested in.
目前,对于现有的绘制热力图的方法,在收集一个网页上的点击数据时,是以浏览器的左上角位置为坐标原点,采集各个点击位置相对于该坐标原点的固定坐标值,而后将大量相同网页上的点击位置数据汇总到一张底图上完成网页热力图的绘制。At present, for the existing method of drawing a heat map, when collecting click data on a webpage, the position of the upper left corner of the browser is used as the coordinate origin, and the fixed coordinate values of each click position relative to the coordinate origin are collected, and then A large number of click location data on the same web page are aggregated into a base map to complete the drawing of the web heat map.
然而,由于不同的用户使用的终端设备有多种分辨率,且相同网页在不同分辨率下的尺寸是不同的,从而使得网页的同一个内容在不同终端中的位置也将是存在差异的,在绘制热力图时,若仅将大量内容相同但是尺寸不同的网页上产生的点击位置按照页面比例映射到一张底图上,那么对于同一个点击行为,在底图上和与底图分辨率不同的其他网页上对应的点击位置所指示的内容信息可能是完全不同的,这将导致最终绘制的唯一分辨率下的热力图不能真实地还原大量用户在其他分辨率的网页上的实际点击行为,使得绘制的热力图不准确。However, since terminal devices used by different users have multiple resolutions, and the size of the same web page at different resolutions is different, the location of the same content of the web page in different terminals will also be different. When drawing a heat map, if only a large number of pages with the same content but different sizes are mapped to a base map according to the page ratio, then for the same click behavior, the base map and the base map resolution The content information indicated by the corresponding click position on different other webpages may be completely different, which will cause the final heat map drawn at the unique resolution cannot truly restore the actual click behavior of a large number of users on other resolution webpages , Making the heat map drawn inaccurate.
发明内容Summary of the invention
鉴于上述问题,本发明提供一种热力图的绘制方法及装置,将页面元素在不同分辨率下的点击数据映射到基准分辨率下,并绘制热力图。In view of the above problems, the present invention provides a method and device for drawing a heat map, which maps click data of page elements at different resolutions to a reference resolution and draws a heat map.
为解决上述技术问题,第一方面,本发明提供了一种热力图的绘制方法,该方法包括:To solve the above technical problems, in a first aspect, the present invention provides a method for drawing a heat map, which includes:
获取目标页面的页面元素在多种原始分辨率下对应的点击数据,所述点击数据中至少包括:点击位置坐标;Acquiring click data corresponding to page elements of the target page at various original resolutions, the click data at least including: click position coordinates;
基于所述多种原始分辨率,确定基准分辨率;Determine the reference resolution based on the multiple original resolutions;
确定所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标;Determining that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution;
根据所述目标点击位置坐标,在所述基准分辨率下绘制所述目标页面的热力图。According to the coordinates of the target click position, the thermal map of the target page is drawn at the reference resolution.
可选的,确定所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标,包括:Optionally, determining that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution includes:
根据预先设置的页面元素路径,查找所述页面元素映射到所述基准分辨率下对应的目标页面元素;According to the preset page element path, find the page element mapped to the corresponding target page element at the reference resolution;
从预先存储的目标页面元素的模板点击数据中,查找所述点击位置坐标映射到所述基准分辨率下对应的模板点击位置坐标,所述模板点击数据为在所述基准分辨率下对所述目标页面元素进行点击得到的,所述模板点击数据中包括所述目标页面元素的至少一个模板点击位置坐标;From the pre-stored template click data of the target page element, find the coordinates of the click position mapped to the corresponding template click position coordinates at the reference resolution, the template click data for the reference resolution at the reference resolution Obtained by clicking on a target page element, the template click data includes at least one template click position coordinate of the target page element;
获取所述页面元素的点击位置坐标在所述页面元素中的第一偏移率,以及所述模板点击位置坐标在所述目标页面元素中的第二偏移率;Acquiring a first offset rate of the click position coordinates of the page element in the page element, and a second offset rate of the template click position coordinates in the target page element;
确定所述目标页面元素对应的元素块尺寸;Determine the element block size corresponding to the target page element;
根据所述模板点击位置坐标、所述第一偏移率、所述第二偏移率和所述元素块尺寸,计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标。According to the template click position coordinates, the first offset rate, the second offset rate, and the element block size, calculate the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution .
可选的,在计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标之前,所述方法还包括:Optionally, before calculating the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution, the method further includes:
在所述页面元素中确定一个参考位置坐标,所述参考位置坐标用于定位所述页面元素;Determining a reference position coordinate in the page element, the reference position coordinate is used to locate the page element;
从所述模板点击数据中查找所述参考位置坐标映射到所述基准分辨率下对应的目标参考位置坐标。Finding the reference position coordinates mapped to the corresponding target reference position coordinates at the reference resolution from the template click data.
可选的,所述第一偏移率包括第一横向偏移率和第一纵向偏移率,所述第二偏移率包括第二横向偏移率和第二纵向偏移率,所述元素块尺寸包括元素块的宽度和元素块的高度,在获取所述第一偏移率和所述第二偏移率之前,所述方法还包括:Optionally, the first offset rate includes a first lateral offset rate and a first longitudinal offset rate, and the second offset rate includes a second lateral offset rate and a second longitudinal offset rate, the The size of the element block includes the width of the element block and the height of the element block. Before acquiring the first offset rate and the second offset rate, the method further includes:
根据以下公式计算所述第一偏移率:The first offset rate is calculated according to the following formula:
mc_elm_offx_rate=(click_x-element_x)/element_width;mc_elm_offx_rate=(click_x-element_x)/element_width;
mc_elm_offy_rate=(click_y-element_y)/element_height;mc_elm_offy_rate=(click_y-element_y)/element_height;
其中,mc_elm_offx_rate为第一横向偏移率,click_x为点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,element_width为元素块的宽度;Among them, mc_elm_offx_rate is the first lateral offset rate, click_x is the horizontal coordinate of the click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, and element_width is the width of the element block;
mc_elm_offy_rate为第一纵向偏移率,click_y为点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,element_height为元素块的高度;mc_elm_offy_rate is the first vertical offset rate, click_y is the vertical coordinate of the click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, and element_height is the height of the element block;
和/或,and / or,
根据以下公式计算所述第二偏移率:The second offset rate is calculated according to the following formula:
template_mc_elm_offx_rate=(accurate_click_x-element_x)/element_widthtemplate_mc_elm_offx_rate=(accurate_click_x-element_x)/element_width
template_mc_elm_offy_rate=(accurate_click_y-element_y)/element_height;template_mc_elm_offy_rate=(accurate_click_y-element_y)/element_height;
其中,template_mc_elm_offx_rate为第二横向偏移率,accurate_click_x为模板点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,element_width为元素块的宽度;Among them, template_mc_elm_offx_rate is the second horizontal offset rate, accurate_click_x is the horizontal coordinate of the template click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, and element_width is the width of the element block;
template_mc_elm_offy_rate为第二纵向偏移率,accurate_click_y为模板点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,element_height为元素块的高度。template_mc_elm_offy_rate is the second vertical offset rate, accurate_click_y is the vertical coordinate of the template click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, and element_height is the height of the element block.
可选的,根据所述模板点击位置坐标、所述第一偏移率、所述第二偏移率和所述元素块尺寸,计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标,包括:Optionally, according to the template click position coordinates, the first offset rate, the second offset rate, and the element block size, calculate the corresponding mapping of the click position coordinates to the reference resolution Target click location coordinates, including:
根据以下公式计算所述目标参考位置坐标:Calculate the target reference position coordinates according to the following formula:
element_x=accurate_click_x-template_mc_elm_offx_rate*element_widthelement_x=accurate_click_x-template_mc_elm_offx_rate*element_width
element_y=accurate_click_y-template_mc_elm_offy_rate*element_heightelement_y=accurate_click_y-template_mc_elm_offy_rate*element_height
其中,element_x为目标参考位置坐标的横坐标,accurate_click_x为模板点击位置坐标的横坐标,template_mc_elm_offx_rate为第二横向偏移率,element_width为元素块的宽度;Where element_x is the horizontal coordinate of the target reference position coordinate, accurate_click_x is the horizontal coordinate of the template click position coordinate, template_mc_elm_offx_rate is the second horizontal offset rate, and element_width is the width of the element block;
element_y为目标参考位置坐标的纵坐标,accurate_click_y为模板点击位置坐标的纵坐标,template_mc_elm_offy_rate为第二纵向偏移率,element_height为元素块的高度;element_y is the vertical coordinate of the target reference position coordinate, accurate_click_y is the vertical coordinate of the template click position coordinate, template_mc_elm_offy_rate is the second vertical offset rate, and element_height is the height of the element block;
根据所述目标参考位置坐标,通过以下公式计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标:According to the target reference position coordinates, the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution are calculated by the following formula:
mapping_x=element_x+mc_elm_offx_rate*element_widthmapping_x=element_x+mc_elm_offx_rate*element_width
mapping_y=element_y+mc_elm_offy_rate*element_heightmapping_y=element_y+mc_elm_offy_rate*element_height
其中,mapping_x为目标点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,mc_elm_offx_rate为第一横向偏移率,element_width为元素块的宽度;Among them, mapping_x is the horizontal coordinate of the target click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, mc_elm_offx_rate is the first horizontal offset rate, and element_width is the width of the element block;
mapping_y为目标点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,mc_elm_offy_rate为第一纵向偏移率,element_height为元素块的高度。mapping_y is the vertical coordinate of the target click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, mc_elm_offy_rate is the first vertical offset rate, and element_height is the height of the element block.
可选的,所述基于所述多种原始分辨率,确定基准分辨率,包括:Optionally, the determining the reference resolution based on the multiple original resolutions includes:
将所述多种原始分辨率中的任意一种原始分辨率确定为所述基准分辨率;或,Determine any one of the plurality of original resolutions as the reference resolution; or,
所述点击数据还包括:点击数据量,所述基于所述多种原始分辨率,确定基准分辨率,包括:The click data further includes: the amount of click data, and determining the reference resolution based on the multiple original resolutions includes:
获取每种原始分辨率下的页面元素对应的点击数据量;Get the amount of click data corresponding to each page element at each original resolution;
将点击数据量最多的原始分辨率确定为所述基准分辨率。The original resolution with the largest amount of click data is determined as the reference resolution.
第二方面,本发明还提供了一种热力图的绘制装置,该装置包括:In a second aspect, the present invention also provides a device for drawing a heat map, which includes:
获取单元,用于获取目标页面的页面元素在多种原始分辨率下对应的点击数据,所述点击数据中至少包括:点击位置坐标。The obtaining unit is configured to obtain the click data corresponding to the page elements of the target page at various original resolutions, and the click data includes at least: click position coordinates.
确定单元,用于基于所述多种原始分辨率,确定基准分辨率。The determining unit is configured to determine a reference resolution based on the multiple original resolutions.
所述确定单元,还用于确定所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标。The determining unit is further configured to determine that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution.
绘制单元,用于根据所述目标点击位置坐标,在所述基准分辨率下绘制所述目标页面的热力图。The drawing unit is configured to draw the thermal map of the target page at the reference resolution according to the coordinates of the target click position.
可选的,所述装置还包括:Optionally, the device further includes:
查找单元,用于根据预先设置的页面元素路径,查找所述页面元素映射到所述基 准分辨率下对应的目标页面元素。The searching unit is configured to search for the page element mapped to the corresponding target page element at the reference resolution according to the preset page element path.
所述查找单元,还用于从预先存储的目标页面元素的模板点击数据中,查找所述点击位置坐标映射到所述基准分辨率下对应的模板点击位置坐标,所述模板点击数据为在所述基准分辨率下对所述目标页面元素进行点击得到的,所述模板点击数据中包括所述目标页面元素的至少一个模板点击位置坐标。The searching unit is also used to search for the template click position coordinates mapped to the corresponding template click position coordinates at the reference resolution from the template click data of the target page element pre-stored, the template click data is Obtained by clicking on the target page element at the reference resolution, the template click data includes at least one template click position coordinate of the target page element.
所述获取单元,还用于获取所述页面元素的点击位置坐标在所述页面元素中的第一偏移率,以及所述模板点击位置坐标在所述目标页面元素中的第二偏移率。The acquiring unit is further configured to acquire a first offset rate of the click position coordinates of the page element in the page element, and a second offset rate of the template click position coordinates in the target page element .
确定模块,用于确定所述目标页面元素对应的元素块尺寸。The determining module is used to determine the element block size corresponding to the target page element.
计算模块,用于根据所述模板点击位置坐标、所述第一偏移率、所述第二偏移率和所述元素块尺寸,计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标。A calculation module, configured to calculate the mapping of the click position coordinates to the reference resolution according to the template click position coordinates, the first offset rate, the second offset rate and the element block size The coordinates of the target click position.
可选的,所述装置还包括:查找单元,Optionally, the device further includes: a search unit,
所述确定单元,还用于在所述页面元素中确定一个参考位置坐标,所述参考位置坐标用于定位所述页面元素。The determining unit is further configured to determine a reference position coordinate in the page element, and the reference position coordinate is used to locate the page element.
所述查找单元,用于从所述模板点击数据中查找所述参考位置坐标映射到所述基准分辨率下对应的目标参考位置坐标。The searching unit is configured to search for the reference position coordinates mapped to the corresponding target reference position coordinates at the reference resolution from the template click data.
可选的,所述装置还包括:Optionally, the device further includes:
第一计算单元,用于根据以下公式计算所述第一偏移率:The first calculation unit is configured to calculate the first offset rate according to the following formula:
mc_elm_offx_rate=(click_x-element_x)/element_width;mc_elm_offx_rate=(click_x-element_x)/element_width;
mc_elm_offy_rate=(click_y-element_y)/element_height;mc_elm_offy_rate=(click_y-element_y)/element_height;
其中,mc_elm_offx_rate为第一横向偏移率,click_x为点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,element_width为元素块的宽度;Among them, mc_elm_offx_rate is the first lateral offset rate, click_x is the horizontal coordinate of the click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, and element_width is the width of the element block;
mc_elm_offy_rate为第一纵向偏移率,click_y为点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,element_height为元素块的高度。mc_elm_offy_rate is the first vertical offset rate, click_y is the vertical coordinate of the click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, and element_height is the height of the element block.
第二计算单元,用于根据以下公式计算所述第二偏移率:The second calculation unit is configured to calculate the second offset rate according to the following formula:
emplate_mc_elm_offx_rate=(accurate_click_x-element_x)/element_widthemplate_mc_elm_offx_rate=(accurate_click_x-element_x)/element_width
template_mc_elm_offy_rate=(accurate_click_y-element_y)/element_height;template_mc_elm_offy_rate=(accurate_click_y-element_y)/element_height;
其中,template_mc_elm_offx_rate为第二横向偏移率,accurate_click_x为模板点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,element_width为元素块的宽度;Among them, template_mc_elm_offx_rate is the second horizontal offset rate, accurate_click_x is the horizontal coordinate of the template click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, and element_width is the width of the element block;
template_mc_elm_offy_rate为第二纵向偏移率,accurate_click_y为模板点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,element_height为元素块的高度。template_mc_elm_offy_rate is the second vertical offset rate, accurate_click_y is the vertical coordinate of the template click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, and element_height is the height of the element block.
可选的,所述计算模块包括:Optionally, the calculation module includes:
确定子模块,用于根据以下公式计算所述目标参考位置坐标:The determination submodule is used to calculate the target reference position coordinates according to the following formula:
element_x=accurate_click_x-template_mc_elm_offx_rate*element_widthelement_x=accurate_click_x-template_mc_elm_offx_rate*element_width
element_y=accurate_click_y-template_mc_elm_offy_rate*element_heightelement_y=accurate_click_y-template_mc_elm_offy_rate*element_height
其中,element_x为目标参考位置坐标的横坐标,accurate_click_x为模板点击位置坐标的横坐标,template_mc_elm_offx_rate为第二横向偏移率,element_width为元素块的宽度;Where element_x is the horizontal coordinate of the target reference position coordinate, accurate_click_x is the horizontal coordinate of the template click position coordinate, template_mc_elm_offx_rate is the second horizontal offset rate, and element_width is the width of the element block;
element_y为目标参考位置坐标的纵坐标,accurate_click_y为模板点击位置坐标的纵坐标,template_mc_elm_offy_rate为第二纵向偏移率,element_height为元素块的高度;element_y is the vertical coordinate of the target reference position coordinate, accurate_click_y is the vertical coordinate of the template click position coordinate, template_mc_elm_offy_rate is the second vertical offset rate, and element_height is the height of the element block;
计算子模块,用于根据所述目标参考位置坐标,通过以下公式计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标:The calculation submodule is used for calculating the click position coordinates to be mapped to the corresponding target click position coordinates at the reference resolution according to the target reference position coordinates by the following formula:
mapping_x=element_x+mc_elm_offx_rate*element_widthmapping_x=element_x+mc_elm_offx_rate*element_width
mapping_y=element_y+mc_elm_offy_rate*element_heightmapping_y=element_y+mc_elm_offy_rate*element_height
其中,mapping_x为目标点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,mc_elm_offx_rate为第一横向偏移率,element_width为元素块的宽度;Among them, mapping_x is the horizontal coordinate of the target click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, mc_elm_offx_rate is the first horizontal offset rate, and element_width is the width of the element block;
mapping_y为目标点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,mc_elm_offy_rate为第一纵向偏移率,element_height为元素块的高度。mapping_y is the vertical coordinate of the target click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, mc_elm_offy_rate is the first vertical offset rate, and element_height is the height of the element block.
可选的,所述确定单元包括:Optionally, the determining unit includes:
第一确定模块,用于将所述多种原始分辨率中的任意一种原始分辨率确定为所述基准分辨率。The first determining module is configured to determine any one of the original resolutions of the plurality of original resolutions as the reference resolution.
第二确定模块,用于获取每种原始分辨率下的页面元素对应的点击数据量并将点击数据量最多的原始分辨率确定为所述基准分辨率。The second determination module is configured to acquire the click data amount corresponding to the page element at each original resolution and determine the original resolution with the largest click data amount as the reference resolution.
为了实现上述目的,根据本发明的第三方面,提供了一种存储介质,所述存储介质包括存储的程序,其中,在所述程序运行时控制所述存储介质所在设备执行上述所述的热力图的绘制方法。In order to achieve the above object, according to a third aspect of the present invention, there is provided a storage medium, the storage medium including a stored program, wherein, when the program is running, the device where the storage medium is located is controlled to execute the above-mentioned thermal power Drawing method of the graph.
为了实现上述目的,根据本发明的第四方面,提供了一种处理器,所述处理器用于运行程序,其中,所述程序运行时执行上述所述的热力图的绘制方法。In order to achieve the above object, according to a fourth aspect of the present invention, there is provided a processor for running a program, wherein the method for drawing the thermal map described above is executed when the program is executed.
借由上述技术方案,本发明提供的热力图的绘制方法及装置,对于现有技术在对网页热力图进行绘制时,按照页面比例将尺寸不同的网页上产生的点击位置映射到同一张底图上时,导致的热力图绘制准确率较低,本发明通过获取目标页面的页面元素在多种原始分辨率下对应的点击数据,然后基于多种原始分辨率,确定基准分辨率,再确定点击位置坐标映射到基准分辨率下对应的目标点击位置坐标,最后根据所述目标点击位置坐标,在基准分辨率下绘制所述目标页面的热力图,因此相比于现有技术,本发明在对页面的热力图绘制时,能够将目标页面的页面元素在多种原始分辨率下的点击数据映射到基准分辨率下对应的目标点击位置,并根据在基准分辨率下的目标点击位置绘制目标热力图,可以准确的确定目标页面中各个页面元素的实际点击位置,根据每个实际点击位置所对应的点击量绘制热力图,能够有效提高热力图绘制的准确性。With the above technical solution, the method and device for drawing a heat map provided by the present invention maps the click positions generated on web pages of different sizes to the same base map according to the page scale when drawing the heat map of the web page in the prior art When the time is up, the accuracy of the thermal map drawing is low. The present invention obtains the click data corresponding to the page elements of the target page at multiple original resolutions, then determines the reference resolution based on the multiple original resolutions, and then determines the click The position coordinates are mapped to the corresponding target click position coordinates at the reference resolution, and finally the heat map of the target page is drawn at the reference resolution according to the target click position coordinates. Therefore, compared with the prior art, the present invention When drawing the thermal map of the page, the click data of the page elements of the target page at various original resolutions can be mapped to the corresponding target click position at the base resolution, and the target heat can be drawn according to the target click position at the base resolution Figure can accurately determine the actual click position of each page element in the target page, and draw the heat map according to the click amount corresponding to each actual click position, which can effectively improve the accuracy of the heat map drawing.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段, 而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention. In order to understand the technical means of the present invention more clearly, it can be implemented in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more obvious and understandable In the following, specific embodiments of the present invention are specifically mentioned.
附图说明BRIEF DESCRIPTION
图1为本申请的一些实施例提供的网页资源获取系统的示意性结构图;1 is a schematic structural diagram of a webpage resource acquisition system provided by some embodiments of this application;
图2为本申请的一些实施例提供的安卓操作系统的架构图一;FIG. 2 is a first architectural diagram of an Android operating system provided by some embodiments of this application;
图3为本申请的一些实施例提供的网页资源获取方法的流程示意图之一;FIG. 3 is a schematic flowchart of a method for acquiring a webpage resource provided by some embodiments of this application;
图4为本申请的一些实施例提供的网页资源获取方法的流程示意图之二;4 is a second schematic flowchart of a method for acquiring webpage resources provided by some embodiments of the present application;
图5为本申请的一些实施例提供的网页资源获取方法的流程示意图之三;5 is a third schematic flowchart of a method for acquiring webpage resources provided by some embodiments of the present application;
图6为本申请的一些实施例提供的终端设备的结构示意图一;6 is a first schematic structural diagram of a terminal device provided by some embodiments of the present application;
图7为本申请的一些实施例提供的终端设备的结构示意图二;7 is a second schematic structural diagram of a terminal device provided by some embodiments of this application;
图8为本申请的一些实施例提供的终端设备的结构示意图三;8 is a schematic structural diagram 3 of a terminal device provided by some embodiments of the present application;
图9为本申请的一些实施例提供的服务器的结构示意图一;9 is a schematic structural diagram 1 of a server provided by some embodiments of the present application;
图10为本申请的一些实施例提供的服务器的结构示意图二。FIG. 10 is a second structural diagram of a server provided by some embodiments of the present application.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Hereinafter, exemplary embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
为了提高热力图绘制的准确性,本发明实施例提供了一种热力图的绘制方法,如图1所示,该方法包括:In order to improve the accuracy of drawing the heat map, an embodiment of the present invention provides a drawing method of the heat map. As shown in FIG. 1, the method includes:
101、获取目标页面的页面元素在多种原始分辨率下对应的点击数据。101. Acquire corresponding click data of a page element of a target page at various original resolutions.
其中,所述点击数据中至少包括:点击位置坐标。而所述的分辨率为加载并展示目标页面的浏览器显示窗口所对应的显示屏的分辨率。Wherein, the click data at least includes: click position coordinates. The resolution is the resolution of the display screen corresponding to the browser display window that loads and displays the target page.
为了便于定位,在实际中可以选定参考坐标点,从而定位点击位置坐标。例如,可以选择以浏览器显示窗口的左上角位置为坐标原点,而用户的实际点击点相对于该坐标原点的坐标值,即为本步骤中所述的点击位置坐标。In order to facilitate positioning, the reference coordinate point can be selected in practice to locate the click position coordinate. For example, the upper left corner of the browser display window can be selected as the coordinate origin, and the coordinate value of the user's actual click point relative to the coordinate origin is the click position coordinate described in this step.
102、基于所述多种原始分辨率,确定基准分辨率。102. Determine a reference resolution based on the multiple original resolutions.
具体地,基准分辨率可以用户自行指定的任意一个分辨率为基准分辨率,也可以为统计采集到的点击数据中包含的各个分辨率的点击量,并将点击量最高的分辨率确定为基准分辨率,本发明实施例对此不做具体限定。Specifically, the reference resolution may be any resolution specified by the user as the reference resolution, or it may be the click amount of each resolution included in the click data collected by statistics, and the resolution with the highest click amount is determined as the reference The resolution is not specifically limited in the embodiment of the present invention.
103、确定所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标。103. Determine that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution.
其中,所述目标点击位置坐标可以为实际点击点在基准分辨率下对应的像素坐标。Wherein, the target click position coordinate may be the pixel coordinate corresponding to the actual click point at the reference resolution.
需要说明的是,每个目标网页均是由多个页面元素按照预先编辑的逻辑关系和位置进行呈现的,而每个页面元素在网页中是以元素块形式存在的。从编写网页代码的角度,根据CSS(Cascading Style Sheets,层叠样式表),页面元素是被放进一个盒子模型,利用这个盒子模型,CSS可以控制网页上每个页面元素的排版样式,相应的, 包含页面元素的盒子就是对应的元素块,从呈现效果的角度,比如在360导航首页中,页面元素是文本信息“京东”,可以看到在该网页中该页面元素的字体、颜色、在目标页面中的位置等,通过点击测试也可以获知该页面元素是对应一定的有效点击区域的,也就是说在实际过程中当实际点击位置在目标元素对应的元素块内时,点击位置对应的页面元素即为该元素块对应的页面元素。因此,当用户在不同分辨率下点击相同内容时,虽然其点击位置可能不同,但点击位置对应的页面元素是相同的。It should be noted that each target webpage is presented by multiple page elements according to the pre-edited logical relationship and position, and each page element exists in the form of an element block in the webpage. From the perspective of writing web page code, according to CSS (Cascading Style Sheets), page elements are put into a box model. Using this box model, CSS can control the layout style of each page element on the web page. The box containing the page element is the corresponding element block. From the perspective of rendering effects, for example, in the 360 navigation home page, the page element is the text information "Jingdong". You can see the font, color, and target of the page element in the web page The position of the page, etc., through the click test, you can also know that the page element corresponds to a certain effective click area, that is to say, in the actual process, when the actual click position is within the element block corresponding to the target element, the page corresponding to the click position The element is the page element corresponding to the element block. Therefore, when the user clicks the same content at different resolutions, although the click position may be different, the page elements corresponding to the click position are the same.
104、根据所述目标点击位置坐标,在所述基准分辨率下绘制所述目标页面的热力图。104. Draw a heat map of the target page at the reference resolution according to the target click position coordinates.
具体地,本步骤中在确定目标点击位置坐标后,可以每个目标点击位置对应的实际点击数据量(或热力值)绘制热力图,即将不同热力值的像素点对应的区域进行不同亮度、颜色显示等,从而确保所绘制的热力图能够真实反映实际点击情况。Specifically, after determining the coordinates of the target click position in this step, the thermal map can be drawn by the actual click data amount (or thermal value) corresponding to each target click position, that is, the areas corresponding to the pixels with different thermal values are subjected to different brightness and color Display, etc., to ensure that the heat map drawn can truly reflect the actual click situation.
本发明实施例提供的热力图的绘制方法,通过获取目标页面的页面元素在多种原始分辨率下对应的点击数据,然后基于多种原始分辨率,确定基准分辨率,再确定点击位置坐标映射到基准分辨率下对应的目标点击位置坐标,最后根据所述目标点击位置坐标,在基准分辨率下绘制所述目标页面的热力图,因此相比于现有技术,本发明在对页面的热力图绘制时,能够将目标页面的页面元素在多种原始分辨率下的点击数据映射到基准分辨率下对应的目标点击位置,并根据在基准分辨率下的目标点击位置绘制目标热力图,可以准确的确定目标页面中各个页面元素的实际点击位置,根据每个实际点击位置所对应的点击量绘制热力图,能够有效提高热力图绘制的准确性。The method for drawing a heat map provided by the embodiment of the present invention obtains the click data corresponding to the page elements of the target page at various original resolutions, then determines the reference resolution based on the various original resolutions, and then determines the coordinate mapping of the click position Go to the corresponding target click position coordinates at the reference resolution, and finally draw the thermal map of the target page at the reference resolution according to the target click position coordinates. Therefore, compared with the prior art, When drawing, you can map the click data of the page elements of the target page at various original resolutions to the corresponding target click position at the reference resolution, and draw the target heat map according to the target click position at the reference resolution. Accurately determine the actual click position of each page element in the target page, and draw the heat map according to the click amount corresponding to each actual click position, which can effectively improve the accuracy of the heat map drawing.
进一步的,作为对图1所示实施例的细化及扩展,本发明实施例还提供了另一种热力图的绘制方法,如图2所示。Further, as a refinement and expansion of the embodiment shown in FIG. 1, an embodiment of the present invention also provides another method for drawing a thermal map, as shown in FIG. 2.
201、获取目标页面的页面元素在多种原始分辨率下对应的点击数据。201. Acquire corresponding click data of a page element of a target page at various original resolutions.
其中,所述点击数据中至少包括:点击位置坐标。而所述点击位置坐标的概念解释和本步骤的具体实施方式均可以参考所述步骤101中相应描述,本发明实施例在此不再赘述。Wherein, the click data at least includes: click position coordinates. For the conceptual explanation of the click position coordinates and the specific implementation of this step, reference may be made to the corresponding description in step 101, and details are not described herein again in this embodiment of the present invention.
由于内容相同的网页在不同分辨率的显示屏中进行展示时,即便用户点击的是相同内容,而获取到的点击数据中的点击位置坐标也是不同的,因此在本步骤中需要获取各个原始分辨率下的点击数据,以便于进一步将不同分辨率下对应的点击数据映射到同一个分辨率下的点击数据。Since webpages with the same content are displayed on screens with different resolutions, even if the user clicks on the same content, the click position coordinates in the obtained click data are also different, so each original resolution needs to be obtained in this step Click data at the same rate, in order to further map the corresponding click data at different resolutions to the click data at the same resolution.
202、基于所述多种原始分辨率,确定基准分辨率。202. Determine a reference resolution based on the multiple original resolutions.
所述步骤202可以包括:将所述多种原始分辨率中的任意一种原始分辨率确定为所述基准分辨率。例如指定800×600分辨率为基准分辨率。对于本发明实施例,上述步骤中获取到的点击数据中还可以包括点击数据量,因此为了减少数据处理量而提升热力图绘制效率,所述步骤202还可以包括:获取每种原始分辨率下的页面元素对应的点击数据量;将点击数据量最多的原始分辨率确定为所述基准分辨率。对于本发明实施例,通过统计各种原始分辨率下的点击数据量并将点击数据量最多的原始分辨率确定为基准分辨率,在将原始分辨率下的点击数据映射到基准分辨率下的点击数据处理时,由于基准分辨率下的点击数据量最大,不必进行额外的映射计算,可以最大程 度的减少数据处理量,从而提升了数据处理的效率,进而提升了热力图绘制的效率。The step 202 may include: determining any one of the plurality of original resolutions as the reference resolution. For example, specify 800×600 resolution as the reference resolution. For the embodiment of the present invention, the click data acquired in the above step may also include the click data amount. Therefore, in order to reduce the amount of data processing and improve the efficiency of drawing the heat map, the step 202 may further include: acquiring each original resolution The amount of click data corresponding to the page element of is; the original resolution with the largest amount of click data is determined as the reference resolution. For the embodiment of the present invention, by counting the amount of click data at various original resolutions and determining the original resolution with the largest amount of click data as the reference resolution, the click data at the original resolution is mapped to the reference resolution When click data processing, since the click data volume at the reference resolution is the largest, there is no need to perform additional mapping calculations, and the data processing volume can be reduced to the greatest extent, thereby improving the efficiency of data processing and the efficiency of heat map drawing.
203、根据预先设置的页面元素路径,查找所述页面元素映射到所述基准分辨率下对应的目标页面元素。203. Find, according to a preset page element path, the page element mapped to the corresponding target page element at the reference resolution.
其中,页面元素路径为预先生成的页面的固有属性,往往在网页生成时,对应生成各个页面元素的路径。例如,在网页中,构成页面(或文档)的对象被组织在一个树形结构中,用来表示文档中对象的标准模型就称为DOM,通过DOM解析可以确定页面的结构和页面对象的位置等。在本发明实施例中,在原始分辨率下和基准分辨率下目标网页的内容信息是相同的,也就是说在各个分辨率下的目标页面具有相同的页面结构,所以可以通过解析目标页面的源代码来获知目标元素在目标页面中的位置,但具体的方法,本发明实施例不做限定。由于目标页面的网页内容始终是相同的,所以在任何分辨率下通过页面元素的生成路径均能准确查找到页面元素所在的位置,以便于点击位置确定的准确性,从而提高了热力图绘制的准确性。Among them, the path of the page element is an inherent property of the pre-generated page, and the path of each page element is often generated when the web page is generated. For example, in a web page, the objects that make up the page (or document) are organized in a tree structure. The standard model used to represent the objects in the document is called DOM, and the structure of the page and the position of the page object can be determined by DOM parsing. Wait. In the embodiment of the present invention, the content information of the target webpage is the same at the original resolution and the reference resolution, that is to say, the target page at each resolution has the same page structure, so the The source code is used to know the position of the target element in the target page, but the specific method is not limited by the embodiment of the present invention. Since the page content of the target page is always the same, the location of the page element can be accurately found through the generation path of the page element at any resolution, so that the accuracy of the click position determination is improved, thereby improving the drawing of the heat map accuracy.
204、从预先存储的目标页面元素的模板点击数据中,查找所述点击位置坐标映射到所述基准分辨率下对应的模板点击位置坐标。204. Find, from the template click data of the target page element stored in advance, the click position coordinates mapped to the corresponding template click position coordinates at the reference resolution.
其中,所述模板点击数据为在所述基准分辨率下对所述目标页面元素进行点击得到的,所述模板点击数据中包括所述目标页面元素的至少一个模板点击位置坐标。具体地,可以预先通过在基准分辨率下对目标页面元素进行模拟点击,得到相应的模板点击数据;或者,将目标页面元素在基准分辨率下的历史点击数据作为本步骤中的模板点击数据。同样的,模板点击数据中包含有各个模板点击位置坐标为点击位置在基准分辨率下的像素坐标。Wherein, the template click data is obtained by clicking the target page element at the reference resolution, and the template click data includes at least one template click position coordinate of the target page element. Specifically, the template click data can be obtained by simulating the target page element at the reference resolution in advance; or, the historical click data of the target page element at the reference resolution can be used as the template click data in this step. Similarly, the template click data includes the coordinates of the click position of each template as the pixel coordinates of the click position at the reference resolution.
需要说明的是,采集到的点击数据中包含有各个点击位置对应的页面元素的标识信息,因此当在上述步骤中获取到页面元素的点击数据之后,可以根据页面元素的标识在模板点击数据中进行查找,得到模板点击数据。It should be noted that the collected click data contains the identification information of the page element corresponding to each click position. Therefore, after the click data of the page element is obtained in the above step, it can be included in the template click data according to the page element identification Perform a search to obtain template click data.
205、确定所述目标页面元素对应的元素块尺寸。205. Determine the element block size corresponding to the target page element.
其中,所述元素块尺寸包括元素块的宽度和元素块的高度。The element block size includes the width of the element block and the height of the element block.
在本发明实施例中,在获取到页面元素的点击数据并确定了页面元素之后,则可以通过解析目标页面的代码,比如:HTML文件、CSS文件、JS文件等等,便可以获知页面元素对应的元素块的位置与尺寸。In the embodiment of the present invention, after the click data of the page element is obtained and the page element is determined, the code of the target page can be parsed, such as: HTML file, CSS file, JS file, etc., and the corresponding element of the page element can be known The position and size of the element block.
206、获取所述页面元素的点击位置坐标在所述目标页面元素中的第一偏移率,以及所述模板点击位置坐标在所述目标页面元素中的第二偏移率。206. Acquire a first offset rate of the click position coordinates of the page element in the target page element, and a second offset rate of the template click position coordinates in the target page element.
其中,所述第一偏移率包括第一横向偏移率和第一纵向偏移率,所述第二偏移率包括第二横向偏移率和第二纵向偏移率。在实际使用中,页面元素往往通过具有一定尺寸的元素块来表示,当点击这个元素块有效范围内的任一位置时,都可能产生点击该页面元素的效果,可以在页面元素中选择的一个参考点来定位该页面元素,而偏移率是用于衡量实际点击位置在页面元素内相对于页面元素参考点位置的偏移情况的一个指标。偏移率可以通过实际点击位置与元素参考点位置的差值,再除以元素块的宽度(或高度)得到。Wherein, the first offset rate includes a first lateral offset rate and a first longitudinal offset rate, and the second offset rate includes a second lateral offset rate and a second longitudinal offset rate. In actual use, page elements are often represented by element blocks with a certain size. When any position within the effective range of this element block is clicked, the effect of clicking the page element may be generated. One of the page elements can be selected. The reference point is used to locate the page element, and the offset rate is an index used to measure the deviation of the actual click position within the page element relative to the position of the page element reference point. The offset rate can be obtained by the difference between the actual click position and the element reference point position, and then divided by the width (or height) of the element block.
具体地可以直接通过上述预置脚本文件直接获取,也可以通过计算得到:Specifically, it can be directly obtained through the above preset script file, or can be obtained through calculation:
考虑到同一点击位置,在不同分辨率下的页面元素中的偏移率是相同的,也即,上述第一偏移率既可以通过在原始分辨率下的点击位置相对于该分辨率下元素块参考位置的偏移量,和该分辨率下的元素块尺寸计算得到;也可以通过该点击位置映射到基准分辨率下,相对于目标页面元素的目标参考位置坐标的偏移情况计算得到。具体可以根据需要任意选择,本发明实施例不做具体限定。Considering the same click position, the offset rate in the page elements at different resolutions is the same, that is, the above-mentioned first offset rate can be determined by the click position at the original resolution relative to the element at the resolution The offset of the block reference position and the element block size at this resolution can be calculated; it can also be calculated by mapping the click position to the reference resolution and offset from the target reference position coordinates of the target page element. The specifics can be arbitrarily selected according to needs, and the embodiments of the present invention are not specifically limited.
在一个实施例中,可以根据以下公式计算所述第一偏移率:In one embodiment, the first offset rate can be calculated according to the following formula:
mc_elm_offx_rate=(click_x-element_x)/element_width;mc_elm_offx_rate=(click_x-element_x)/element_width;
mc_elm_offy_rate=(click_y-element_y)/element_height;mc_elm_offy_rate=(click_y-element_y)/element_height;
其中,mc_elm_offx_rate为第一横向偏移率,click_x为点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,element_width为元素块的宽度;Among them, mc_elm_offx_rate is the first lateral offset rate, click_x is the horizontal coordinate of the click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, and element_width is the width of the element block;
mc_elm_offy_rate为第一纵向偏移率,click_y为点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,element_height为元素块的高度;mc_elm_offy_rate is the first vertical offset rate, click_y is the vertical coordinate of the click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, and element_height is the height of the element block;
和/或,and / or,
根据以下公式计算所述第二偏移率:The second offset rate is calculated according to the following formula:
template_mc_elm_offx_rate=(accurate_click_x-element_x)/element_widthtemplate_mc_elm_offx_rate=(accurate_click_x-element_x)/element_width
template_mc_elm_offy_rate=(accurate_click_y-element_y)/element_height;template_mc_elm_offy_rate=(accurate_click_y-element_y)/element_height;
其中,template_mc_elm_offx_rate为第二横向偏移率,accurate_click_x为模板点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,element_width为元素块的宽度;Among them, template_mc_elm_offx_rate is the second horizontal offset rate, accurate_click_x is the horizontal coordinate of the template click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, and element_width is the width of the element block;
template_mc_elm_offy_rate为第二纵向偏移率,accurate_click_y为模板点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,element_height为元素块的高度。template_mc_elm_offy_rate is the second vertical offset rate, accurate_click_y is the vertical coordinate of the template click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, and element_height is the height of the element block.
207、根据所述模板点击位置坐标、所述第一偏移率、所述第二偏移率和所述元素块尺寸,计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标。207. Calculate the click position coordinates mapped to the corresponding target click at the reference resolution according to the template click position coordinates, the first offset rate, the second offset rate, and the element block size Position coordinates.
具体地,本步骤可以为首先根据模板点击位置坐标的第二偏移率和模板点击位置坐标,计算目标参考位置的位置坐标,而后再根据点击位置与目标参考位置之间的偏移率确定点击位置在基准分辨率下的目标点击位置。Specifically, this step may first calculate the position coordinates of the target reference position according to the second offset rate of the template click position coordinate and the template click position coordinate, and then determine the click according to the offset rate between the click position and the target reference position The target click position whose position is at the reference resolution.
对于本发明实施例,所述步骤207之前还可以包括:在所述页面元素中确定一个参考位置坐标,所述参考位置坐标用于定位所述页面元素;从所述模板点击数据中查找所述参考位置坐标映射到所述基准分辨率下对应的目标参考位置坐标。而所述参考位置坐标可以为元素块的任意一个位置,如页面元素的元素块左上角坐标。For the embodiment of the present invention, before step 207, the method may further include: determining a reference position coordinate in the page element, where the reference position coordinate is used to locate the page element; and searching the template click data from the template The reference position coordinates are mapped to the corresponding target reference position coordinates at the reference resolution. The reference position coordinate may be any position of the element block, such as the upper left corner coordinate of the element block of the page element.
进一步的,根据以下公式计算目标参考位置坐标:Further, the target reference position coordinates are calculated according to the following formula:
element_x=accurate_click_x-template_mc_elm_offx_rate*element_widthelement_x=accurate_click_x-template_mc_elm_offx_rate*element_width
element_y=accurate_click_y-template_mc_elm_offy_rate*element_heightelement_y=accurate_click_y-template_mc_elm_offy_rate*element_height
其中,element_x为目标参考位置坐标的横坐标,accurate_click_x为模板点击位置坐标的横坐标,template_mc_elm_offx_rate为第二横向偏移率,element_width为元素块的宽度;Where element_x is the horizontal coordinate of the target reference position coordinate, accurate_click_x is the horizontal coordinate of the template click position coordinate, template_mc_elm_offx_rate is the second horizontal offset rate, and element_width is the width of the element block;
element_y为目标参考位置坐标的纵坐标,accurate_click_y为模板点击位置坐标的纵坐标,template_mc_elm_offy_rate为第二纵向偏移率,element_height为元素块的高度;element_y is the vertical coordinate of the target reference position coordinate, accurate_click_y is the vertical coordinate of the template click position coordinate, template_mc_elm_offy_rate is the second vertical offset rate, and element_height is the height of the element block;
根据所述目标参考位置坐标,通过以下公式计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标:According to the target reference position coordinates, the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution are calculated by the following formula:
mapping_x=element_x+mc_elm_offx_rate*element_widthmapping_x=element_x+mc_elm_offx_rate*element_width
mapping_y=element_y+mc_elm_offy_rate*element_heightmapping_y=element_y+mc_elm_offy_rate*element_height
其中,mapping_x为目标点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,mc_elm_offx_rate为第一横向偏移率,element_width为元素块的宽度;Among them, mapping_x is the horizontal coordinate of the target click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, mc_elm_offx_rate is the first horizontal offset rate, and element_width is the width of the element block;
mapping_y为目标点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,mc_elm_offy_rate为第一纵向偏移率,element_height为元素块的高度。mapping_y is the vertical coordinate of the target click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, mc_elm_offy_rate is the first vertical offset rate, and element_height is the height of the element block.
对于本发明实施例,通过获取在原始分辨率下点击位置与目标参考位置之间的第一偏移率和在基准分辨率下模板点击位置与目标参考位置之间的第二偏移率,以使得能够根据第二偏移率确定在基准分辨率下目标参考位置的像素坐标,进而根据得到的该像素坐标和第一偏移率,确定点击位置坐标在基准分辨率下的目标点击位置。通过偏移率能够准确定位点击位置在基准分辨率下的目标点击位置,从而确保了点击位置映射的准确性,提高了热力图绘制的准确性。For the embodiment of the present invention, by acquiring the first offset rate between the click position and the target reference position at the original resolution and the second offset rate between the template click position and the target reference position at the reference resolution, to Therefore, the pixel coordinates of the target reference position at the reference resolution can be determined according to the second offset rate, and then the target click position of the click position coordinate at the reference resolution can be determined based on the obtained pixel coordinates and the first offset rate. The offset rate can accurately locate the target click position of the click position at the reference resolution, thereby ensuring the accuracy of the click position mapping and improving the accuracy of the heat map drawing.
208、根据所述目标点击位置坐标,在所述基准分辨率下绘制所述目标页面的热力图。208. Draw a heat map of the target page at the reference resolution according to the target click position coordinates.
具体地,本步骤中具体实施方式可以参考所述步骤104中相应描述,在此不再赘述。Specifically, for the specific implementation manner in this step, reference may be made to the corresponding description in step 104, and details are not described herein again.
进一步的,作为对上述图1所示方法的实现,本发明实施例还提供了一种热力图的绘制装置,用于对上述图1所示的方法进行实现。该装置实施例与前述方法实施例对应,为便于阅读,本装置实施例不再对前述方法实施例中的细节内容进行逐一赘述,但应当明确,本实施例中的装置能够对应实现前述方法实施例中的全部内容。如图3所示,该装置包括:获取单元31、确定单元32、绘制单元33,其中Further, as an implementation of the method shown in FIG. 1 above, an embodiment of the present invention further provides a device for drawing a thermal map for implementing the method shown in FIG. 1. The device embodiment corresponds to the foregoing method embodiment. For ease of reading, the device embodiment will not repeat the details of the foregoing method embodiment one by one, but it should be clear that the device in this embodiment can implement the aforementioned method correspondingly. All the content in the example. As shown in FIG. 3, the device includes: an obtaining unit 31, a determining unit 32, and a drawing unit 33, wherein
获取单元31,可以用于获取目标页面的页面元素在多种原始分辨率下对应的点击数据,所述点击数据中至少包括:点击位置坐标。The obtaining unit 31 may be used to obtain the click data corresponding to the page elements of the target page at various original resolutions, where the click data includes at least: click position coordinates.
确定单元32,可以用于基于所述多种原始分辨率,确定基准分辨率。The determining unit 32 may be used to determine a reference resolution based on the multiple original resolutions.
所述确定单元32,还可以用于确定所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标。The determining unit 32 may also be used to determine that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution.
绘制单元33,可以用于根据所述目标点击位置坐标,在所述基准分辨率下绘制所述目标页面的热力图。The drawing unit 33 may be used to draw the heat map of the target page at the reference resolution according to the coordinates of the target click position.
进一步的,作为对上述图2所示方法的实现,本发明实施例还提供了另一种热力图的绘制装置,用于对上述图2所示的方法进行实现。该装置实施例与前述方法实施例对应,为便于阅读,本装置实施例不再对前述方法实施例中的细节内容进行逐一赘述,但应当明确,本实施例中的装置能够对应实现前述方法实施例中的全部内容。如 图4所示,该装置包括:获取单元41、确定单元42、绘制单元43,其中,Further, as an implementation of the method shown in FIG. 2 above, an embodiment of the present invention further provides another apparatus for drawing a thermal map for implementing the method shown in FIG. 2. This device embodiment corresponds to the foregoing method embodiment. For ease of reading, the device embodiment will not repeat the details of the foregoing method embodiment one by one, but it should be clear that the device in this embodiment can implement the aforementioned method correspondingly. All the content in the example. As shown in FIG. 4, the device includes: an acquiring unit 41, a determining unit 42, and a drawing unit 43, wherein,
获取单元41,可以用于获取目标页面的页面元素在多种原始分辨率下对应的点击数据,所述点击数据中至少包括:点击位置坐标。The obtaining unit 41 may be used to obtain the click data corresponding to the page elements of the target page at various original resolutions, where the click data includes at least: click position coordinates.
确定单元42,可以用于基于所述多种原始分辨率,确定基准分辨率。The determining unit 42 may be used to determine a reference resolution based on the multiple original resolutions.
所述确定单元42,还可以用于确定所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标。The determining unit 42 may also be used to determine that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution.
绘制单元43,可以用于根据所述目标点击位置坐标,在所述基准分辨率下绘制所述目标页面的热力图。The drawing unit 43 may be used to draw the heat map of the target page at the reference resolution according to the coordinates of the target click position.
进一步的,所述确定单元42包括:Further, the determining unit 42 includes:
第一确定模块4201,可以用于将所述多种原始分辨率中的任意一种原始分辨率确定为所述基准分辨率。The first determining module 4201 may be used to determine any one of the original resolutions as the reference resolution.
获取模块4202,可以用于获取每种原始分辨率下的页面元素对应的点击数据量。The obtaining module 4202 may be used to obtain the amount of click data corresponding to each page element at each original resolution.
第二确定模块4203,可以用于将点击数据量最多的原始分辨率确定为所述基准分辨率。The second determination module 4203 may be used to determine the original resolution with the largest amount of click data as the reference resolution.
进一步的,所述装置还包括:查找单元44。Further, the device further includes: a searching unit 44.
所述查找单元44,可以用于根据预先设置的页面元素路径,查找所述页面元素映射到所述基准分辨率下对应的目标页面元素。The searching unit 44 may be configured to search for the page element mapped to the corresponding target page element at the reference resolution according to the preset page element path.
所述查找单元44,还可以用于从预先存储的目标页面元素的模板点击数据中,查找所述点击位置坐标映射到所述基准分辨率下对应的模板点击位置坐标。The searching unit 44 can also be used to search the template click data of the target page element from the pre-stored template click data to map the corresponding coordinates of the template click position at the reference resolution.
所述获取单元41,还可以用于获取所述页面元素的点击位置坐标在所述页面元素中的第一偏移率,以及所述模板点击位置坐标在所述目标页面元素中的第二偏移率。The acquiring unit 41 may also be used to acquire a first offset rate of the click position coordinates of the page element in the page element, and a second offset of the template click position coordinates in the target page element Shift rate.
进一步的,further,
所述确定单元42,还可以用于确定所述目标页面元素对应的元素块尺寸。The determining unit 42 may also be used to determine the element block size corresponding to the target page element.
进一步的,所述装置还包括:计算单元45。Further, the device further includes: a calculation unit 45.
所述计算单元45,可以用于根据所述模板点击位置坐标、所述第一偏移率、所述第二偏移率和所述元素块尺寸,计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标。The calculation unit 45 may be configured to calculate the click position coordinates to be mapped to the reference according to the template click position coordinates, the first offset rate, the second offset rate, and the element block size The coordinates of the corresponding target click position at the resolution.
所述确定单元42,还可以用于在所述页面元素中确定一个参考位置坐标,所述参考位置坐标用于定位所述页面元素。The determining unit 42 may also be used to determine a reference position coordinate in the page element, and the reference position coordinate is used to locate the page element.
所述查找单元44,还可以用于从所述模板点击数据中查找所述参考位置坐标映射到所述基准分辨率下对应的目标参考位置坐标。The searching unit 44 may also be used to search for the reference position coordinates mapped to the corresponding target reference position coordinates at the reference resolution from the template click data.
本发明实施例提供的另一种热力图的绘制装置。所述装置包括:获取单元、确定单元及绘制单元。对于现有技术在对网页热力图进行绘制时,按照页面比例将尺寸不同的网页上产生的点击位置映射到同一张底图上时,导致的热力图绘制准确率较低,本发明通过获取目标页面的页面元素在多种原始分辨率下对应的点击数据,然后基于多种原始分辨率,确定基准分辨率,再确定点击位置坐标映射到基准分辨率下对应的目标点击位置坐标,最后根据所述目标点击位置坐标,在基准分辨率下绘制所述目标 页面的热力图,因此相比于现有技术,本发明在对页面的热力图绘制时,能够将目标页面的页面元素在多种原始分辨率下的点击数据映射到基准分辨率下对应的目标点击位置,并根据在基准分辨率下的目标点击位置绘制目标热力图,可以准确的确定目标页面中各个页面元素的实际点击位置,根据每个实际点击位置所对应的点击量绘制热力图,能够有效提高热力图绘制的准确性。Another apparatus for drawing a thermal map provided by an embodiment of the present invention. The device includes: an acquiring unit, a determining unit and a drawing unit. In the prior art, when drawing a heat map of a web page, when the click positions generated on web pages of different sizes are mapped to the same base map according to the page ratio, the accuracy of drawing the heat map is low. The page elements of the page correspond to the click data at multiple original resolutions, and then determine the reference resolution based on the multiple original resolutions, and then determine the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution, and finally according to the The target click position coordinate is used to draw the thermal map of the target page at the reference resolution. Therefore, compared with the prior art, the present invention can draw the page elements of the target page in a variety of originals when drawing the thermal map of the page The click data at the resolution is mapped to the corresponding target click position at the reference resolution, and the target heat map is drawn according to the target click position at the reference resolution, which can accurately determine the actual click position of each page element in the target page. Drawing a heat map with the click amount corresponding to each actual click position can effectively improve the accuracy of drawing the heat map.
所述文本处理装置包括处理器和存储器,上述获取单元31、确定单元32、绘制单元33等均作为程序单元存储在存储器中,由处理器执行存储在存储器中的上述程序单元来实现相应的功能。The text processing device includes a processor and a memory, and the above-mentioned acquisition unit 31, determination unit 32, drawing unit 33, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to achieve corresponding functions .
处理器中包含内核,由内核去存储器中调取相应的程序单元。内核可以设置一个或以上,通过调整内核参数来提高热力图绘制的准确性。The processor contains a core, and the core retrieves the corresponding program unit from the memory. One or more kernels can be set to improve the accuracy of the heat map drawing by adjusting the kernel parameters.
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM),存储器包括至少一个存储芯片。The memory may include non-permanent memory, random access memory (RAM) and/or non-volatile memory in a computer-readable medium, such as read only memory (ROM) or flash memory (flash RAM), and the memory includes at least one Memory chip.
本发明实施例提供了一种存储介质,其上存储有程序,该程序被处理器执行时实现所述热力图的绘制方法。An embodiment of the present invention provides a storage medium on which a program is stored, and when the program is executed by a processor, the method for drawing the heat map is implemented.
本发明实施例提供了一种处理器,所述处理器用于运行程序,其中,所述程序运行时执行所述热力图的绘制方法。An embodiment of the present invention provides a processor for running a program, wherein the method for drawing a heat map is executed when the program is run.
本发明实施例提供了一种设备,设备包括处理器、存储器及存储在存储器上并可在处理器上运行的程序,处理器执行程序时实现以下步骤:获取目标页面的页面元素在多种原始分辨率下对应的点击数据,所述点击数据中至少包括:点击位置坐标;基于所述多种原始分辨率,确定基准分辨率;确定所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标;根据所述目标点击位置坐标,在所述基准分辨率下绘制所述目标页面的热力图。An embodiment of the present invention provides a device, which includes a processor, a memory, and a program stored on the memory and executable on the processor. When the processor executes the program, the following steps are realized: the page elements of the target page are obtained in various original Corresponding click data at a resolution, the click data at least includes: click position coordinates; based on the multiple original resolutions, a reference resolution is determined; and the click position coordinates are mapped to the corresponding at the reference resolution Target click position coordinates; according to the target click position coordinates, draw a heat map of the target page at the reference resolution.
进一步的,确定所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标,包括:Further, determining that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution includes:
根据预先设置的页面元素路径,查找所述页面元素映射到所述基准分辨率下对应的目标页面元素;According to the preset page element path, find the page element mapped to the corresponding target page element at the reference resolution;
从预先存储的目标页面元素的模板点击数据中,查找所述点击位置坐标映射到所述基准分辨率下对应的模板点击位置坐标,所述模板点击数据为在所述基准分辨率下对所述目标页面元素进行点击得到的,所述模板点击数据中包括所述目标页面元素的至少一个模板点击位置坐标;From the pre-stored template click data of the target page element, find the coordinates of the click position mapped to the corresponding template click position coordinates at the reference resolution, the template click data for the reference resolution at the reference resolution Obtained by clicking on a target page element, the template click data includes at least one template click position coordinate of the target page element;
获取所述页面元素的点击位置坐标在所述页面元素中的第一偏移率,以及所述模板点击位置坐标在所述目标页面元素中的第二偏移率;Acquiring a first offset rate of the click position coordinates of the page element in the page element, and a second offset rate of the template click position coordinates in the target page element;
确定所述目标页面元素对应的元素块尺寸;Determine the element block size corresponding to the target page element;
根据所述模板点击位置坐标、所述第一偏移率、所述第二偏移率和所述元素块尺寸,计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标。According to the template click position coordinates, the first offset rate, the second offset rate, and the element block size, calculate the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution .
进一步的,在计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位 置坐标之前,所述方法还包括:Further, before calculating the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution, the method further includes:
在所述页面元素中确定一个参考位置坐标,所述参考位置坐标用于定位所述页面元素;Determining a reference position coordinate in the page element, the reference position coordinate is used to locate the page element;
从所述模板点击数据中查找所述参考位置坐标映射到所述基准分辨率下对应的目标参考位置坐标。Finding the reference position coordinates mapped to the corresponding target reference position coordinates at the reference resolution from the template click data.
进一步的,所述第一偏移率包括第一横向偏移率和第一纵向偏移率,所述第二偏移率包括第二横向偏移率和第二纵向偏移率,所述元素块尺寸包括元素块的宽度和元素块的高度,在获取所述第一偏移率和所述第二偏移率之前,所述方法还包括:Further, the first offset rate includes a first horizontal offset rate and a first vertical offset rate, the second offset rate includes a second horizontal offset rate and a second vertical offset rate, and the element The block size includes the width of the element block and the height of the element block. Before acquiring the first offset rate and the second offset rate, the method further includes:
根据以下公式计算所述第一偏移率:The first offset rate is calculated according to the following formula:
template_mc_elm_offx_rate=(accurate_click_x-element_x)/element_widthtemplate_mc_elm_offx_rate=(accurate_click_x-element_x)/element_width
template_mc_elm_offy_rate=(accurate_click_y-element_y)/element_height;template_mc_elm_offy_rate=(accurate_click_y-element_y)/element_height;
其中,template_mc_elm_offx_rate为第一横向偏移率,accurate_click_x为模板点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,element_width为元素块的宽度;Among them, template_mc_elm_offx_rate is the first horizontal offset rate, accurate_click_x is the horizontal coordinate of the template click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, and element_width is the width of the element block;
template_mc_elm_offy_rate为第一纵向偏移率,accurate_click_y为模板点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,element_height为元素块的高度;template_mc_elm_offy_rate is the first vertical offset rate, accurate_click_y is the vertical coordinate of the template click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, and element_height is the height of the element block;
和/或,and / or,
根据以下公式计算所述第二偏移率:The second offset rate is calculated according to the following formula:
mc_elm_offx_rate=(click_x-element_x)/element_width;mc_elm_offx_rate=(click_x-element_x)/element_width;
mc_elm_offy_rate=(click_y-element_y)/element_height;mc_elm_offy_rate=(click_y-element_y)/element_height;
其中,mc_elm_offx_rate为第二横向偏移率,click_x为点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,element_width为元素块的宽度;Among them, mc_elm_offx_rate is the second horizontal offset rate, click_x is the horizontal coordinate of the click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, and element_width is the width of the element block;
mc_elm_offy_rate为第二纵向偏移率,click_y为点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,element_height为元素块的高度。mc_elm_offy_rate is the second vertical offset rate, click_y is the vertical coordinate of the click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, and element_height is the height of the element block.
进一步的,根据所述模板点击位置坐标、所述第一偏移率、所述第二偏移率和所述元素块尺寸,计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标,包括:Further, according to the template click position coordinates, the first offset rate, the second offset rate, and the element block size, calculate the click position coordinates mapped to the corresponding target at the reference resolution Click location coordinates, including:
根据以下公式计算所述目标参考位置坐标:Calculate the target reference position coordinates according to the following formula:
element_x=accurate_click_x-template_mc_elm_offx_rate*element_widthelement_x=accurate_click_x-template_mc_elm_offx_rate*element_width
element_y=accurate_click_y-template_mc_elm_offy_rate*element_heightelement_y=accurate_click_y-template_mc_elm_offy_rate*element_height
其中,element_x为目标参考位置坐标的横坐标,accurate_click_x为模板点击位置坐标的横坐标,template_mc_elm_offx_rate为第一横向偏移率,element_width为元素块的宽度;Where element_x is the horizontal coordinate of the target reference position coordinate, accurate_click_x is the horizontal coordinate of the template click position coordinate, template_mc_elm_offx_rate is the first horizontal offset rate, and element_width is the width of the element block;
element_y为目标参考位置坐标的纵坐标,accurate_click_y为模板点击位置坐标的纵坐标,template_mc_elm_offy_rate为第一纵向偏移率,element_height为元素块的高度;element_y is the vertical coordinate of the target reference position coordinate, accurate_click_y is the vertical coordinate of the template click position coordinate, template_mc_elm_offy_rate is the first vertical offset rate, element_height is the height of the element block;
根据所述目标参考位置坐标,通过以下公式计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标:According to the target reference position coordinates, the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution are calculated by the following formula:
mapping_x=element_x+mc_elm_offx_rate*element_widthmapping_x=element_x+mc_elm_offx_rate*element_width
mapping_y=element_y+mc_elm_offy_rate*element_heightmapping_y=element_y+mc_elm_offy_rate*element_height
其中,mapping_x为目标点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,mc_elm_offx_rate为第二横向偏移率,element_width为元素块的宽度;Among them, mapping_x is the horizontal coordinate of the target click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, mc_elm_offx_rate is the second horizontal offset rate, and element_width is the width of the element block;
mapping_y为目标点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,mc_elm_offy_rate为第二纵向偏移率,element_height为元素块的高度。mapping_y is the vertical coordinate of the target click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, mc_elm_offy_rate is the second vertical offset rate, and element_height is the height of the element block.
进一步的,所述基于所述多种原始分辨率,确定基准分辨率,包括:Further, the determining the reference resolution based on the multiple original resolutions includes:
将所述多种原始分辨率中的任意一种原始分辨率确定为所述基准分辨率;或,Determine any one of the plurality of original resolutions as the reference resolution; or,
所述点击数据还包括:点击数据量,所述基于所述多种原始分辨率,确定基准分辨率,包括:The click data further includes: the amount of click data, and determining the reference resolution based on the multiple original resolutions includes:
获取每种原始分辨率下的页面元素对应的点击数据量;Get the amount of click data corresponding to each page element at each original resolution;
将点击数据量最多的原始分辨率确定为所述基准分辨率。The original resolution with the largest amount of click data is determined as the reference resolution.
本发明实施例中的设备可以是服务器、PC、PAD、手机等。The device in the embodiment of the present invention may be a server, a PC, a PAD, a mobile phone, or the like.
本发明实施例还提供了一种计算机程序产品,当在数据处理设备上执行时,适于执行初始化有如下方法步骤的程序:获取目标页面的页面元素在多种原始分辨率下对应的点击数据,所述点击数据中至少包括:点击位置坐标;基于所述多种原始分辨率,确定基准分辨率;确定所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标;根据所述目标点击位置坐标,在所述基准分辨率下绘制所述目标页面的热力图。An embodiment of the present invention also provides a computer program product which, when executed on a data processing device, is suitable for executing a program initialized with the following method steps: acquiring click data corresponding to page elements of a target page at various original resolutions , The click data includes at least: click position coordinates; based on the plurality of original resolutions, determine a reference resolution; determine the click position coordinates mapped to the corresponding target click position coordinates under the reference resolution; according to The target click position coordinate is used to draw a thermal map of the target page at the reference resolution.
进一步的,确定所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标,包括:Further, determining that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution includes:
根据预先设置的页面元素路径,查找所述页面元素映射到所述基准分辨率下对应的目标页面元素;According to the preset page element path, find the page element mapped to the corresponding target page element at the reference resolution;
从预先存储的目标页面元素的模板点击数据中,查找所述点击位置坐标映射到所述基准分辨率下对应的模板点击位置坐标,所述模板点击数据为在所述基准分辨率下对所述目标页面元素进行点击得到的,所述模板点击数据中包括所述目标页面元素的至少一个模板点击位置坐标;From the pre-stored template click data of the target page element, find the coordinates of the click position mapped to the corresponding template click position coordinates at the reference resolution, the template click data for the reference resolution at the reference resolution Obtained by clicking on a target page element, the template click data includes at least one template click position coordinate of the target page element;
获取所述页面元素的点击位置坐标在所述页面元素中的第一偏移率,以及所述模板点击位置坐标在所述目标页面元素中的第二偏移率;Acquiring a first offset rate of the click position coordinates of the page element in the page element, and a second offset rate of the template click position coordinates in the target page element;
确定所述目标页面元素对应的元素块尺寸;Determine the element block size corresponding to the target page element;
根据所述模板点击位置坐标、所述第一偏移率、所述第二偏移率和所述元素块尺寸,计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标。According to the template click position coordinates, the first offset rate, the second offset rate, and the element block size, calculate the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution .
进一步的,在计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标之前,所述方法还包括:Further, before calculating the mapping of the click position coordinates to the corresponding target click position coordinates at the reference resolution, the method further includes:
在所述页面元素中确定一个参考位置坐标,所述参考位置坐标用于定位所述页面 元素;Determining a reference position coordinate in the page element, where the reference position coordinate is used to locate the page element;
从所述模板点击数据中查找所述参考位置坐标映射到所述基准分辨率下对应的目标参考位置坐标。Finding the reference position coordinates mapped to the corresponding target reference position coordinates at the reference resolution from the template click data.
进一步的,所述第一偏移率包括第一横向偏移率和第一纵向偏移率,所述第二偏移率包括第二横向偏移率和第二纵向偏移率,所述元素块尺寸包括元素块的宽度和元素块的高度,在获取所述第一偏移率和所述第二偏移率之前,所述方法还包括:Further, the first offset rate includes a first horizontal offset rate and a first vertical offset rate, the second offset rate includes a second horizontal offset rate and a second vertical offset rate, and the element The block size includes the width of the element block and the height of the element block. Before acquiring the first offset rate and the second offset rate, the method further includes:
计算第一偏移率,和/或,第二偏移率;Calculate the first offset rate, and/or, the second offset rate;
其中,第一偏移率和第二偏移率的计算方法参照以上计算方法,此处不再赘述。The calculation method of the first offset rate and the second offset rate refers to the above calculation method, which will not be repeated here.
进一步的,根据所述模板点击位置坐标、所述第一偏移率、所述第二偏移率和所述元素块尺寸,计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标,包括:Further, according to the template click position coordinates, the first offset rate, the second offset rate, and the element block size, calculate the click position coordinates mapped to the corresponding target at the reference resolution Click location coordinates, including:
根据以下公式计算所述目标参考位置坐标:Calculate the target reference position coordinates according to the following formula:
element_x=accurate_click_x-template_mc_elm_offx_rate*element_widthelement_x=accurate_click_x-template_mc_elm_offx_rate*element_width
element_y=accurate_click_y-template_mc_elm_offy_rate*element_heightelement_y=accurate_click_y-template_mc_elm_offy_rate*element_height
其中,element_x为目标参考位置坐标的横坐标,accurate_click_x为模板点击位置坐标的横坐标,template_mc_elm_offx_rate为第一横向偏移率,element_width为元素块的宽度;Where element_x is the horizontal coordinate of the target reference position coordinate, accurate_click_x is the horizontal coordinate of the template click position coordinate, template_mc_elm_offx_rate is the first horizontal offset rate, and element_width is the width of the element block;
element_y为目标参考位置坐标的纵坐标,accurate_click_y为模板点击位置坐标的纵坐标,template_mc_elm_offy_rate为第一纵向偏移率,element_height为元素块的高度;element_y is the vertical coordinate of the target reference position coordinate, accurate_click_y is the vertical coordinate of the template click position coordinate, template_mc_elm_offy_rate is the first vertical offset rate, and element_height is the height of the element block;
根据所述目标参考位置坐标,通过以下公式计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标:According to the target reference position coordinates, the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution are calculated by the following formula:
mapping_x=element_x+mc_elm_offx_rate*element_widthmapping_x=element_x+mc_elm_offx_rate*element_width
mapping_y=element_y+mc_elm_offy_rate*element_heightmapping_y=element_y+mc_elm_offy_rate*element_height
其中,mapping_x为目标点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,mc_elm_offx_rate为第二横向偏移率,element_width为元素块的宽度;Among them, mapping_x is the horizontal coordinate of the target click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, mc_elm_offx_rate is the second horizontal offset rate, and element_width is the width of the element block;
mapping_y为目标点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,mc_elm_offy_rate为第二纵向偏移率,element_height为元素块的高度。mapping_y is the vertical coordinate of the target click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, mc_elm_offy_rate is the second vertical offset rate, and element_height is the height of the element block.
进一步的,所述基于所述多种原始分辨率,确定基准分辨率,包括:Further, the determining the reference resolution based on the multiple original resolutions includes:
将所述多种原始分辨率中的任意一种原始分辨率确定为所述基准分辨率;或,Determine any one of the plurality of original resolutions as the reference resolution; or,
所述点击数据还包括:点击数据量,所述基于所述多种原始分辨率,确定基准分辨率,包括:The click data further includes: the amount of click data, and determining the reference resolution based on the multiple original resolutions includes:
获取每种原始分辨率下的页面元素对应的点击数据量;Get the amount of click data corresponding to each page element at each original resolution;
将点击数据量最多的原始分辨率确定为所述基准分辨率。The original resolution with the largest amount of click data is determined as the reference resolution.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件 方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。This application is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the application. It should be understood that each flow and/or block in the flowchart and/or block diagram and a combination of the flow and/or block in the flowchart and/or block diagram may be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processing machine, or other programmable data processing device to produce a machine that enables the generation of instructions executed by the processor of the computer or other programmable data processing device A device for realizing the functions specified in one block or multiple blocks of one flow or multiple flows of a flowchart and/or one block or multiple blocks of a block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, the instructions The device implements the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operating steps are performed on the computer or other programmable device to produce computer-implemented processing, which is executed on the computer or other programmable device The instructions provide steps for implementing the functions specified in one block or multiple blocks of the flowchart one flow or multiple flows and/or block diagrams.
在一个典型的配置中,计算设备包括一个或多个处理器(CPU)、输入/输出接口、网络接口和内存。In a typical configuration, the computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
存储器可能包括计算机可读介质中的非永久性存储器,随机存取存储器(RAM)和/或非易失性内存等形式,如只读存储器(ROM)或闪存(flash RAM)。存储器是计算机可读介质的示例。The memory may include non-permanent memory, random access memory (RAM) and/or non-volatile memory in a computer-readable medium, such as read only memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。Computer readable media, including permanent and non-permanent, removable and non-removable media, can store information by any method or technology. The information may be computer readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, Magnetic tape cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media can be used to store information that can be accessed by computing devices. As defined in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
还需要说明的是,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、商品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、商品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括要素的过程、方法、商品或者设备中还存在另外的相同要素。It should also be noted that the terms "include", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device that includes a series of elements not only includes those elements, but also includes Other elements not explicitly listed, or include elements inherent to such processes, methods, goods, or equipment. In the absence of more restrictions, the elements defined by the sentence "include one..." do not exclude that there are other identical elements in the process, method, commodity or equipment that includes the elements.
本领域技术人员应明白,本申请的实施例可提供为方法、系统或计算机程序产品。 因此,本申请可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
以上仅为本申请的实施例而已,并不用于限制本申请。对于本领域技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在本申请的权利要求范围之内。The above are only examples of the present application, and are not intended to limit the present application. For those skilled in the art, this application may have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this application shall be included in the scope of the claims of this application.

Claims (10)

  1. 一种热力图的绘制方法,所述方法包括:A method for drawing a heat map, the method includes:
    获取目标页面的页面元素在多种原始分辨率下对应的点击数据,所述点击数据中至少包括:点击位置坐标;Acquiring click data corresponding to page elements of the target page at various original resolutions, the click data at least including: click position coordinates;
    基于所述多种原始分辨率,确定基准分辨率;Determine the reference resolution based on the multiple original resolutions;
    确定所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标;Determining that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution;
    根据所述目标点击位置坐标,在所述基准分辨率下绘制所述目标页面的热力图。According to the coordinates of the target click position, the thermal map of the target page is drawn at the reference resolution.
  2. 根据权利要求1所述的方法,其中,确定所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标,包括:The method according to claim 1, wherein determining that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution includes:
    根据预先设置的页面元素路径,查找所述页面元素映射到所述基准分辨率下对应的目标页面元素;According to the preset page element path, find the page element mapped to the corresponding target page element at the reference resolution;
    从预先存储的目标页面元素的模板点击数据中,查找所述点击位置坐标映射到所述基准分辨率下对应的模板点击位置坐标,所述模板点击数据为在所述基准分辨率下对所述目标页面元素进行点击得到的,所述模板点击数据中包括所述目标页面元素的至少一个模板点击位置坐标;From the pre-stored template click data of the target page element, find the coordinates of the click position mapped to the corresponding template click position coordinates at the reference resolution, the template click data for the reference resolution at the reference resolution Obtained by clicking on a target page element, the template click data includes at least one template click position coordinate of the target page element;
    获取所述页面元素的点击位置坐标在所述页面元素中的第一偏移率,以及所述模板点击位置坐标在所述目标页面元素中的第二偏移率;Acquiring a first offset rate of the click position coordinates of the page element in the page element, and a second offset rate of the template click position coordinates in the target page element;
    确定所述目标页面元素对应的元素块尺寸;Determine the element block size corresponding to the target page element;
    根据所述模板点击位置坐标、所述第一偏移率、所述第二偏移率和所述元素块尺寸,计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标。According to the template click position coordinates, the first offset rate, the second offset rate, and the element block size, calculate the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution .
  3. 根据权利要求2所述的方法,其中,在计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标之前,所述方法还包括:The method according to claim 2, wherein before calculating the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution, the method further comprises:
    在所述页面元素中确定一个参考位置坐标,所述参考位置坐标用于定位所述页面元素;Determining a reference position coordinate in the page element, the reference position coordinate is used to locate the page element;
    从所述模板点击数据中查找所述参考位置坐标映射到所述基准分辨率下对应的目标参考位置坐标。Finding the reference position coordinates mapped to the corresponding target reference position coordinates at the reference resolution from the template click data.
  4. 根据权利要求3所述的方法,其中,所述第一偏移率包括第一横向偏移率和第一纵向偏移率,所述第二偏移率包括第二横向偏移率和第二纵向偏移率,所述元素块尺寸包括元素块的宽度和元素块的高度,在获取所述第一偏移率和所述第二偏移率之前,所述方法还包括:The method of claim 3, wherein the first offset rate includes a first lateral offset rate and a first longitudinal offset rate, and the second offset rate includes a second lateral offset rate and a second Vertical offset rate, the size of the element block includes the width of the element block and the height of the element block, before obtaining the first offset rate and the second offset rate, the method further includes:
    根据以下公式计算所述第一偏移率:The first offset rate is calculated according to the following formula:
    mc_elm_offx_rate=(click_x-element_x)/element_width;mc_elm_offx_rate=(click_x-element_x)/element_width;
    mc_elm_offy_rate=(click_y-element_y)/element_height;mc_elm_offy_rate=(click_y-element_y)/element_height;
    其中,mc_elm_offx_rate为第一横向偏移率,click_x为点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,element_width为元素块的宽度;Among them, mc_elm_offx_rate is the first lateral offset rate, click_x is the horizontal coordinate of the click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, and element_width is the width of the element block;
    mc_elm_offy_rate为第一纵向偏移率,click_y为点击位置坐标的纵坐标,element_y 为目标参考位置坐标的纵坐标,element_height为元素块的高度;mc_elm_offy_rate is the first vertical offset rate, click_y is the vertical coordinate of the click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, and element_height is the height of the element block;
    和/或,and / or,
    根据以下公式计算所述第二偏移率:The second offset rate is calculated according to the following formula:
    template_mc_elm_offx_rate=(accurate_click_x-element_x)/element_widthtemplate_mc_elm_offx_rate=(accurate_click_x-element_x)/element_width
    template_mc_elm_offy_rate=(accurate_click_y-element_y)/element_height;template_mc_elm_offy_rate=(accurate_click_y-element_y)/element_height;
    其中,template_mc_elm_offx_rate为第二横向偏移率,accurate_click_x为模板点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,element_width为元素块的宽度;Among them, template_mc_elm_offx_rate is the second horizontal offset rate, accurate_click_x is the horizontal coordinate of the template click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, and element_width is the width of the element block;
    template_mc_elm_offy_rate为第二纵向偏移率,accurate_click_y为模板点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,element_height为元素块的高度。template_mc_elm_offy_rate is the second vertical offset rate, accurate_click_y is the vertical coordinate of the template click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, and element_height is the height of the element block.
  5. 根据权利要求3或4任一项所述的方法,其中,根据所述模板点击位置坐标、所述第一偏移率、所述第二偏移率和所述元素块尺寸,计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标,包括:The method according to any one of claims 3 or 4, wherein the click is calculated based on the template click position coordinates, the first offset rate, the second offset rate, and the element block size The mapping of the position coordinates to the corresponding target click position coordinates at the reference resolution includes:
    根据以下公式计算所述目标参考位置坐标:Calculate the target reference position coordinates according to the following formula:
    element_x=accurate_click_x-template_mc_elm_offx_rate*element_widthelement_x=accurate_click_x-template_mc_elm_offx_rate*element_width
    element_y=accurate_click_y-template_mc_elm_offy_rate*element_heightelement_y=accurate_click_y-template_mc_elm_offy_rate*element_height
    其中,element_x为目标参考位置坐标的横坐标,accurate_click_x为模板点击位置坐标的横坐标,template_mc_elm_offx_rate为第二横向偏移率,element_width为元素块的宽度;Where element_x is the horizontal coordinate of the target reference position coordinate, accurate_click_x is the horizontal coordinate of the template click position coordinate, template_mc_elm_offx_rate is the second horizontal offset rate, and element_width is the width of the element block;
    element_y为目标参考位置坐标的纵坐标,accurate_click_y为模板点击位置坐标的纵坐标,template_mc_elm_offy_rate为第二纵向偏移率,element_height为元素块的高度;element_y is the vertical coordinate of the target reference position coordinate, accurate_click_y is the vertical coordinate of the template click position coordinate, template_mc_elm_offy_rate is the second vertical offset rate, and element_height is the height of the element block;
    根据所述目标参考位置坐标,通过以下公式计算所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标:According to the target reference position coordinates, the click position coordinates mapped to the corresponding target click position coordinates at the reference resolution are calculated by the following formula:
    mapping_x=element_x+mc_elm_offx_rate*element_widthmapping_x=element_x+mc_elm_offx_rate*element_width
    mapping_y=element_y+mc_elm_offy_rate*element_heightmapping_y=element_y+mc_elm_offy_rate*element_height
    其中,mapping_x为目标点击位置坐标的横坐标,element_x为目标参考位置坐标的横坐标,mc_elm_offx_rate为第一横向偏移率,element_width为元素块的宽度;Among them, mapping_x is the horizontal coordinate of the target click position coordinate, element_x is the horizontal coordinate of the target reference position coordinate, mc_elm_offx_rate is the first horizontal offset rate, and element_width is the width of the element block;
    mapping_y为目标点击位置坐标的纵坐标,element_y为目标参考位置坐标的纵坐标,mc_elm_offy_rate为第一纵向偏移率,element_height为元素块的高度。mapping_y is the vertical coordinate of the target click position coordinate, element_y is the vertical coordinate of the target reference position coordinate, mc_elm_offy_rate is the first vertical offset rate, and element_height is the height of the element block.
  6. 根据权利要求1所述的方法,其中,所述基于所述多种原始分辨率,确定基准分辨率,包括:The method according to claim 1, wherein the determining the reference resolution based on the plurality of original resolutions includes:
    将所述多种原始分辨率中的任意一种原始分辨率确定为所述基准分辨率;或,Determine any one of the plurality of original resolutions as the reference resolution; or,
    所述点击数据还包括:点击数据量,所述基于所述多种原始分辨率,确定基准分辨率,包括:The click data further includes: the amount of click data, and determining the reference resolution based on the multiple original resolutions includes:
    获取每种原始分辨率下的页面元素对应的点击数据量;Get the amount of click data corresponding to each page element at each original resolution;
    将点击数据量最多的原始分辨率确定为所述基准分辨率。The original resolution with the largest amount of click data is determined as the reference resolution.
  7. 一种热力图的绘制装置,所述装置包括:A device for drawing a heat map, the device includes:
    获取单元,用于获取目标页面的页面元素在多种原始分辨率下对应的点击数据,所述点击数据中至少包括:点击位置坐标;An obtaining unit, configured to obtain click data corresponding to page elements of the target page at various original resolutions, the click data at least including: click position coordinates;
    确定单元,用于基于所述多种原始分辨率,确定基准分辨率;A determining unit, configured to determine a reference resolution based on the multiple original resolutions;
    所述确定单元,还用于确定所述点击位置坐标映射到所述基准分辨率下对应的目标点击位置坐标;The determining unit is further configured to determine that the click position coordinates are mapped to the corresponding target click position coordinates at the reference resolution;
    绘制单元,用于根据所述目标点击位置坐标,在所述基准分辨率下绘制所述目标页面的热力图。The drawing unit is configured to draw the thermal map of the target page at the reference resolution according to the coordinates of the target click position.
  8. 根据权利要求7所述的装置,其中,所述装置还包括:The device according to claim 7, wherein the device further comprises:
    查找单元,用于根据预先设置的页面元素路径,查找所述页面元素映射到所述基准分辨率下对应的目标页面元素;A searching unit, configured to search for the corresponding target page element mapped to the reference resolution under the reference resolution according to the preset page element path;
    所述查找单元,还用于从预先存储的目标页面元素的模板点击数据中,查找所述点击位置坐标映射到所述基准分辨率下对应的模板点击位置坐标,所述模板点击数据为在所述基准分辨率下对所述目标页面元素进行点击得到的,所述模板点击数据中包括所述目标页面元素的至少一个模板点击位置坐标;The searching unit is also used to search for the template click position coordinates mapped to the corresponding template click position coordinates at the reference resolution from the template click data of the target page element pre-stored, the template click data is Obtained by clicking on the target page element at the reference resolution, the template click data includes at least one template click position coordinate of the target page element;
    所述获取单元,还用于获取所述页面元素的点击位置坐标在所述目标页面元素中的第一偏移率,以及所述模板点击位置坐标在所述目标页面元素中的第二偏移率。The obtaining unit is further configured to obtain a first offset rate of the click position coordinates of the page element in the target page element, and a second offset of the template click position coordinates in the target page element rate.
  9. 一种存储介质,所述存储介质包括存储的程序,其中,在所述程序运行时控制所述存储介质所在设备执行权利要求1至权利要求6中任意一项所述的热力图的绘制方法。A storage medium including a stored program, wherein, when the program is running, the device where the storage medium is located is controlled to execute the method for drawing a heat map according to any one of claims 1 to 6.
  10. 一种处理器,所述处理器用于运行程序,其中,所述程序运行时执行权利要求1至权利要求6中任意一项所述的热力图的绘制方法。A processor for running a program, wherein the method for drawing a thermal map according to any one of claims 1 to 6 is executed when the program is executed.
PCT/CN2019/117496 2018-12-28 2019-11-12 Heat map drawing method and device WO2020134662A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811622998.3 2018-12-28
CN201811622998.3A CN111381910A (en) 2018-12-28 2018-12-28 Thermodynamic diagram drawing method and device

Publications (1)

Publication Number Publication Date
WO2020134662A1 true WO2020134662A1 (en) 2020-07-02

Family

ID=71128658

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/117496 WO2020134662A1 (en) 2018-12-28 2019-11-12 Heat map drawing method and device

Country Status (2)

Country Link
CN (1) CN111381910A (en)
WO (1) WO2020134662A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777080A (en) * 2010-03-19 2010-07-14 北京国双科技有限公司 User click data-based webpage analysis method
CN102043850A (en) * 2010-12-20 2011-05-04 百度在线网络技术(北京)有限公司 Method and equipment for generating thermodynamic diagram
CN103605716A (en) * 2013-11-14 2014-02-26 北京国双科技有限公司 Data processing method and device used for webpage click display
WO2014174369A2 (en) * 2013-03-29 2014-10-30 Mcgushion Kevin D Mapping of defined regions within a webpage
US20160353610A1 (en) * 2015-05-29 2016-12-01 Oracle International Corporation Heat pipe with near-azeotropic binary fluid

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101777080A (en) * 2010-03-19 2010-07-14 北京国双科技有限公司 User click data-based webpage analysis method
CN102043850A (en) * 2010-12-20 2011-05-04 百度在线网络技术(北京)有限公司 Method and equipment for generating thermodynamic diagram
WO2014174369A2 (en) * 2013-03-29 2014-10-30 Mcgushion Kevin D Mapping of defined regions within a webpage
CN103605716A (en) * 2013-11-14 2014-02-26 北京国双科技有限公司 Data processing method and device used for webpage click display
US20160353610A1 (en) * 2015-05-29 2016-12-01 Oracle International Corporation Heat pipe with near-azeotropic binary fluid

Also Published As

Publication number Publication date
CN111381910A (en) 2020-07-07

Similar Documents

Publication Publication Date Title
CN109766502B (en) Page improvement method, page improvement device, computer equipment and storage medium
WO2020192463A1 (en) Display method and apparatus
KR20160061351A (en) Automatically determining a size for a content item for a web page
WO2016177280A1 (en) Method and apparatus for recording and restoring click position in page
CN110110198B (en) Webpage information extraction method and device
CN109324796B (en) Interface layout method and device
WO2020118485A1 (en) Method of Detecting User Interface Layout Issues for Web Applications
WO2018010573A1 (en) Method and device for generating script
WO2012012917A1 (en) Selecting content within a web page
US20180096498A1 (en) Method and apparatus for spatial data visualization
CN105373593A (en) Method and apparatus for displaying target element from webpage
CN108268491A (en) Heating power drawing generating method and device
CN110020363A (en) Draw the method and device of thermodynamic chart
US10970892B2 (en) Electronic apparatus for drawing figure based on function data stored in advance or based on drawing data received from server depending on type of figure to be drawn, and information processing method, system, and medium for same
CN109857964B (en) Thermodynamic diagram drawing method and device for page operation, storage medium and processor
CN110968385A (en) Proportion display method and device
CN110020350A (en) Method for drafting, device, storage medium and the processor of webpage thermodynamic
WO2020134662A1 (en) Heat map drawing method and device
US8867837B2 (en) Detecting separator lines in a web page
CN115297042A (en) Method for detecting consistency of web pages under different networks and related equipment
CN109101144B (en) Thermodynamic diagram drawing method and device
CN111125590B (en) Method and device for drawing thermodynamic diagram
CN109948076B (en) Data visualization configuration method and device
CN114756790A (en) PC webpage content adaptation method facing mobile terminal
CN110020285B (en) Histogram processing method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19904476

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19904476

Country of ref document: EP

Kind code of ref document: A1