CN110807135A - Data processing method, thermodynamic diagram generation method and device - Google Patents

Data processing method, thermodynamic diagram generation method and device Download PDF

Info

Publication number
CN110807135A
CN110807135A CN201910973044.5A CN201910973044A CN110807135A CN 110807135 A CN110807135 A CN 110807135A CN 201910973044 A CN201910973044 A CN 201910973044A CN 110807135 A CN110807135 A CN 110807135A
Authority
CN
China
Prior art keywords
discrete point
point data
precision
data
zoom level
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201910973044.5A
Other languages
Chinese (zh)
Other versions
CN110807135B (en
Inventor
孙壮
蔡江松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chezhi Interconnection (beijing) Technology Co Ltd
Original Assignee
Chezhi Interconnection (beijing) Technology Co Ltd
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 Chezhi Interconnection (beijing) Technology Co Ltd filed Critical Chezhi Interconnection (beijing) Technology Co Ltd
Priority to CN201910973044.5A priority Critical patent/CN110807135B/en
Publication of CN110807135A publication Critical patent/CN110807135A/en
Application granted granted Critical
Publication of CN110807135B publication Critical patent/CN110807135B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/904Browsing; Visualisation therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/001Texturing; Colouring; Generation of texture or colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/206Drawing of charts or graphs

Abstract

The invention discloses a data processing method, which is executed in a server, the server is connected with a data storage device, a plurality of discrete point data with different precisions are stored in the data storage device, each discrete point data comprises position information and weight information, wherein the discrete point data with low precision is obtained by aggregating the discrete point data with high precision, and the method comprises the following steps: receiving a thermodynamic diagram data request sent by terminal equipment, wherein the data request comprises a region range displayed by a current map and target precision of position information, and the target precision is determined according to a zoom level of the current map; and screening out the discrete point data with the position information being the target precision and located in the region range from the stored plurality of discrete point data, and returning the screened discrete point data to the terminal equipment so that the terminal equipment can generate thermodynamic diagrams according to the received discrete point data. The invention also discloses a corresponding thermodynamic diagram generation method and computing equipment.

Description

Data processing method, thermodynamic diagram generation method and device
Technical Field
The invention relates to the technical field of data visualization, in particular to a data processing method, a thermodynamic diagram generation method and a thermodynamic diagram generation device.
Background
A Heat Map (Heat Map) is a data presentation showing hot spot areas (e.g., user's hot page areas, user's geographical areas, etc.) in a highlighted form, which creates a circular area for each discrete point, and the circular areas of the discrete points are weighted and superimposed and mapped onto an image.
Because the thermodynamic diagram displays the planar circular area data of the discrete points, the performance requirement on the user terminal is high, the display of more than millions of discrete point data is difficult to realize in the prior art, the problems of long data request time, large consumption of a memory and a CPU, page blockage and the like are caused, and the display requirement of mass data cannot be met.
In addition, the space span supported by the existing thermodynamic diagram display scheme is limited, and the thermodynamic diagram is not good in display effect when the map is enlarged or reduced. When displaying a large regional (e.g., national) thermodynamic diagram, with a high number of discrete points (sometimes on the order of millions), the circular areas of each discrete point tend to aggregate into a very large area of highlight, as shown in fig. 1A; when a thermodynamic diagram of a small territory (e.g., a street) is presented, the number of discrete points is small, and the circular areas of the discrete points are displayed scattered without intersection, as shown in fig. 1B. Neither too aggregated nor too dispersed discrete dots will show a tendency to change in heat.
Therefore, it is desirable to provide an optimized thermodynamic diagram generation method.
Disclosure of Invention
To this end, the present invention provides a data processing method, a thermodynamic diagram generation method and a device in an attempt to solve or at least alleviate the above existing problems.
According to a first aspect of the present invention, there is provided a data processing method executed in a server connected to a data storage device, the data storage device storing therein a plurality of pieces of discrete point data of different accuracies, each of the discrete point data including location information and weight information, wherein discrete point data of low accuracy is obtained by aggregating discrete point data of high accuracy, the method comprising the steps of: receiving a thermodynamic diagram data request sent by a terminal device, wherein the data request comprises a region range displayed by a current map and target accuracy of position information, and the target accuracy is determined according to a zoom level of the current map; and screening out the discrete point data with the position information of the target precision and located in the region range from the stored plurality of discrete point data, and returning the screened discrete point data to the terminal equipment so that the terminal equipment can generate thermodynamic diagrams according to the received discrete point data.
Alternatively, in the data processing method according to the present invention, the target accuracy is determined in accordance with the following steps: and determining the zoom level range to which the zoom level belongs, and determining the target precision corresponding to the zoom level according to the corresponding relation between the zoom level range and the precision.
Alternatively, in the data processing method according to the present invention, the target accuracy is determined in accordance with the following steps: when the zoom level is less than a first threshold, the target precision is a first precision; when the zoom level is greater than or equal to a first threshold and less than a second threshold, the target precision is a second precision; when the zoom level is greater than or equal to a second threshold, the target precision is a third precision; wherein the first precision is less than the second precision and less than the third precision.
Optionally, in the data processing method according to the present invention, the discrete point data further includes attribute information, and the data request further includes a data query condition, and the method further includes: and screening discrete point data with attribute information meeting the data query condition and position information being the target precision and located in the region range from the stored plurality of discrete point data, and returning the screened discrete point data to the terminal equipment.
Optionally, in the data processing method according to the present invention, the data request further includes a concurrency level, and the step of returning the screened discrete point data to the terminal device includes: dividing the screened discrete point data into a plurality of groups, wherein the number of the groups is the same as the concurrency; and returning a plurality of groups of discrete point data to the terminal equipment in parallel.
Optionally, in the data processing method according to the present invention, before the step of returning the screened discrete point data to the terminal device, the method further includes the steps of: judging whether the quantity of the screened discrete point data is smaller than a third threshold value or not; if yes, re-screening the discrete point data with the highest position information and located in the region range from the stored plurality of discrete point data so as to return the re-screened discrete point data to the terminal equipment in the subsequent steps.
Optionally, in the data processing method according to the present invention, before the step of returning the screened discrete point data to the terminal device, the method further includes the steps of: judging whether the number of the screened discrete point data is larger than a fourth threshold value or not; if yes, further sampling from the screened discrete point data to obtain a fourth threshold discrete point data, so that the sampled discrete point data is returned to the terminal equipment in the subsequent steps.
According to a second aspect of the present invention, there is provided a thermodynamic diagram generation method, executed in a terminal device, the method including the steps of: sending a thermodynamic diagram data request to a server, wherein the data request comprises a regional range displayed by a current map and a target precision of position information, and the target precision is determined according to a zoom level of the current map; receiving a plurality of discrete point data returned by the server, wherein the plurality of discrete point data are discrete point data of which the position information is the target precision and is positioned in the region range; and generating a thermodynamic diagram from the plurality of discrete point data.
Alternatively, in the thermodynamic diagram generation method according to the present invention, the target accuracy is determined in accordance with the following steps: and determining the zoom level range to which the zoom level belongs, and determining the target precision corresponding to the zoom level according to the corresponding relation between the zoom level range and the precision.
Alternatively, in the thermodynamic diagram generation method according to the present invention, the target accuracy is determined in accordance with the following steps: when the zoom level is less than a first threshold, the target precision is a first precision; when the zoom level is greater than or equal to a first threshold and less than a second threshold, the target precision is a second precision; when the zoom level is greater than or equal to a second threshold, the target precision is a third precision; wherein the first precision is less than the second precision and less than the third precision.
Optionally, in the thermodynamic diagram generation method according to the present invention, the data request further includes a data query condition, and accordingly, the plurality of discrete point data are discrete point data whose attribute information satisfies the data query condition, whose location information is the target accuracy and is located within the region range.
Optionally, in the thermodynamic diagram generating method according to the present invention, the data request further includes a concurrency degree, and the step of receiving the plurality of discrete point data returned by the server includes: and receiving a plurality of groups of discrete point data returned by the server in parallel, wherein the number of the groups is the same as the concurrency.
Optionally, in the thermodynamic diagram generation method according to the present invention, the method further includes the steps of: receiving map operation of a user, and generating a thermodynamic diagram data request according to the map operation.
Optionally, in the thermodynamic diagram generation method according to the present invention, the step of generating a thermodynamic diagram data request according to the map operation includes: when the user performs zoom-out and/or pan-in operations on the map, a thermodynamic diagram data request is generated according to the operated region range and zoom level.
Optionally, in the thermodynamic diagram generation method according to the present invention, the step of generating a thermodynamic diagram data request according to the map operation includes: when a user performs an enlarging operation on a map, judging whether the target precision corresponding to the zoom level after the operation is the same as the precision of the position information of the discrete point data used for generating the thermodynamic diagram before the operation; if so, further judging whether the operated region range is within the region range before operation; if yes, generating no thermodynamic diagram data request; and if not, generating a thermodynamic diagram data request according to the operated region range and the zoom level.
Alternatively, in the thermodynamic diagram generation method according to the present invention, the step of generating a thermodynamic diagram from the plurality of discrete point data includes: respectively creating a circular area for each discrete point data, and setting a weight value for each pixel in the circular area, wherein the weight value of the central pixel of the circular area is the weight information of the discrete point data, the weight values of other pixels in the circular area are decreased with the increase of the distance from the central pixel, and the weight value of the edge pixel of the circular area is 0; overlapping the weight values of the pixels in the circular area of all the discrete point data to determine the gray value of each pixel in the map display area; determining the color of each pixel according to the corresponding relation between the gray value and the color; a thermodynamic diagram is generated according to the color of each pixel.
According to a third aspect of the present invention, there is provided a server comprising at least one processor and a memory storing program instructions; the program instructions, when read and executed by the processor, cause the server to perform the data processing method as described above.
According to a fourth aspect of the present invention, there is provided a terminal device comprising a display, a memory and at least one processor, wherein the display is connected to the processor and adapted to display a thermodynamic diagram; the memory is adapted to store a program for generating a thermodynamic diagram; the processor is adapted to read a program stored in the memory to perform the thermodynamic diagram generation method as described above.
According to a fifth aspect of the present invention, there is provided a readable storage medium storing program instructions which, when read and executed by a computing device, cause the computing device to execute the data processing method or the thermodynamic diagram generation method as described above.
According to the technical scheme of the invention, discrete point data with different precisions are stored in the data storage device, and each discrete point data comprises position information and weight information. The low-precision discrete point data is obtained by aggregating the high-precision discrete point data, so that the number of the low-precision discrete point data is smaller than that of the high-precision discrete point data.
The terminal device executes the thermodynamic diagram generation method of the present invention. When the terminal equipment needs to generate thermodynamic diagrams based on user operation, the terminal equipment determines the target accuracy of the position information according to the zoom level of the current map, and sends a thermodynamic diagram data request to the server, wherein the data request comprises the target accuracy and the region range displayed by the current map. The server receives a data request sent by the terminal equipment, executes the data processing method of the invention, screens out the discrete point data with the position information being the target precision and located in the region range from the discrete point data stored in the data storage device, and returns the screened discrete point data to the terminal equipment. The terminal device generates a thermodynamic diagram from the received discrete point data.
Based on the technical scheme of the invention, the terminal equipment can request the server for the discrete point data with different accuracies according to different map zoom levels, so that the quantity of the discrete point data acquired from the server is kept in a proper range under different zoom levels, and the magnitude of the acquired discrete point data is reduced, thereby reducing the pressure of the terminal equipment for requesting, acquiring and processing the discrete point data, being beneficial to the rapid generation of thermodynamic diagrams and improving the data display effect.
In addition, the number of the discrete point data acquired from the server is maintained within a moderate range, so that the highlight areas in the generated thermodynamic diagram are not excessively gathered or dispersed, the trend of the change of the heat degree can be clearly shown, and the display effect of the thermodynamic diagram is improved.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
To the accomplishment of the foregoing and related ends, certain illustrative aspects are described herein in connection with the following description and the annexed drawings, which are indicative of various ways in which the principles disclosed herein may be practiced, and all aspects and equivalents thereof are intended to be within the scope of the claimed subject matter. The above and other objects, features and advantages of the present disclosure will become more apparent from the following detailed description read in conjunction with the accompanying drawings. Throughout this disclosure, like reference numerals generally refer to like parts or elements.
Fig. 1 and 2 are schematic diagrams illustrating thermodynamic diagrams of a large area range and a small area range respectively in the prior art;
FIG. 3 shows a schematic diagram of a thermodynamic diagram generation system 300 according to one embodiment of the invention;
FIG. 4 illustrates a flow diagram of a thermodynamic diagram generation method 400 according to one embodiment of the invention;
FIG. 5 shows a schematic diagram of a thermodynamic diagram generation process 500 according to one embodiment of the invention;
6A-6C illustrate schematic diagrams of thermodynamic diagrams generated by a thermodynamic diagram generation process 500 in accordance with the present invention;
FIG. 7 illustrates a flow diagram of a thermodynamic diagram generation method 700 according to one embodiment of the invention;
FIG. 8 shows a flow diagram of a data processing method 800 according to one embodiment of the invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
FIG. 3 shows a schematic diagram of a thermodynamic diagram generation system 300 according to one embodiment of the invention. As shown in fig. 3, the thermodynamic diagram generation system 300 includes a plurality of terminal devices 310, a server 320, and a data storage 330. It should be noted that the thermodynamic diagram generation system 300 shown in fig. 3 is merely exemplary, and although only one server and one data storage device are shown, in a specific practical situation, different numbers of terminal devices, servers and data storage devices may be included in the thermodynamic diagram generation system, and the present invention does not limit the number of terminal devices, servers and data storage devices included in the thermodynamic diagram generation system.
The terminal device 310 is a device capable of interacting with a user, and may be, for example, a personal computer such as a desktop computer and a notebook computer, a mobile terminal such as a mobile phone, a tablet computer, a multimedia player and a smart wearable device, and an Internet of Things (IoT) device such as a smart television, a smart door, and an industrial personal control device, but is not limited thereto.
The terminal 310 is usually installed with a plurality of applications, such as an information application, a shopping application, an instant messaging application, etc., but not limited thereto. The server 320 is a server of an application installed in the terminal device 310, and is configured to provide a method and a data call to the application. For example, the terminal device 310 has an application a installed therein, and the server 320 is a server side of the application a.
The server 320 is connected to a data storage 330, which can provide services to the terminal device 310 based on data stored in the data storage 330. The data storage 330 may be a relational database such as MySQL, ACCESS, or a non-relational database such as NoSQL; the data storage device 330 may be a local database residing in the server 320, or may be a distributed database, such as HBase, etc., disposed at a plurality of geographic locations, in short, the data storage device 330 is used for storing data, and the present invention is not limited to the specific deployment and configuration of the data storage device 330.
In the embodiment of the present invention, when a user accesses an application on the terminal device 310, the server 320 or other third-party data service provider corresponding to the application may collect behavior data of the user on the premise of user authorization, and store the collected behavior data in the data storage device 330. Accordingly, the data storage device 330 stores a plurality of user behavior records, each of which may include, but is not limited to, user identification, behavior content, behavior time, latitude and longitude coordinates (when the terminal device 310 has the GPS positioning function turned on and the user authorizes to obtain the location data), and other information.
For example, the user accesses the car information application on the terminal 310, and browses the information of the quotation, configuration, evaluation, etc. of some car series and car models in the application. The server 320 or other third-party data service provider corresponding to the application may collect the behavior data of the user on the premise of user authorization, and store the collected user behavior data as a piece of user behavior record to the data storage device 330. Each user behavior record includes, for example, but not limited to, a user identification, a vehicle system/model identification for which the behavior is directed, a behavior time, a behavior type, longitude and latitude coordinates (when the terminal device 310 has a GPS positioning function turned on and the user authorizes to acquire position data), and the like.
According to one embodiment, in order to facilitate the retrieval of the position information, the longitude and latitude coordinates are converted into position codes to be stored. For example, the latitude and longitude coordinates may be converted to a GeoHash code.
For one latitude and longitude coordinate, e.g. (116.389550, 39.928167), the process of GeoHash encoding is as follows:
1) converting longitudes into binary strings
For example, longitude 116.389550 is converted to a binary string as follows:
the longitude interval of the earth is [ -180,180], and defines west as 0 and east as 1 (note that, here, the orientations corresponding to 0 and 1 can be defined by those skilled in the art, and east as 0 and west as 1);
dividing the interval of-180, 180 into-180, 0,180, 116.389550E 0,180, 1;
dividing the interval [0,180] into [0,90] and [90,180], 116.389550 belongs to [90,180], and is marked as 1;
dividing the interval [90,180] into [90,135 ], [135,180], 116.389550 belongs to [90,135 ], and recording 0;
by analogy, a binary sequence consisting of the numbers 0 and 1 can be generated, and the length of the sequence can be set by itself. For example, if the sequence length is set to 10, the binary string corresponding to the longitude 116.389550 is 1101001011.
2) Converting latitude into binary string
For example, the latitude 39.928167 is encoded as follows:
the dimension interval of the earth is [ -90,90], and the north edge is defined as 0 and the south edge is defined as 1 (note that, the orientation corresponding to 0 and 1 can be defined by those skilled in the art, and the south edge can also be defined as 0 and the north edge can also be defined as 1);
the interval [ -90,90] is divided into [ -90,0) and [0,90], 39.928167 ∈ [0,90], and is marked as 0;
dividing the interval [0,90] into [0,45 ] and [45,90], 39.928167 belongs to [0,45 ], and is marked as 1;
the interval [0,45) is divided into [0,22.5) and [22.5,45) in two, 39.928167 belongs to [22.5,45), and is marked as 0;
by analogy, a binary sequence consisting of the numbers 0 and 1 can be generated, and the length of the sequence can be set by itself. For example, if the sequence length is set to 10, the latitude 39.928167 corresponds to a binary string 0100011100.
3) Merging binary strings of longitude and latitude
Longitude in odd numbers and latitude in even numbers. For example, the longitude code 1101001011 and the latitude code 0100011100 are combined, resulting in 10110010000111011010.
4) Generating a position code
The merged binary string 10110010000111011010 is converted into a character string. For example, every five bits in the binary string are grouped (less than five bits are complemented by 0 at the end), and each group is encoded by Base32 encoding. Base32 of binary string 10110010000111011010 was encoded as q8fu based on the Base32 encoding rules shown in table 1 below.
TABLE 1
Decimal system 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Base32 0 1 2 3 4 5 6 7 8 9 b c d e f g
Decimal system 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Base32 h j k m n p q r s t u v w x y z
Referring to the above GeoHash encoding process, it can be understood by those skilled in the art that the accuracy with which the GeoHash code can be positioned is related to the length of the GeoHash code, and the longer the length of the GeoHash code is, the higher the positioning accuracy (i.e., the smaller the positioning error) is. When the GeoHash code is coded by adopting Base32 code, the relationship between the length of the GeoHash code and the positioning precision is shown in the following table 2:
TABLE 2
Although table 2 only shows the positioning accuracy of the GeoHash code with the code length of 1-8 bits, those skilled in the art can understand that the accuracy can be higher when the length of the GeoHash code is longer. According to one embodiment, the latitude and longitude coordinates may be converted to a 12-bit GeoHash code with higher precision.
Each user behavior record stored in the data storage device 330 that contains location information (i.e., a GeoHash code) may be converted into a location point record. Each location point record includes location information (i.e., GeoHash code) and attribute information, where the attribute information includes a vehicle system/model identification, a behavior time period, a preference type, and the like, to which a user behavior is directed. The length of the action time period may be set by a person skilled in the art, and may be, for example, a week, a month, a quarter, or the like. The preference type is used for identifying the preference degree of the user for the vehicle type, for example, the preference type can be set to three types of an interest layer, an attention layer and an intention layer, and the preference degree of each type is increased in sequence. The preference type to which the location point record specifically corresponds may be determined by the behavior type (e.g., browsing, favorites, praise, comment, price inquiry, etc.) of the user in the corresponding behavior time period.
After converting the user behavior records to location point records, the location point records may be aggregated to generate discrete point data for mapping thermodynamic diagrams. Specifically, position point records with the same attribute information are collected into a piece of discrete point data, each piece of discrete point data comprises the position information, the attribute information and the weight information, and the more position point records a piece of discrete point data are collected, the greater the weight of the discrete point data is.
The accuracy of the position information of the discrete point data is determined by its length, and the greater the length of the position information, the higher the accuracy. Therefore, in the embodiment of the present invention, the accuracy of the position information refers to the length of the position information, and the accuracy of the discrete point data refers to the accuracy of the position information in the discrete point data. The position information of the original discrete point data is directly converted from longitude and latitude coordinates in the user behavior record, and the precision of the position information is the highest, and for example, the position information can be 12-bit GeoHash coding.
In an embodiment of the present invention, a user may access an application on the terminal device 310 and request to view a thermodynamic diagram distributed by the user in the application, and then the terminal device 310 sends a thermodynamic diagram data request to the server 320, and the server 320 returns discrete point data for drawing the thermodynamic diagram to the terminal device 310 based on the data request. The terminal device 310 generates a thermodynamic diagram based on the discrete point data returned by the server 320, which may show the hot geographic area in which the user is located.
In order to improve the efficiency of generating the thermodynamic diagram and the exhibition effect of the thermodynamic diagram by the terminal device 310, the server 320 aggregates the original discrete point data with higher positional information accuracy stored in the data storage device 330 to generate a smaller amount of discrete point data with lower positional information accuracy. According to one embodiment, aggregation of discrete point data may be achieved by reducing the length of location information, that is, original discrete point data in which values of the first few bits of location information are the same and attribute information is the same are aggregated together, and discrete point data in which the length of location information is smaller is generated, and the weight of the generated discrete point data is the sum of the weights of the original discrete point data participating in aggregation. The length of the position information of the aggregation-generated discrete point data is smaller than the total length of the position information of the original discrete point data, and therefore, the accuracy of the aggregation-generated discrete point data is smaller than that of the original discrete point. By setting the length of the aggregated position information, high-precision original discrete point data can be aggregated into different low-precision discrete point data, and the smaller the length of the aggregated position information is, the lower the precision of the aggregated discrete point data is.
For example, an example of the original discrete point data is shown in table 3, and the accuracy of the position information thereof is 12 bits.
TABLE 3
Figure BDA0002232736000000091
The original discrete point data in table 3 are aggregated into discrete point data with an accuracy of 6 bits, and the aggregation result is shown in table 4:
TABLE 4
The discrete point data in table 4 is further aggregated into discrete point data with an accuracy of 5 bits, and the aggregation result is shown in table 5:
TABLE 5
Figure BDA0002232736000000093
From the above description, the technical solution of the present invention can aggregate high-precision original discrete point data to generate low-precision discrete point data. Since the low-precision discrete point data is obtained by aggregating the high-precision discrete point data, the number of the low-precision discrete point data is smaller than that of the high-precision discrete point data. In this way, the data storage device 330 stores therein discrete point data of different accuracies, each of which includes position information, attribute information, and weight information.
It should be noted that the present invention does not limit the number and value of the precision levels of the discrete point data stored in the data storage device 330.
For example, referring to tables 3 to 5, the data storage device 330 stores three kinds of discrete point data with different accuracies, and the accuracy of the original discrete point data is the highest and is 12 bits; aggregating the original discrete point data to generate low-precision discrete point data with the precision of 6 bits; the discrete data with the precision of 6 bits are aggregated (the original discrete point data with the precision of 12 bits can also be aggregated), and the discrete point data with the lower precision with the precision of 5 bits is generated.
For another example, the data storage device 330 stores four kinds of discrete point data with different accuracies, and the accuracy of the original discrete point data is the highest and is 12 bits; aggregating the original discrete point data to generate low-precision discrete point data with the precision of 9 bits; aggregating the discrete point data with the precision of 9 bits (or aggregating the original discrete point data with the precision of 12 bits), and generating the discrete point data with the precision of 7 bits and lower precision; aggregation is performed on the discrete point data with the precision of 7 bits (original discrete point data with the precision of 12 bits may be aggregated, or discrete point data with the precision of 9 bits may be aggregated), and low-precision discrete point data with the precision of 5 bits is generated.
The thermodynamic diagram generation method 400 can be executed in the thermodynamic diagram generation system 300 based on discrete point data of different precisions stored in the data storage 330, so as to generate thermodynamic diagrams at the terminal device 310 quickly and enable the generated thermodynamic diagrams to have good display effect.
In an embodiment of the present invention, a user may access an application (which may be, for example, a car information application) on the terminal device 310 and enter a user distribution interface to view a user distributed thermodynamic diagram. The user can further perform operations such as translation and zooming on the map so as to view the user distribution thermodynamic diagrams of different regions. The thermodynamic diagram generation method 400 of the present invention needs to be performed both when a user enters a user distribution interface and when an interface operation is performed in the user distribution interface.
In the thermodynamic diagram generation method 400 of the present invention, for different map zoom levels, the terminal device 310 may request the server 320 for discrete point data with different accuracies, so as to ensure that the number of the discrete point data acquired from the server 320 is maintained within a moderate range under different zoom levels, and reduce the magnitude of the acquired discrete point data, thereby reducing the pressure of the terminal device 310 in requesting, acquiring and processing the discrete point data, facilitating the rapid generation of the thermodynamic diagram, and improving the data display effect.
In the thermodynamic diagram generation method of the present invention, it is necessary to define in advance the correspondence between the zoom level of the map and the accuracy of discrete point data. The zoom level of the map is the zoom level of the map, and the larger the zoom level is, the larger the magnification of the map is, and the smaller the region range of the map displayed on the terminal device 310 is. The specific correspondence of the zoom level of the map to the displayed geographical range is related to the map interface (API) employed by the terminal device application. For example, for an open source map interface leaf let, when the zoom level is 4-8, the data of the national range or the provincial range can be displayed; when the zoom level is 9-13, displaying data in a city range or even a town range; when the zoom level is greater than 13, street-wide detail data may be displayed.
According to one embodiment, the zoom level may be divided into a plurality of zoom level ranges, each zoom level range corresponding to a precision. And, the larger the zoom level, the higher the corresponding accuracy. For example, the multiple zoom level ranges may be divided into three zoom level ranges from low to high, and the three zoom level ranges respectively correspond to three precisions from low to high. If the largest geographical range that the map of the user distribution interface can display is nationwide (the zoom level is 4), the user can adjust the zoom level of the map within a range greater than 4. At this time, zoom levels 4 to 8 (a first zoom level range) may be set to correspond to 5-bit GeoHash codes (first precision), zoom levels 9 to 13 (a second zoom level range) may correspond to 6-bit GeoHash codes (second precision), and zoom levels greater than 13 (a third zoom level range) may correspond to 12-bit GeoHash codes (third precision, also original precision).
The above gives only one example of the correspondence of zoom level to precision. In practice, a person skilled in the art can set the corresponding relationship between the zoom level and the precision according to actual needs, and the present invention is not limited to this. Any scheme that embodies the accuracy of the location information as a function of zoom level is within the scope of the present invention.
As shown in fig. 4, the method 400 begins at step S410.
In step S410, the terminal device 310 receives a map operation by the user, and generates a thermodynamic diagram data request according to the map operation.
The user's map operations include zooming, panning, and the like. When the user performs zoom-out and zoom-in operations on the map, the map after the user operation generally displays a new region range with respect to the map before the operation, and there may be no discrete point data of the new region range at the terminal device 310, so in order to draw the thermodynamic diagram after the operation, the terminal device 310 needs to generate a thermodynamic diagram data request according to the region range after the operation and the zoom level, and send the data request to the server in the subsequent step S420 to request the discrete point data from the server 320.
When the user performs the zoom-in operation on the map, the region range displayed on the map after the user performs the zoom-in operation may be within the region range displayed on the map before the user performs the zoom-in operation, that is, the discrete point data used for generating the thermodynamic diagram after the user performs the zoom-in operation may be a subset of the discrete point data used for generating the thermodynamic diagram before the user performs the zoom-in operation, and the discrete point data used for generating the thermodynamic diagram after the user performs the zoom-in operation already exists at the terminal device 310, so that the request for the discrete point data from the server may no longer be made in. Based on this consideration, according to one embodiment, when the user performs an enlargement operation on the map, it is determined whether the target accuracy corresponding to the zoom level after the operation is the same as the accuracy of the discrete point data for the thermodynamic diagram before the operation. If not, a thermodynamic diagram data request needs to be generated and sent to the server in subsequent step S420 to request discrete point data from the server 320. If so, further judging whether the operated region range is within the region range before operation. If so, generating no thermodynamic diagram data request is needed; if not, a thermodynamic diagram data request is generated according to the operated region range and zoom level, and the data request is transmitted to the server 320 in the subsequent step S420.
The thermodynamic diagram data request comprises the region range displayed by the current map (namely the map operated by the user) and the target precision of the discrete point data. The target accuracy of the discrete point data is determined according to the zoom level of the current map (i.e., the map after the user operation).
According to one embodiment, the target accuracy of the discrete point data may be determined by: firstly, determining a zoom level range to which a zoom level belongs; and then, determining the target precision corresponding to the zoom level according to the corresponding relation between the zoom level range and the precision. Specifically, when the zoom level is less than the first threshold (i.e., the zoom level falls within the first zoom level range), the target precision is the first precision; when the zoom level is greater than or equal to the first threshold and less than the second threshold (namely, when the zoom level belongs to the second zoom level range), the target precision is the second precision; when the zoom level is greater than or equal to the second threshold (i.e., the zoom level falls within the third zoom level range), the target precision is the third precision. For example, referring to the correspondence of the scale level range and the precision in the above embodiment, the scale levels 4 to 8 correspond to a GeoHash code of 5 bits, the scale levels 9 to 13 correspond to a GeoHash code of 6 bits, the scale level greater than 13 corresponds to a GeoHash code of 12 bits, and then the first threshold is 9 and the second threshold is 14. Correspondingly, if the zoom level of the current map is less than 9, the target precision is the GeoHash code of 5 bits (first precision); if the zoom level of the current map is greater than or equal to 9 and less than 14, the target precision is the GeoHash code with 6 bits (second precision); if the zoom level of the current map is greater than or equal to 14, the target precision is the GeoHash code with 12 bits (third precision).
According to one embodiment, the thermodynamic diagram data request further comprises a data query condition, and the data query condition is used for filtering the discrete point data according to the attribute information of the discrete point data. For example, referring to the aforementioned tables 3 to 5, the data query condition may include values of attribute information such as a vehicle system, a behavior time period, a preference type, and the like.
According to an embodiment, the thermodynamic diagram data request further includes a concurrency level, and the concurrency level is used for acquiring the discrete point data from the server 320 in parallel, so that the data can be acquired quickly, and the data acquisition time is reduced.
After the terminal device 310 generates a thermodynamic diagram data request based on the map operation of the user, step S420 is executed to transmit the data request to the server 320. As previously described, the data request includes the geographic range and the target accuracy of the location information displayed by the current map, which is determined based on the zoom level of the current map.
After receiving the data request from the terminal device 310, the server 320 executes step S430 to screen out discrete point data having the position information with the target accuracy and located in the specified region range from the stored plurality of discrete point data. Subsequently, the server 320 executes step S440 to return the screened discrete point data to the terminal device 310.
For example, when the GeoHash code with the target accuracy of 5 bits and the region range from abcd0 to abcd9 are specified in the data request from the terminal device 310, the server 320 extracts discrete point data with the position information accuracy of 5 bits and the values from abcd0 to abcd9 from the stored plurality of discrete point data in step S430, and returns the extracted discrete point data to the terminal device 310 in step S440.
According to an embodiment, if the data query condition is further specified in the data request sent by the terminal device 310, in step S430, the server 320 further screens out discrete point data that has attribute information satisfying the data query condition and has location information as the target accuracy and is located in the region range from the stored plurality of discrete point data. Subsequently, the server 320 executes step S440 to return the screened discrete point data to the terminal device 310.
For example, a GeoHash code with target precision of 5 bits is specified in a data request sent by a terminal device, the region range is abcd 0-abcd 9, and the data query conditions are as follows: if the vehicle system is "audi A4L", the action time period is "2019-08", and the preference type is "interest layer", the server 320 screens out discrete point data having the vehicle system of "audi A4L", the action time period of "2019-08", the preference type of "interest layer", the accuracy of the position information of 5 bits, and the values abcd0 to abcd9 from the stored plurality of discrete point data in step S430, and returns the screened discrete point data to the terminal device 310 in step S440.
According to an embodiment, if the data request sent by the terminal device 310 further specifies a concurrency level, in step S440, after screening the discrete point data meeting the data request, the server 320 further divides the screened discrete point data into a plurality of groups, where the number of the groups is the same as the concurrency level. Subsequently, sets of discrete point data are returned in parallel to the terminal device 310. For example, each set of discrete point data is returned to one browser process, and accordingly, multiple browser processes obtain multiple sets of discrete point data in parallel.
For example, a GeoHash code with target precision of 5 bits is specified in a data request sent by a terminal device, the region range is abcd 0-abcd 9, and the data query conditions are as follows: if the vehicle system is "audi A4L", the action time period is "2019-08", the preference type is "interest level", and the concurrency is 4, the server 320 screens discrete point data having an accuracy of 5 bits and values of abcd0 to abcd9, from among the plurality of pieces of discrete point data stored in step S430, the vehicle system is "audi A4L", the action time period is "2019-08", the preference type is "interest level", and the position information. Subsequently, in step S440, the server 320 divides the screened discrete point data into 4 groups (preferably, equally divides the screened discrete point data into 4 groups), and returns the 4 groups of discrete point data to the terminal device 310 in parallel.
It should be noted that, referring to the foregoing description, each piece of discrete point data includes location information, attribute information, and weight information. Since only the location information and weight information of the discrete point data are usually required when generating the thermodynamic diagram, and the attribute information is not used, the server 320 may return only the location information and weight information of the discrete point data to the terminal device 310 in step S440 after filtering the discrete point data that matches the data request in step S430, and may not return the attribute information of each discrete point data.
In some embodiments, if the number of discrete point data that is screened by the server 320 in step S430 to meet the data request is too small, the highlight areas in the thermodynamic diagram generated by the subsequent terminal device 310 according to the discrete point data may be too scattered to show the trend of the change in popularity, and the showing effect is not good.
In other embodiments, if the server 320 screens in step S430 too many discrete point data that meet the data request, the highlighted areas in the thermodynamic diagrams generated by the subsequent terminal device 310 according to the discrete point data may be too aggregated to show the trend of the change in popularity, and the display effect may be poor.
Therefore, according to an embodiment, steps S432 and S434 are further included after step S430 (steps S432, S434 are not shown in fig. 4) for further adjusting the number of discrete point data screened out in step S430.
In step S432, it is determined whether the number of the screened discrete point data is smaller than the third threshold, and if yes, the discrete point data with the highest position information and located in the region range is screened again from the stored multiple discrete point data, so that the screened discrete point data is returned to the terminal device 310 in subsequent step S440.
In step S434, it is determined whether the number of the screened discrete point data is greater than a fourth threshold; if yes, a fourth threshold discrete point data is further sampled from the screened discrete point data, so that the sampled discrete point data is returned to the terminal device 310 in the subsequent step S440.
The values of the third threshold and the fourth threshold can be set by a person skilled in the art according to actual conditions, and the values of the third threshold and the fourth threshold are not limited by the invention. In one embodiment, the third threshold may be set to 1000 and the fourth threshold may be set to 30000.
It should be noted that steps S432 and S434 may be implemented only in an alternative manner, or may be implemented in succession. The present invention does not limit the specific implementation of steps S432 and S434.
Through steps S430, S432, S434, the server 320 derives discrete point data to be returned to the terminal device 310. Subsequently, in step S440, these discrete point data are returned to the terminal device 310.
Upon receiving the discrete point data returned from the server 320, the terminal device 310 executes step S450 to generate a thermodynamic diagram from the received discrete point data.
According to an embodiment, step S450 may further be implemented according to the following steps S452 to S458:
first, in step S452, a circular area is created for each piece of discrete point data, respectively, and a weight is set for each pixel in the circular area. The weight of the center pixel of the circular area is the weight information of the discrete point data, the weights of other pixels in the circular area decrease with the increase of the distance from the center pixel, and the weight of the edge pixel of the circular area is 0.
The radius of the circular area may be set by one skilled in the art without limitation. For example, the radius of the circular area may be set to 3 pixels.
The weight of the pixel in the circular area is attenuated along the direction from the center of the circle to the edge, the weight of the center pixel is the weight information of the corresponding discrete point data, and the weight of the edge pixel is 0. The weight of a pixel in the circular area is a function of the distance from the pixel to the center pixel, i.e., w ═ f (d), where w is the weight of a pixel in the circular area and d is the distance from the pixel to the center pixel. The invention does not limit the specific calculation method of the weight of each pixel in the circular area. For example, the weight of each pixel in the circular region may be set according to a linear function, a quadratic function, or other functions.
Subsequently, in step S454, the weight values of the pixels of the circular area of all the discrete point data are superimposed to determine the gradation value of each pixel in the map display area.
The circular areas of the plurality of discrete point data may partially overlap, and therefore, in the map display area of the terminal device screen, one pixel may correspond to the circular areas of the plurality of discrete point data, and accordingly, one pixel may have a plurality of weight values (each weight value corresponds to one circular area). In step S454, the weights of the pixels are superimposed, and the total weight of the pixels is calculated. And then determining the gray value of each pixel according to the total weight value. For example, the total weight of each pixel may be normalized to a value between 0 and 1, and the normalized value is the gray value of each pixel.
Subsequently, in step S456, the color of each pixel is determined according to the correspondence relationship between the gradation value and the color.
The corresponding relationship between the gray value and the color can be set by a person skilled in the art, and the present invention is not limited thereto. Table 6 shows one possible correspondence of gray values to colors.
TABLE 6
Grey scale value (0-100%) Color value (R, G, B)
0 (0,0,0) (Black)
25% (0, 255) (blue)
50% (0,255,0) (Green)
75% (255, 0) (yellow)
100% (255,0,0) (Red)
Finally, in step S458, a thermodynamic diagram is formed according to the color of each pixel.
FIG. 5 shows a schematic diagram of a thermodynamic diagram generation process 500 according to one embodiment of the invention. Process 500 is a specific embodiment of the aforementioned thermodynamic diagram generation method 400. As shown in fig. 5, the process 500 begins at step S502.
In step S502, the user accesses the application on the terminal device and enters a user distribution interface in the application. The application may be, for example, an automotive information application, and the user distribution interface may present a geographically distributed thermodynamic diagram of the user using the application.
Subsequently, in step S504, the user sets a data query condition on the user distribution interface. The data query conditions that can be set include, for example, a train, a behavior time period, a preference type, and the like, but are not limited thereto. For example, the user may set the query condition to be "audi A4L" for the train, "2019-08" for the action period, and "focus layer" for the preference type. And if the user does not set the data query condition, adopting the default data query condition of the system.
When a user enters the user distribution interface, a nationwide thermodynamic diagram is displayed by default. The zoom level corresponding to the nationwide range is 4, the zoom level belongs to the zoom level range of 4-8, and the target precision of the corresponding discrete point data is the first precision (namely the lowest precision), namely 5-bit GeoHash data.
Subsequently, in step S506, the number of batches of the requested data is set, which is the concurrency described in the method 400. For example, the concurrency may be set to 4. Then, a thermodynamic diagram data request is sent to the server, the data request including data query conditions set by the user (train system ═ audia 4L, "behavior time period ═ 2019-08," preference type ═ layer of interest "), territorial scope (nationwide) of the current map display, target accuracy (5 bits) of the requested discrete point data, and concurrency (4).
Subsequently, in step S508, the server screens discrete point data whose train system is "audia 4L", behavior time period is "2019-08", preference type is "layer of interest", position information has an accuracy of 5 bits and whose value is nationwide from among the stored pieces of discrete point data based on the received data request, and in subsequent steps S510, S512, the screened discrete point data is divided into 4 groups equally and returned to the terminal device in parallel.
Subsequently, in step S514, the terminal device renders and generates a nationwide user distribution thermodynamic diagram from the received discrete point data. The resulting thermodynamic diagram is shown in fig. 6A.
Subsequently, in step S516, the user performs a map operation to zoom the map up to the first threshold value threshold1 of the zoom level. The first threshold may be, for example, 9, and the user zooms in the map to zoom level 9 in step S516. The zoom level 9 belongs to a zoom level range of 9-13, and the corresponding target precision is the second precision, namely, the GeoHash data with 6 bits.
Subsequently, in step S518, the terminal device transmits a thermodynamic diagram data request including a data query condition (the same query condition as set in step S504), a region range of the current map display, and a target accuracy (6 bits) of the requested discrete point data to the server.
Subsequently, in step S520, the server screens discrete point data of which the train is "audia 4L", the action time period is "2019-08", the preference type is "layer of interest", the accuracy of the position information is 6 bits, and the value is within the current region range, from the stored plurality of discrete point data.
Subsequently, in step S522, the server determines whether the number of the 6-bit discrete point data screened in step S520 is smaller than a third threshold 1000.
If the number of the 6-bit discrete point data screened in step S520 is less than 1000, step S524 is executed to re-screen the highest-precision (i.e., 12-bit) discrete point data located in the current region range from the stored multiple discrete point data, and then step S528 is executed to determine whether the number of the re-screened 12-bit discrete point data is greater than the fourth threshold 30000. If yes, step S530 is executed to sample 30000 points from the 12-bit discrete point data, and return 30000 12-bit discrete point data to the terminal device. If not, all the 12-bit discrete point data screened out in step S524 is directly returned to the terminal device.
If the number of the 6-bit discrete point data sorted in step S520 is not less than 1000, the 6-bit discrete point data sorted is kept unchanged in step S526, and then step S528 is executed. In step S528, it is determined whether the number of screened 6-bit discrete point data is larger than the fourth threshold 30000. If yes, step S530 is executed to sample 30000 points from the 6-bit discrete point data, and return 30000 6-bit discrete point data to the terminal device. If not, all the 6-bit discrete point data in step S526 are directly returned to the terminal device.
Subsequently, in step S532, the terminal device renders a thermodynamic diagram generating a user distribution from the received discrete point data. The resulting thermodynamic diagram is shown in fig. 6B.
Subsequently, in step S534, the user performs a map operation to zoom the map up to the second threshold value threshold2 of the zoom level. The second threshold may be, for example, 14, and the user zooms in the map to zoom level 14 in step S534. The zoom level 14 belongs to a zoom level range of 14 or more, and the corresponding target precision is the third precision (highest precision), i.e., 12 bits of GeoHash data.
Subsequently, in step S536, it is determined whether the precision of the discrete point data used for generating the thermodynamic diagram before operation is 12 bits as the target precision.
If the discrete point data used for generating the thermodynamic diagram before the operation is not 12 bits, step S540 is executed to request 12-bit discrete point data from the server.
If the discrete point data used for generating the map before the operation is 12 bits, step S538 is further executed to determine whether the area range of the current map (the map after the user operation) is beyond the area range before the operation. If not, the server does not need to request discrete point data, and then step S544 is executed to find the discrete point data needed this time from the locally existing discrete point data, and render and generate the thermodynamic diagram distributed by the user according to the found discrete point data. If yes, step S540 is executed to request 12-bit discrete point data from the server, where the corresponding data request includes a data query condition (the same as the query condition set in step S504), a region range displayed by the current map, and a target accuracy (12-bit) of the requested discrete point data.
The server receives a data request for requesting 12-bit discrete point data from the terminal device, executes step S542, screens discrete point data with a vehicle system of "audia 4L", a behavior time period of "2019-08", a preference type of "layer of interest", a position information accuracy of 12 bits and a value within a current region range from a plurality of stored discrete point data, and returns the screened discrete point data to the terminal device.
Subsequently, the terminal device executes step S544 to render a thermodynamic diagram generating a user distribution from the received discrete point data. The resulting thermodynamic diagram is shown in fig. 6C.
In the embodiment shown in FIG. 5, the user enters the user distribution interface to view the thermodynamic diagram of the user distribution. When a user initially enters a user distribution interface, thermodynamic diagrams within a nationwide range (zoom level is 4) are displayed by default, the target accuracy of corresponding discrete point data is 5 bits, and the generated thermodynamic diagrams are shown in fig. 6A. Subsequently, the user performs the zoom-in operation on the map step by step, sequentially zooms in the zoom level of the map to 9 and 14, the target accuracies of the corresponding discrete point data are 6 bits and 12 bits, respectively, and the generated thermodynamic diagrams are shown in fig. 6B and 6C, respectively. In the thermodynamic diagram generation method, the terminal equipment can request the server for the discrete point data with different accuracies according to different map zoom levels, so that the quantity of the discrete point data acquired from the server is kept in a moderate range under different zoom levels, the order of magnitude of the acquired discrete point data is reduced, the pressure of the terminal equipment for requesting, acquiring and processing the discrete point data is reduced, and the thermodynamic diagram is favorably and quickly generated. In addition, referring to fig. 6A to 6C, in the thermodynamic diagram generated by the thermodynamic diagram generation method according to the present invention, the highlight region is not excessively gathered or dispersed, and the trend of the change in heat can be clearly demonstrated, thereby exhibiting a good display effect.
While the thermodynamic diagram generation method 400 of the present invention has been described above from the perspective of a system (including a terminal device and a server), the thermodynamic diagram generation method 700 performed by the terminal device and the data processing method 800 performed by the server in generating a thermodynamic diagram will be described below from the perspective of a single executing agent in the system, respectively.
FIG. 7 illustrates a flow diagram of a thermodynamic diagram generation method 700, according to one embodiment of the invention. The method 700 is executed in the terminal device 310 and is used for quickly generating the thermodynamic diagram and improving the display effect of the thermodynamic diagram. As shown in fig. 7, the method 700 begins at step S710.
In step S710, a thermodynamic diagram data request is sent to the server, where the data request includes a geographical area displayed by the current map and a target accuracy of the position information, and the target accuracy is determined according to the zoom level of the current map.
According to one embodiment, the thermodynamic diagram data request is generated based on a user's map operations. That is, before step S710, step S702 is further included (step S702 is not shown in fig. 7). In step S702, a map operation by the user is received, and a thermodynamic diagram data request is generated in accordance with the map operation.
Specifically, in step S702, when the user performs a zoom-out and/or pan operation on the map, a thermodynamic diagram data request is generated according to the operated area range and zoom level. When a user performs an enlarging operation on a map, judging whether the target precision corresponding to the zoom level after the operation is the same as the precision of the position information of the discrete point data used for generating the thermodynamic diagram before the operation; if so, further judging whether the operated region range is within the region range before operation; if yes, generating no thermodynamic diagram data request; and if not, generating a thermodynamic diagram data request according to the operated region range and the zoom level.
According to one embodiment, the target accuracy of the position information may be determined by: firstly, determining a zoom level range to which a zoom level belongs; and then, determining the target precision corresponding to the zoom level according to the corresponding relation between the zoom level range and the precision. Specifically, when the zoom level is less than the first threshold (i.e., the zoom level falls within the first zoom level range), the target precision is the first precision; when the zoom level is greater than or equal to the first threshold and less than the second threshold (namely, when the zoom level belongs to the second zoom level range), the target precision is the second precision; when the zoom level is greater than or equal to the second threshold (i.e., the zoom level falls within the third zoom level range), the target precision is the third precision.
For example, referring to the correspondence of the scale level range and the precision in the above embodiment, the scale levels 4 to 8 correspond to a GeoHash code of 5 bits, the scale levels 9 to 13 correspond to a GeoHash code of 6 bits, the scale level greater than 13 corresponds to a GeoHash code of 12 bits, and then the first threshold is 9 and the second threshold is 14. Correspondingly, if the zoom level of the current map is less than 9, the target precision is the GeoHash code of 5 bits (first precision); if the zoom level of the current map is greater than or equal to 9 and less than 14, the target precision is the GeoHash code with 6 bits (second precision); if the zoom level of the current map is greater than or equal to 14, the target precision is the GeoHash code with 12 bits (third precision).
According to one embodiment, the thermodynamic diagram data request further comprises a data query condition, and the data query condition is used for filtering the discrete point data according to the attribute information of the discrete point data. For example, referring to the aforementioned tables 3 to 5, the data query condition may include values of attribute information such as a vehicle system, a behavior time period, a preference type, and the like.
According to one embodiment, the thermodynamic diagram data request further includes a concurrency level for obtaining discrete point data from the server in parallel.
Subsequently, in step S720, a plurality of discrete point data returned by the server are received, where the plurality of discrete point data are discrete point data whose position information is the target accuracy and located in the region range.
According to an embodiment, if the data request includes a data query condition, in step S720, the plurality of discrete point data returned by the server are discrete point data whose attribute information satisfies the data query condition, whose location information is the target precision and is located in the region range.
According to one embodiment, if the data request includes a concurrency level, in step S720, the terminal device receives multiple sets of discrete point data returned by the server in parallel, where the number of sets is the same as the concurrency level.
After receiving the plurality of discrete point data returned by the server, step S730 is executed to generate a thermodynamic diagram from the plurality of discrete point data. The specific steps of generating the thermodynamic diagram according to the plurality of discrete point data may refer to the related description of step S450, and are not described herein again.
FIG. 8 shows a flow diagram of a data processing method 800 according to one embodiment of the invention. The method 800 is executed in the server 320, and is used for returning an appropriate amount of discrete point data to the terminal device 310 based on the thermodynamic diagram data request sent by the terminal device 310, so that the terminal device 310 can generate thermodynamic diagrams quickly and ensure the display effect of the thermodynamic diagrams. As shown in fig. 8, the method 800 begins at step S810.
In step S810, a thermodynamic diagram data request sent by the terminal device 310 is received, where the data request includes a region range displayed by the current map and a target accuracy of the position information, and the target accuracy is determined according to the zoom level of the current map.
According to one embodiment, the target accuracy is determined according to the following steps: firstly, determining a zoom level range to which a zoom level belongs; and then, determining the target precision corresponding to the zoom level according to the corresponding relation between the zoom level range and the precision. Specifically, when the zoom level is less than the first threshold (i.e., the zoom level falls within the first zoom level range), the target precision is the first precision; when the zoom level is greater than or equal to the first threshold and less than the second threshold (namely, when the zoom level belongs to the second zoom level range), the target precision is the second precision; when the zoom level is greater than or equal to the second threshold (i.e., the zoom level falls within the third zoom level range), the target precision is the third precision.
For example, referring to the correspondence of the scale level range and the precision in the above embodiment, the scale levels 4 to 8 correspond to a GeoHash code of 5 bits, the scale levels 9 to 13 correspond to a GeoHash code of 6 bits, the scale level greater than 13 corresponds to a GeoHash code of 12 bits, and then the first threshold is 9 and the second threshold is 14. Correspondingly, if the zoom level of the current map is less than 9, the target precision is the GeoHash code of 5 bits (first precision); if the zoom level of the current map is greater than or equal to 9 and less than 14, the target precision is the GeoHash code with 6 bits (second precision); if the zoom level of the current map is greater than or equal to 14, the target precision is the GeoHash code with 12 bits (third precision).
According to one embodiment, the thermodynamic diagram data request further comprises a data query condition, and the data query condition is used for filtering the discrete point data according to the attribute information of the discrete point data. For example, referring to the aforementioned tables 3 to 5, the data query condition may include values of attribute information such as a vehicle system, a behavior time period, a preference type, and the like.
According to one embodiment, the thermodynamic diagram data request further includes a concurrency level for obtaining discrete point data from the server in parallel.
After receiving the data request from the terminal device in step S810, the server performs step S820 to filter out discrete point data having the position information with the target accuracy and located within the region range from the stored plurality of discrete point data. Subsequently, in step S830, the screened discrete point data is returned to the terminal device, so that the terminal device generates a thermodynamic diagram from the received discrete point data.
According to an embodiment, if the data request sent by the terminal device includes a data query condition, in step S820, the server screens out discrete point data whose attribute information satisfies the data query condition, whose location information is a target accuracy, and which is located in a region range from among a plurality of stored discrete point data.
According to an embodiment, if the data request sent by the terminal device further includes a concurrency degree, in step S820, after screening the discrete point data meeting the data request, the server further divides the screened discrete point data into a plurality of groups, where the number of the groups is the same as the concurrency degree; and returns multiple sets of discrete point data in parallel to the terminal device.
According to an embodiment, after step S820 and before S830, steps S822 and S824 (steps S822 and S824) are further included and are not shown in fig. 8, and are used for further adjusting the number of the discrete point data screened out in step S820.
In step S822, it is determined whether the number of the screened discrete point data is smaller than a third threshold, and if so, the discrete point data with the highest position information and located in the region range is screened out again from the stored multiple discrete point data, so that the screened discrete point data is returned to the terminal device in the subsequent step S830.
In step S824, it is determined whether the number of the screened discrete point data is greater than a fourth threshold; if yes, a fourth threshold discrete point data is further obtained by sampling from the screened discrete point data, so that the sampled discrete point data is returned to the terminal device in the subsequent step S830.
The values of the third threshold and the fourth threshold can be set by a person skilled in the art according to actual conditions, and the values of the third threshold and the fourth threshold are not limited by the invention. In one embodiment, the third threshold may be set to 1000 and the fourth threshold may be set to 30000.
It should be noted that steps S822 and S824 may be implemented only in one or in succession. The present invention does not limit the specific implementation of steps S822 and S824.
Through steps S820, S822, S824, the server obtains discrete point data to be returned to the terminal device. Subsequently, in step S830, these discrete point data are returned to the terminal device so that the terminal device generates a thermodynamic diagram from these discrete point data.
A11, the method according to any one of claims 8 to 10, wherein the data request further includes a data query condition, and accordingly the plurality of discrete point data are discrete point data whose attribute information satisfies the data query condition and whose location information is the target accuracy and is located within the region.
A12, the method according to any claim 8-11, wherein the data request further includes a concurrency degree, and the step of receiving the plurality of discrete point data returned by the server includes: and receiving a plurality of groups of discrete point data returned by the server in parallel, wherein the number of the groups is the same as the concurrency.
A13, the method of any one of claims 8-12, further comprising the steps of: receiving map operation of a user, and generating a thermodynamic diagram data request according to the map operation.
A14 the method of claim 13, wherein the generating a thermodynamic map data request in accordance with the map operations includes: when the user performs zoom-out and/or pan-in operations on the map, a thermodynamic diagram data request is generated according to the operated region range and zoom level.
A15, the method of claim 13 or 14, wherein the step of generating a thermodynamic diagram data request in accordance with the map operations includes: when a user performs an enlarging operation on a map, judging whether the target precision corresponding to the zoom level after the operation is the same as the precision of the position information of the discrete point data used for generating the thermodynamic diagram before the operation; if so, further judging whether the operated region range is within the region range before operation; if yes, generating no thermodynamic diagram data request; and if not, generating a thermodynamic diagram data request according to the operated region range and the zoom level.
A16, the method of any one of claims 8-15, wherein the step of generating a thermodynamic diagram from the plurality of discrete point data includes: respectively creating a circular area for each discrete point data, and setting a weight value for each pixel in the circular area, wherein the weight value of the central pixel of the circular area is the weight information of the discrete point data, the weight values of other pixels in the circular area are decreased with the increase of the distance from the central pixel, and the weight value of the edge pixel of the circular area is 0; overlapping the weight values of the pixels in the circular area of all the discrete point data to determine the gray value of each pixel in the map display area; determining the color of each pixel according to the corresponding relation between the gray value and the color; a thermodynamic diagram is generated according to the color of each pixel.
A17, a server comprising at least one processor and a memory storing program instructions; the program instructions, when read and executed by the processor, cause the server to perform the data processing method of any of claims 1-7.
A18, a terminal device, comprising a display, a memory and at least one processor, wherein the display is connected with the processor and is suitable for displaying thermodynamic diagrams; the memory is adapted to store a program for generating a thermodynamic diagram; the processor is adapted to read a program stored in the memory to perform the thermodynamic diagram generation method of any one of claims 8-16.
A19, a readable storage medium storing program instructions that, when read and executed by a computing device, cause the computing device to perform the data processing method of any one of claims 1-7 or the thermodynamic diagram generation method of any one of claims 8-16.

Claims (10)

1. A data processing method executed in a server, the server being connected to a data storage device, the data storage device storing therein a plurality of discrete point data of different accuracies, each of the discrete point data including location information and weight information, wherein discrete point data of low accuracy is obtained by aggregating discrete point data of high accuracy, the method comprising the steps of:
receiving a thermodynamic diagram data request sent by a terminal device, wherein the data request comprises a region range displayed by a current map and target accuracy of position information, and the target accuracy is determined according to a zoom level of the current map;
and screening out the discrete point data with the position information of the target precision and located in the region range from the stored plurality of discrete point data, and returning the screened discrete point data to the terminal equipment so that the terminal equipment can generate thermodynamic diagrams according to the received discrete point data.
2. The method of claim 1, wherein the target accuracy is determined according to the following steps:
and determining the zoom level range to which the zoom level belongs, and determining the target precision corresponding to the zoom level according to the corresponding relation between the zoom level range and the precision.
3. The method of claim 1 or 2, wherein the target accuracy is determined according to the following steps:
when the zoom level is less than a first threshold, the target precision is a first precision;
when the zoom level is greater than or equal to a first threshold and less than a second threshold, the target precision is a second precision;
when the zoom level is greater than or equal to a second threshold, the target precision is a third precision;
wherein the first precision is less than the second precision and less than the third precision.
4. The method of any of claims 1-3, wherein the discrete point data further comprises attribute information, the data request further comprises a data query condition, the method further comprising:
and screening discrete point data with attribute information meeting the data query condition and position information being the target precision and located in the region range from the stored plurality of discrete point data, and returning the screened discrete point data to the terminal equipment.
5. The method of any one of claims 1-4, wherein the data request further includes a degree of concurrency, the step of returning the screened discrete point data to the terminal device comprising:
dividing the screened discrete point data into a plurality of groups, wherein the number of the groups is the same as the concurrency; and
and returning a plurality of groups of discrete point data to the terminal equipment in parallel.
6. The method according to any one of claims 1-5, further comprising, before the step of returning the screened discrete point data to the terminal device, the steps of:
judging whether the quantity of the screened discrete point data is smaller than a third threshold value or not;
if yes, re-screening the discrete point data with the highest position information and located in the region range from the stored plurality of discrete point data so as to return the re-screened discrete point data to the terminal equipment in the subsequent steps.
7. The method according to any one of claims 1-6, further comprising, before the step of returning the screened discrete point data to the terminal device, the steps of:
judging whether the number of the screened discrete point data is larger than a fourth threshold value or not;
if yes, further sampling from the screened discrete point data to obtain a fourth threshold discrete point data, so that the sampled discrete point data is returned to the terminal equipment in the subsequent steps.
8. A thermodynamic diagram generation method, executed in a terminal device, the method comprising the steps of:
sending a thermodynamic diagram data request to a server, wherein the data request comprises a regional range displayed by a current map and a target precision of position information, and the target precision is determined according to a zoom level of the current map;
receiving a plurality of discrete point data returned by the server, wherein the plurality of discrete point data are discrete point data of which the position information is the target precision and is positioned in the region range; and
generating a thermodynamic diagram from the plurality of discrete point data.
9. The method of claim 8, wherein the target accuracy is determined according to the following steps:
and determining the zoom level range to which the zoom level belongs, and determining the target precision corresponding to the zoom level according to the corresponding relation between the zoom level range and the precision.
10. The method of claim 9, wherein the target accuracy is determined according to the following steps:
when the zoom level is less than a first threshold, the target precision is a first precision;
when the zoom level is greater than or equal to a first threshold and less than a second threshold, the target precision is a second precision;
when the zoom level is greater than or equal to a second threshold, the target precision is a third precision;
wherein the first precision is less than the second precision and less than the third precision.
CN201910973044.5A 2019-10-14 2019-10-14 Data processing method, thermodynamic diagram generation method and device Active CN110807135B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910973044.5A CN110807135B (en) 2019-10-14 2019-10-14 Data processing method, thermodynamic diagram generation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910973044.5A CN110807135B (en) 2019-10-14 2019-10-14 Data processing method, thermodynamic diagram generation method and device

Publications (2)

Publication Number Publication Date
CN110807135A true CN110807135A (en) 2020-02-18
CN110807135B CN110807135B (en) 2023-04-11

Family

ID=69488366

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910973044.5A Active CN110807135B (en) 2019-10-14 2019-10-14 Data processing method, thermodynamic diagram generation method and device

Country Status (1)

Country Link
CN (1) CN110807135B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111861577A (en) * 2020-07-28 2020-10-30 北京思特奇信息技术股份有限公司 Product handling thermodynamic diagram generation method and device, electronic equipment and storage medium
CN112364228A (en) * 2020-11-26 2021-02-12 深圳前瞻资讯股份有限公司 Construction method, system, application method, terminal device and storage medium of enterprise big data system based on physical position
CN116110577A (en) * 2022-11-16 2023-05-12 荣科科技股份有限公司 Health monitoring analysis method and system based on big data
CN116110577B (en) * 2022-11-16 2024-04-30 荣科科技股份有限公司 Health monitoring analysis method and system based on big data

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8274524B1 (en) * 2011-09-28 2012-09-25 Google Inc. Map rendering using interpolation of style parameters across zoom levels
US20150300837A1 (en) * 2012-10-15 2015-10-22 Denso Corporation Area map provision system, terminal device, and server device
CN107315824A (en) * 2017-07-04 2017-11-03 百度在线网络技术(北京)有限公司 Method and apparatus for generating thermodynamic chart
CN108763522A (en) * 2018-05-31 2018-11-06 康键信息技术(深圳)有限公司 POI retrieval orderings method, apparatus and computer readable storage medium
CN109286522A (en) * 2018-09-17 2019-01-29 北京北信源软件股份有限公司 A kind of method and device based on map real-time exhibition network traffic information
CN109712516A (en) * 2018-12-20 2019-05-03 成都路行通信息技术有限公司 A kind of vehicle distribution thermodynamic chart construction method and display systems based on GNSS device
CN109726261A (en) * 2019-01-07 2019-05-07 北京超图软件股份有限公司 A kind of heating power drawing generating method and device
CN109783594A (en) * 2019-01-09 2019-05-21 成都路行通信息技术有限公司 A kind of construction method, the apparatus and system of vehicle thermodynamic chart

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8274524B1 (en) * 2011-09-28 2012-09-25 Google Inc. Map rendering using interpolation of style parameters across zoom levels
US20150300837A1 (en) * 2012-10-15 2015-10-22 Denso Corporation Area map provision system, terminal device, and server device
CN107315824A (en) * 2017-07-04 2017-11-03 百度在线网络技术(北京)有限公司 Method and apparatus for generating thermodynamic chart
CN108763522A (en) * 2018-05-31 2018-11-06 康键信息技术(深圳)有限公司 POI retrieval orderings method, apparatus and computer readable storage medium
CN109286522A (en) * 2018-09-17 2019-01-29 北京北信源软件股份有限公司 A kind of method and device based on map real-time exhibition network traffic information
CN109712516A (en) * 2018-12-20 2019-05-03 成都路行通信息技术有限公司 A kind of vehicle distribution thermodynamic chart construction method and display systems based on GNSS device
CN109726261A (en) * 2019-01-07 2019-05-07 北京超图软件股份有限公司 A kind of heating power drawing generating method and device
CN109783594A (en) * 2019-01-09 2019-05-21 成都路行通信息技术有限公司 A kind of construction method, the apparatus and system of vehicle thermodynamic chart

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王胜开;徐志洁;张健钦;杜明义;: "逆向热力图的绘制方法" *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111861577A (en) * 2020-07-28 2020-10-30 北京思特奇信息技术股份有限公司 Product handling thermodynamic diagram generation method and device, electronic equipment and storage medium
CN111861577B (en) * 2020-07-28 2024-01-23 北京思特奇信息技术股份有限公司 Product handling thermodynamic diagram generation method and device, electronic equipment and storage medium
CN112364228A (en) * 2020-11-26 2021-02-12 深圳前瞻资讯股份有限公司 Construction method, system, application method, terminal device and storage medium of enterprise big data system based on physical position
CN112364228B (en) * 2020-11-26 2021-08-13 深圳前瞻资讯股份有限公司 Construction method, system, application method, terminal device and storage medium of enterprise big data system based on physical position
CN116110577A (en) * 2022-11-16 2023-05-12 荣科科技股份有限公司 Health monitoring analysis method and system based on big data
CN116110577B (en) * 2022-11-16 2024-04-30 荣科科技股份有限公司 Health monitoring analysis method and system based on big data

Also Published As

Publication number Publication date
CN110807135B (en) 2023-04-11

Similar Documents

Publication Publication Date Title
Comber et al. Spatial interpolation using areal features: A review of methods and opportunities using new forms of data with coded illustrations
CN109977192B (en) Unmanned aerial vehicle tile map rapid loading method, system, equipment and storage medium
Nath et al. Sensormap for wide-area sensor webs
US9401100B2 (en) Selective map marker aggregation
US6674445B1 (en) Generalized, differentially encoded, indexed raster vector data and schema for maps on a personal digital assistant
EP2560143B1 (en) Generating and serving tiles in a digital mapping system
US8352480B2 (en) Methods, apparatuses and computer program products for converting a geographical database into a map tile database
Ma et al. Mobility viewer: An Eulerian approach for studying urban crowd flow
US9860148B2 (en) Geographic segmentation systems and methods
Lin et al. Using geographically weighted regression to solve the areal interpolation problem
CN110807135B (en) Data processing method, thermodynamic diagram generation method and device
CN114020756B (en) Remote sensing image real-time map service publishing method and device
CN104199891A (en) Data processing method and device for heat map
US9041726B2 (en) Analyzing large data sets using digital images
US8395624B2 (en) Dynamic generation of images to facilitate information visualization
CN104090927A (en) Lineation searching method and device based on electronic map
KR100321763B1 (en) System and for browsing a web-based vector map
Lu et al. Online spatial data analysis and visualization system
Yang et al. No‐reference image quality assessment via structural information fluctuation
Bonilla-Bedoya et al. Urban socio-ecological dynamics: applying the urban-rural gradient approach in a high Andean city
Guan et al. Understanding China’s urban functional patterns at the county scale by using time-series social media data
Wang et al. Edge-directed interpolation-based sub-pixel mapping
CN110851868A (en) Position representative element generation method for track data release
Guo et al. Spatiotemporal dynamics of population density in China using nighttime light and geographic weighted regression method
Chima et al. Assessment of Nigeriasat-1 satellite data for urban land use/land cover analysis using object-based image analysis in Abuja, Nigeria

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant