Summary of the invention
The problem of what the embodiment of the present application solved is how to improve the formation speed of thermodynamic chart.
To solve the above problems, the embodiment of the present application provides a kind of thermodynamic chart providing method, which comprises
Receive the request that user plays the thermodynamic chart of predeterminable event in preset time period in default geographic area;
Obtain the data that the predeterminable event in preset time period in default geographic area occurs;
According to the acquired data, corresponding thermodynamic chart is drawn using WebGL-heatmap drawing practice;
The thermodynamic chart of drafting is superimposed upon on map base map, and carries out output and shows.
Optionally, described to receive user and play in default geographic area asking for the thermodynamic chart of predeterminable event in preset time period
It asks, comprising: receiving user by clicking item plays in default geographic area asking for the thermodynamic chart of predeterminable event in preset time period
It asks.
It is optionally, described that the thermodynamic chart of drafting is superimposed upon on map base map, comprising:
The thermodynamic chart of drafting is superimposed upon on the thermodynamic chart of previous time period, and the thermodynamic chart gradual change of the previous time period
It disappears, the thermodynamic chart gradual change of the drafting is shown.
Optionally, before the thermodynamic chart of drafting is superimposed upon on map base map, further includes: carry out the thermodynamic chart of drafting
Smoothing processing.
The embodiment of the present application also provides a kind of thermodynamic charts to provide device, and described device includes:
Receiving unit, suitable for the thermodynamic chart of predeterminable event in preset time period in the default geographic area of reception user's broadcasting
Request;
Acquiring unit, suitable for obtaining the data that the predeterminable event in preset time period in default geographic area occurs;
Image-drawing unit, suitable for being drawn using WebGL-heatmap drawing practice corresponding according to the acquired data
Thermodynamic chart;
Thermodynamic chart provides unit, suitable for the thermodynamic chart of drafting to be superimposed upon on map base map, and carries out output and shows.
Optionally, the receiving unit is suitable for receiving preset time period in the default geographic area of user's broadcasting by clicking item
The request of the thermodynamic chart of interior predeterminable event.
Optionally, the thermodynamic chart provides the thermodynamic chart that unit is suitable for for the thermodynamic chart of drafting being superimposed upon previous time period
On, and the thermodynamic chart gradual change of the previous time period disappears, the thermodynamic chart gradual change of the drafting is shown.
Optionally, described device further include: smooth unit suitable for the thermodynamic chart of drafting to be smoothed, and executes
The thermodynamic chart of drafting is superimposed upon on the map base map.
Compared with prior art, the technical solution of the application has the advantage that
According to received user thermodynamic chart playing request, and WebGL-heatmap drawing practice is used, according to being obtained
The data of predeterminable event of the generation taken in the first time period of geographic area, draw corresponding thermodynamic chart, can rapidly give birth to
At thermodynamic chart and it is supplied to user, the diversified demand of user is can satisfy, promotes the usage experience of user.
Further, since the thermodynamic chart of drafting to be smoothed, so that the thermodynamic chart generated is more smooth, connects
It is continuous.
Further, since the thermodynamic chart for the first time period that transparency is successively decreased is superimposed upon the corresponding heat of second time period
It is shown on trying hard to, so that the display of the corresponding thermodynamic chart of each time adjacent segments is more continuous.
Specific embodiment
In a typical configuration of this application, terminal, the equipment of service network and trusted party include one or more
Processor (CPU), input/output interface, network interface and memory.
Memory may include the non-volatile memory in computer-readable medium, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be the subelement or other numbers of computer readable instructions, data structure, program
According to.The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory
(SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory
(ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory techniques, CD-ROM are read-only
Memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or
Other magnetic storage devices or any other non-transmission medium, can be used for storage can be accessed by a computing device information.According to
Herein defines, and computer-readable medium does not include non-temporary computer readable media (transitory media), such as modulates
Data-signal and carrier wave.
To solve the above-mentioned problems in the prior art, the technical solution that the embodiment of the present application uses passes through WebGL-
Heatmap drawing practice is drawn according to the data of predeterminable event of the acquired generation in geographic area in first time period
The speed of thermodynamic chart generation can be improved in corresponding thermodynamic chart.
It is understandable to enable the above objects, features, and advantages of the application to become apparent, with reference to the accompanying drawing to the application
Specific embodiment be described in detail.
Fig. 1 shows the flow chart of one of the embodiment of the present application thermodynamic chart providing method.Thermodynamic chart as shown in Figure 1
Providing method may include:
Step S101: the thermodynamic chart of the predeterminable event of preset time period asks in the default geographic area of reception user's broadcasting
It asks.
In specific implementation, the predeterminable event of preset time period may include being located at differently in the default geographic area
Manage click behavior of the buyer in region on Taobao shop.
Step S102: according to the data of acquired generation predeterminable event in preset time period in default geographic area,
Corresponding thermodynamic chart is drawn using WebGL-heatmap drawing practice.
In specific implementation, the thermodynamic chart that WebGL-heatmap drawing practice can be used to generate is 3D three-dimensional thermodynamic diagram.
WebGL-heatmap drawing practice (is mainly useful for figure to be rendered) computing capability by the GPU of WebGL, utilizes
Color device (shader) provides the interface of the graphical pointv on drawing, by the interface, can rapid drawing produce corresponding heating power
Figure.
Step S103: the thermodynamic chart of drafting is superimposed upon on map base map, and is carried out output and shown.
In specific implementation, the application programming interface that the map base map can be provided by Amap
(Application Programming Interface, API) is generated.
Fig. 2 shows the flow charts of one of the embodiment of the present application thermodynamic chart providing method.Thermodynamic chart as shown in Figure 2
Providing method may include:
Step S201: the thermodynamic chart of the predeterminable event of preset time period asks in the default geographic area of reception user's broadcasting
It asks.
In specific implementation, it can be clicked by user pre- in the default geographic area of behavior acquisition user's broadcasting of item
If the request of the thermodynamic chart of the predeterminable event of period.
In specific implementation, the item and the thermodynamic chart of preset time period clicked has preset corresponding relationship, Yong Huke
To click item to the corresponding period, so as to obtain the thermodynamic chart of corresponding period by dragging.
Step S202: the data that the predeterminable event in preset time period in default geographic area occurs are obtained, and are used
WebGL-heatmap drawing practice draws corresponding thermodynamic chart.
In specific implementation, predeterminable event in preset time period occurs in default geographic area in order to quickly obtain
The initial data that can be will acquire can be ranked up first according to some dimension, be segmented, initial data is converted by data
For the input data with preset data structure.
In specific implementation, initial data that can be acquired is segmented according to the time, forms multiple periods, each
The data of period may include the number in the geographic area of a certain determination in different geographic coordinate ranges.For example, can incite somebody to action
The initial data of the flow of the people of some acquired commercial circle is segmented according to the time, the stream of people of the commercial circle in each period
The data of amount can continue to be divided into again coordinate 1, coordinate 2 ..., the data of the flow of the people of coordinate n.Therefore, according to actual need
It asks, initial data can be divided according to different granularities, so that the thermodynamic chart generated according to the data
It is more galore presented to user, meets the diversified demand of user, while the calculation amount of data processing can also be reduced, is improved
The speed that thermodynamic chart generates.
In specific implementation, it can be generated using webpage development language-thermodynamic chart (WebGL-heatmap) drawing practice
Thermodynamic chart is 3D three-dimensional thermodynamic diagram.WebGL-heatmap drawing practice (is mainly useful for figure to carry out by the GPU of WebGL
Rendering) computing capability, using tinter (shader) offer, the interface of graphical pointv can be fast by the interface on drawing
Speed draws out corresponding thermodynamic chart.
Step S203: the thermodynamic chart of drafting is smoothed.
In specific implementation, in order to enable the thermodynamic chart generated is more continuous, the thermodynamic chart of drafting can be carried out smooth
Processing.For example, the thermodynamic chart of drafting can be carried out Gaussian Blur etc..
Step S204: the thermodynamic chart of drafting is superimposed upon on the thermodynamic chart of previous time period, and the previous time period
Thermodynamic chart gradual change disappears, and the thermodynamic chart gradual change of the drafting is shown.
In specific implementation, the thermodynamic chart drawn can be superimposed upon on the thermodynamic chart of adjacent previous time period and is carried out
Output display.Due in such a way that the thermodynamic chart of two adjacent periods is overlapped display, being also that will be drawn
The thermodynamic chart of current slot is superimposed upon the thermodynamic chart of previous time period, meanwhile, by the thermodynamic chart of previous time period using transparent
The incremental mode fading of degree, and the thermodynamic chart of current slot is then shown in such a way that transparency is successively decreased on the contrary, because
This, can make the thermodynamic chart of time adjacent segments closely be connected when display, spatially more smooth.
Step S205: the thermodynamic chart of drafting is superimposed upon on map base map, and is carried out output and shown.
In specific implementation, the thermodynamic chart of drafting can be superimposed upon on map base map by web browser, and carried out defeated
It shows out.
Fig. 3 shows the flow chart of another thermodynamic chart providing method in the embodiment of the present application.Heating power as shown in Figure 3
Figure providing method may include:
Step S301: it obtains user in a commercial circle and clicks the initial data of Taobao shop behavior, and divided according to the period
As corresponding input data.
In an embodiment of the present invention, user in a commercial circle is clicked into the initial data of Taobao shop behavior according to the period
It is divided into corresponding input data, for example, can be according to period 1, period 2, period 3 ... period n, it will be a certain
User clicks the initial data of Taobao shop behavior in commercial circle, transforms into input data corresponding with the period.
Step S302: the input data of corresponding period is obtained sequentially in time, and is drawn using corresponding thermodynamic chart
Method draws the thermodynamic chart of each period.
In an embodiment of the present invention, corresponding broadcast button can be generated, by clicking the broadcast button, and can be with
When obtaining the input data of corresponding period sequentially in time, and drawing each described using corresponding heating power drawing drawing method
Between section thermodynamic chart, and recycle.By again tapping on the broadcast button, above-mentioned circulation sequentially in time can be stopped and drawn
Make the operation of the thermodynamic chart of each period.
In an embodiment of the present invention, the thermodynamic chart for using WebGL-heatmap drawing practice to generate is 3D solid heating power
Figure.WebGL-heatmap drawing practice (is mainly useful for figure to be rendered) computing capability by the GPU of WebGL, utilizes
Shader provides the interface of graphical pointv on drawing can produce corresponding thermodynamic chart by the interface with rapid drawing.WebGL
It is a kind of three-dimensional drawing standard of web terminal, this drawing technique standard allows network script language JavaScript and figure
Routine interface OpenGL ES 2.0 (OpenGL for Embedded Systems 2.0) is combined together, by increasing by three
The JavaScript binding of dimension drawing specification (OpenGL ES 2.0), WebGL can be the 5th revised hypertext
Markup language painting canvas interface HTML5Canvas provides hardware 3D and accelerates rendering, than about 100 times by force of traditional Canvas performance, passes through
The webgl-heatmap of webGL exploitation draws thermodynamic chart by the webGL built-in method such as shader, calculates than common thermodynamic chart
Speed is many fastly.
Step S303: the thermodynamic chart for the current slot drawn is superimposed upon on map base map generated, and is located at
On the thermodynamic chart of adjacent previous time period, and the transparency of the thermodynamic chart of the period is gradually within a preset time period
It reduces, the thermodynamic chart of the adjacent previous time period gradually increases.
In specific implementation, in order to enable the thermodynamic chart for each period drawn sequentially in time display when
Time is more continuous, and the transparency change of the thermodynamic chart of current slot and the thermodynamic chart of adjacent previous time period can be set
Mode so that the thermodynamic chart of current slot transparency within a preset period of time be incremented by by way of be superimposed upon map base map and
On the thermodynamic chart of adjacent previous time period, and the transparency of the thermodynamic chart of corresponding previous time period is within a preset period of time
Transparency successively decrease, namely the thermodynamic chart gradual change of current slot is shown in the preset time period, the adjacent previous time
The thermodynamic chart gradual change of section disappears.So that connecting between the thermodynamic chart of time adjacent segments is even closer.
Step S304: the thermodynamic chart for each period drawn is subjected to Gaussian Blur.
In specific implementation, Gaussian Blur (Gaussian Blur), is also Gaussian smoothing, is adjusted by Gaussian curve
Pixel color value, selectively obscures image, can effectively reduce picture noise and reduce level of detail.
In specific implementation, click item corresponding to the thermodynamic chart of corresponding period generated, Yong Hutong can be generated
It crosses and clicks the click item or the click item is dragged to corresponding position, and can obtain the corresponding period to correspond to heating power
Figure, so as to according to the demand of user, thermodynamic chart needed for user is supplied to user, can satisfy the diversified need of user
It asks.
Fig. 4 is that one of the embodiment of the present application thermodynamic chart provides the structural schematic diagram of device.Thermodynamic chart as shown in Figure 4
Device is provided, may include that receiving unit 401, acquiring unit 402, image-drawing unit 403 and thermodynamic chart provide unit 404, in which:
Receiving unit 401 plays the thermodynamic chart of predeterminable event in the geographic area of preset time period suitable for receiving user
Request.
In specific implementation, the receiving unit 401 is suitable for receiving the ground that user plays preset time period by clicking item
Manage the request of the thermodynamic chart of predeterminable event in region.
Acquiring unit 402, suitable for obtaining the data that the predeterminable event in preset time period in default geographic area occurs.
Image-drawing unit 403, suitable for drawing phase using WebGL-heatmap drawing practice according to the acquired data
The thermodynamic chart answered.Thermodynamic chart provides unit 404, and the thermodynamic chart suitable for the thermodynamic chart of drafting to be superimposed upon on the one period is enterprising
Row display.
In specific implementation, the thermodynamic chart provides unit 404 and is suitable for the thermodynamic chart of drafting being superimposed upon previous time period
Thermodynamic chart on, and the thermodynamic chart gradual change of the previous time period disappears, and the thermodynamic chart gradual change of the drafting shows.
In specific implementation, the thermodynamic chart provides unit 404 and is suitable for being superimposed upon by the thermodynamic chart that web browser is drawn
On map base map, and it is transmitted to the user.
In specific implementation, thermodynamic chart as shown in Figure 4 provides device, can also include smooth unit 405, in which:
Smooth unit 405 suitable for the thermodynamic chart of drafting to be smoothed, and executes and is superimposed upon the thermodynamic chart of drafting
On the map base map.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can
It is completed with instructing relevant hardware by program, which can store in computer readable storage medium, and storage is situated between
Matter may include: ROM, RAM, disk or CD etc..
The method and system of the embodiment of the present application are had been described in detail above, the application is not limited to this.Any
Field technical staff is not departing from spirit and scope, can make various changes or modifications, therefore the guarantor of the application
Shield range should be defined by the scope defined by the claims..