CN111881930A - Thermodynamic diagram generation method and device, storage medium and equipment - Google Patents

Thermodynamic diagram generation method and device, storage medium and equipment Download PDF

Info

Publication number
CN111881930A
CN111881930A CN202010520400.0A CN202010520400A CN111881930A CN 111881930 A CN111881930 A CN 111881930A CN 202010520400 A CN202010520400 A CN 202010520400A CN 111881930 A CN111881930 A CN 111881930A
Authority
CN
China
Prior art keywords
thermodynamic diagram
point
data
parameter
cluster
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.)
Pending
Application number
CN202010520400.0A
Other languages
Chinese (zh)
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.)
Guangzhou Urban Planning Survey and Design Institute
Original Assignee
Guangzhou Urban Planning Survey and Design Institute
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 Guangzhou Urban Planning Survey and Design Institute filed Critical Guangzhou Urban Planning Survey and Design Institute
Priority to CN202010520400.0A priority Critical patent/CN111881930A/en
Publication of CN111881930A publication Critical patent/CN111881930A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Abstract

The invention relates to the technical field of thermodynamic diagrams, and discloses a thermodynamic diagram generation method, a thermodynamic diagram generation device, a thermodynamic diagram generation storage medium and thermodynamic diagram generation equipment, wherein the method comprises the following steps: receiving a thermodynamic diagram generation request initiated by a client; wherein the thermodynamic diagram generation request comprises a temporal constraint parameter and a spatial constraint parameter; analyzing the thermodynamic diagram generation request to obtain an analysis result; the analysis result comprises a time parameter corresponding to the time constraint parameter and a space parameter corresponding to the space constraint parameter; performing data processing on the spatial point data of the server according to the analysis result to obtain thermodynamic diagram data; and sending the thermodynamic diagram data to the client, so that the client generates thermodynamic diagrams according to the thermodynamic diagram data. The thermodynamic diagram generation method, the thermodynamic diagram generation device, the storage medium and the equipment can dynamically screen the space-time data according to the given space-time constraint parameters to generate the thermodynamic diagram in real time.

Description

Thermodynamic diagram generation method and device, storage medium and equipment
Technical Field
The present invention relates to the field of thermodynamic diagrams, and in particular, to a thermodynamic diagram generation method, apparatus, storage medium, and device.
Background
With the development of geographic information technology and large space-time data, the application field of the geographic information industry is continuously expanded, a geographic information service mode and a consumption mode are continuously changed, the large space-time data simultaneously comprises a time dimension, a space dimension and an attribute latitude, more than 80% of data in the real world is related to geographic positions, and the method has the comprehensive characteristics of multiple sources, large quantity, multiple dimensions, high updating speed and the like, and how to effectively and accurately visually express the large geographic space-time data so as to deepen the visual cognition of people on the data is widely concerned and researched.
The thermodynamic diagram is a method for displaying the aggregation degree of a certain geographic phenomenon, is a visual expression mode aiming at the distribution condition of a large number of data points in a certain area, displays the position of a high-density geographic entity, embodies the aggregation degree of the geographic entity, is widely applied to various fields, such as high crime areas, high traffic accident areas, high epidemic situation outbreak areas, scenic spot tourist distribution density and the like, and has become an important means for analyzing and recognizing the space-time environment by using various position data due to the characteristics of obvious expression effect, good user experience and the like.
The existing thermodynamic diagrams are more based on unconstrained thermodynamic diagrams, particularly for space-time big data, thermodynamic diagrams are generated in real time in an interactive mode under the condition of less consideration of space-time constraint, and specific real-time requirements cannot be met, for example, for a time period and a space range in which a user is interested, the existing method is difficult to provide interactive real-time thermodynamic diagram service, does not have applicability under the condition of space-time constraint, and is difficult to dynamically master the distribution condition of space-time data points under the constraint condition.
Disclosure of Invention
The technical problem to be solved by the embodiment of the invention is as follows: a thermodynamic diagram generation method, a device, a storage medium and equipment are provided, which dynamically screen space-time data according to given space-time constraint parameters and generate the thermodynamic diagram in real time.
In order to solve the technical problem, in a first aspect, an embodiment of the present invention provides a thermodynamic diagram generation method, where the method includes:
receiving a thermodynamic diagram generation request initiated by a client; wherein the thermodynamic diagram generation request comprises a temporal constraint parameter and a spatial constraint parameter;
analyzing the thermodynamic diagram generation request to obtain an analysis result; the analysis result comprises a time parameter corresponding to the time constraint parameter and a space parameter corresponding to the space constraint parameter;
performing data processing on the spatial point data of the server according to the analysis result to obtain thermodynamic diagram data;
and sending the thermodynamic diagram data to the client, so that the client generates thermodynamic diagrams according to the thermodynamic diagram data.
As a preferred scheme, the performing data processing on the spatial point data of the server according to the analysis result to obtain thermodynamic diagram data specifically includes:
screening the spatial point data of the server according to the time parameter and the spatial parameter in the analysis result to obtain a first point set;
performing spatial clustering on the first point set to obtain a second point set;
calculating the geometric barycentric coordinates and the weight of each cluster in the second point set to obtain a third point set;
and converting the third point set into a standard GeoJSON format to obtain the thermodynamic diagram data.
As a preferred scheme, the screening spatial point data of the server according to the time parameter and the spatial parameter in the analysis result to obtain a first point set specifically includes:
traversing the space point data of the server according to the time parameter and the space parameter in the analysis result;
and screening out the spatial point data meeting the time parameter and the spatial parameter from the spatial point data to obtain the first point set.
As a preferred scheme, the spatial clustering is performed on the first point set to obtain a second point set, and specifically:
and carrying out Spatial Clustering on the first point set according to a Density-Based Spatial Clustering of Applications with noise (DBSCAN) algorithm to obtain the second point set.
As a preferred scheme, the spatially clustering the first point set according to the DBSCAN algorithm to obtain the second point set specifically includes:
adding a cluster identification field to the first point set, initializing all cluster identifications, and initializing a minimum point number parameter and a field radius parameter;
traversing the first point set, judging whether each data point in the first point set is a core point according to the minimum point number parameter and the field radius parameter, and if any data point is the core point, adding the core point data set;
traversing the core point data set, and judging whether each core point in the core point data set is identified as a cluster; if any core point is not identified, traversing the adjacent points of the core point, acquiring the adjacent points with the density reaching the core point, adding the core point and the adjacent points with the density reaching the core point into the same cluster, and setting a cluster identification;
obtaining the second point set from the data point set with the class cluster identification; wherein the second set of points comprises m class clusters, each class cluster comprising n points, m >0, n > 0.
As a preferred scheme, the calculating the geometric barycentric coordinate and the weight of each cluster in the second point set to obtain a third point set specifically includes:
traversing the point set of each cluster type in the second point set;
calculating the geometric barycentric coordinates and the weight of each cluster to obtain the third point set; the calculation formula of the geometric barycentric coordinate and the weight of each cluster is as follows:
Figure BDA0002530199350000031
wherein the content of the first and second substances,
Figure BDA0002530199350000032
as the abscissa of the geometric center of gravity of the kth cluster class,
Figure BDA0002530199350000033
as the ordinate of the geometric center of gravity of the kth cluster class,
Figure BDA0002530199350000034
is the weight of the kth class cluster, n is the number of points of the kth class cluster,
Figure BDA0002530199350000035
is the abscissa of the ith point of the kth cluster class,
Figure BDA0002530199350000036
is the ordinate of the ith point of the kth cluster class,
Figure BDA0002530199350000041
is the weight of the ith point of the kth class cluster, k>0,n>0,1≤i≤n。
As a preferred scheme, the time constraint parameter is a time period including a start time and an end time, or a specified time;
the space constraint parameter is a polygon described in WKT (well know text) format.
In order to solve the technical problem, in a second aspect, an embodiment of the present invention provides a thermodynamic diagram generation apparatus, including:
the client comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a thermodynamic diagram generation request initiated by a client; wherein the thermodynamic diagram generation request comprises a temporal constraint parameter and a spatial constraint parameter;
the analysis module is used for analyzing the thermodynamic diagram generation request to obtain an analysis result; the analysis result comprises a time parameter corresponding to the time constraint parameter and a space parameter corresponding to the space constraint parameter;
the processing module is used for carrying out data processing on the space point data of the server according to the analysis result to obtain thermodynamic diagram data;
and the sending module is used for sending the thermodynamic diagram data to the client so that the client generates thermodynamic diagrams according to the thermodynamic diagram data.
In order to solve the technical problem, in a third aspect, an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed, implements the thermodynamic diagram generation method according to any one of the first aspect.
In order to solve the technical problem, in a fourth aspect, an embodiment of the present invention provides a terminal device, where the terminal device includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the computer program is executed by the processor, the computer program implements the thermodynamic diagram generating method according to any one of the first aspects.
Compared with the prior art, the thermodynamic diagram generation method, the thermodynamic diagram generation device, the thermodynamic diagram generation storage medium and the thermodynamic diagram generation equipment provided by the embodiment of the invention have the beneficial effects that: the time range and the space range are obtained by analyzing the space-time constraint parameters, and data can be filtered according to the use requirements of users to form a universal and easy-to-use interactive thermodynamic diagram generation mode; the server side carries out clustering analysis on the sample data by using a density-based DBSCAN spatial clustering algorithm, clusters according to the density degree of sample data distribution, divides areas with high density into the same type of clusters, intuitively reflects the distribution condition of the samples, uses the aggregated point set to represent points required by thermodynamic diagram rendering, greatly reduces the data volume, directly calculates and generates at the server side, reduces the rendering pressure of the client side, greatly improves the user experience, can accurately reflect the aggregation degree of the sample data, and efficiently realizes the visualization effect of the thermodynamic diagram; the final analysis result data is converted into a GeoJSON format, the data format is unified, data exchange and interoperation are facilitated, the method can be widely applied to front-end visual frameworks such as Openlayers, Echarts and Mapbox, and the method has strong universality.
Drawings
In order to more clearly illustrate the technical features of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is apparent that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on the drawings without inventive labor.
FIG. 1 is a schematic flow chart diagram of a preferred embodiment of a thermodynamic diagram generation method provided by the present invention;
FIG. 2 is a schematic flow chart diagram illustrating a preferred embodiment of data processing in a thermodynamic diagram generation method according to the present invention;
FIG. 3 is a schematic structural diagram of a preferred embodiment of a thermodynamic diagram generation apparatus provided by the present invention;
fig. 4 is a schematic structural diagram of a preferred embodiment of a terminal device provided by the present invention.
Detailed Description
In order to clearly understand the technical features, objects and effects of the present invention, the following detailed description of the embodiments of the present invention is provided with reference to the accompanying drawings and examples. The following examples are intended to illustrate the invention, but are not intended to limit the scope of the invention. Other embodiments, which can be derived by those skilled in the art from the embodiments of the present invention without inventive step, shall fall within the scope of the present invention.
In the description of the present invention, it should be understood that the numbers themselves, such as "first", "second", etc., are used only for distinguishing the described objects, do not have a sequential or technical meaning, and cannot be understood as defining or implying the importance of the described objects.
Fig. 1 is a schematic flow chart of a thermodynamic diagram generation method according to a preferred embodiment of the present invention.
As shown in fig. 1, the method includes:
s10: receiving a thermodynamic diagram generation request initiated by a client; wherein the thermodynamic diagram generation request comprises a temporal constraint parameter and a spatial constraint parameter;
s20: analyzing the thermodynamic diagram generation request to obtain an analysis result; the analysis result comprises a time parameter corresponding to the time constraint parameter and a space parameter corresponding to the space constraint parameter;
s30: performing data processing on the spatial point data of the server according to the analysis result to obtain thermodynamic diagram data;
s40: and sending the thermodynamic diagram data to the client, so that the client generates thermodynamic diagrams according to the thermodynamic diagram data.
It should be noted that the thermodynamic diagram generation method according to the embodiment of the present invention is applied to the server.
In specific implementation, when a client initiates a thermodynamic diagram generation request, a server receives the thermodynamic diagram generation request initiated by the client, analyzes the thermodynamic diagram generation request to obtain an analysis result, performs data processing on null point data according to the analysis result to obtain thermodynamic diagram data, and sends the thermodynamic diagram data to the client, so that the client generates a thermodynamic diagram according to the thermodynamic diagram data.
The thermodynamic diagram generation request initiated by the client includes a time constraint parameter and a space constraint parameter of the thermodynamic diagram which needs to be generated at this time. It is to be understood that the thermodynamic diagram generation request may include both the temporal constraint parameter and the spatial constraint parameter; or only time constraint parameters; or only the spatial constraint parameters.
Correspondingly, the analysis result obtained by the server includes a time parameter corresponding to the time constraint parameter of the thermodynamic diagram which needs to be generated this time and a space parameter corresponding to the space constraint parameter of the thermodynamic diagram which needs to be generated this time.
Correspondingly, the embodiment of the invention provides a thermodynamic diagram generation method applied to a client, and the client can perform data transmission and information interaction with a server. The thermodynamic diagram generation method applied to the client comprises the following steps:
x10: acquiring a time constraint parameter and a space constraint parameter set by a user;
x20: generating a thermodynamic diagram generation request according to the time constraint parameters and the space constraint parameters;
x30: sending the thermodynamic diagram generation request to a server;
x40: receiving thermodynamic diagram data sent by a server;
x50: generating a thermodynamic diagram from the thermodynamic diagram data.
The thermodynamic diagram generation method provided by the embodiment of the invention can dynamically screen the space-time data according to the given space-time constraint parameters to generate the thermodynamic diagram in real time.
In a preferred implementation, the time constraint parameter is a time period including a start time and an end time, or a specified time; the space constraint parameters are polygons described by the WKT format.
Therein, at the clientIn the initiated thermodynamic diagram generation request, the time constraint parameter is defined as: timeframe ═ Ts-Te,TsDenotes the starting time, TeRepresents the termination time; or, the time constraint parameter is defined as: timeframe ═ Ta,TaIndicating a specified time of day.
The spatial constraint parameter is defined as: WKTPolygon ═ POLYGON ((a, B, C.)), WKTPolygon denotes a POLYGON described in wkt (well know text), and A, B, C denotes a vertex of the POLYGON. The WKT is a data format that is formulated by the OGC (Open GeoSpatial Consortium) and that describes vector geometric objects using a text markup language.
In a preferred embodiment, in step S20, the server parses the thermodynamic diagram generation request based on an HTTP (Hyper Text transfer protocol) standard request protocol specification, and an obtained parsing result is represented by a binary group, as an example, the parsing result is Cts=<t,s>T (time) represents a temporal parameter, and s (space) represents a spatial parameter.
In a preferred embodiment, as shown in fig. 2, the performing data processing on the spatial point data of the server according to the analysis result to obtain thermodynamic diagram data specifically includes:
s301: screening the spatial point data of the server according to the time parameter and the spatial parameter in the analysis result to obtain a first point set;
s302: performing spatial clustering on the first point set to obtain a second point set;
s303: calculating the geometric barycentric coordinates and the weight of each cluster in the second point set to obtain a third point set;
s304: and converting the third point set into a standard GeoJSON format to obtain the thermodynamic diagram data.
Specifically, the purpose of data processing on the spatial point data is to obtain thermodynamic diagram data sent to the client, and the data processing process among the purposes includes but is not limited to screening of the spatial point data, clustering of the spatial point data, calculation of geometric barycenter and weight, and format conversion.
In a preferred embodiment, the screening spatial point data of the server according to the time parameter and the spatial parameter in the analysis result to obtain the first point set specifically includes:
traversing the space point data of the server according to the time parameter and the space parameter in the analysis result;
and screening out the spatial point data meeting the time parameter and the spatial parameter from the spatial point data to obtain the first point set.
Specifically, the server side analyzes the result C according to the analysis resultts=<t,s>And traversing the spatial point data, searching and screening sample data which meets the analysis result and is based on the thermodynamic diagram generation request, and abandoning the spatial point data which does not meet the analysis result to obtain a result point set, namely the first point set D1.
In a preferred embodiment, the spatial clustering is performed on the first point set to obtain a second point set, specifically:
and carrying out Spatial Clustering on the first point set according to a Density-Based Spatial Clustering of Applications with noise (DBSCAN) algorithm to obtain the second point set.
It should be noted that the DBSCAN algorithm is a spatial clustering algorithm based on density. The algorithm carries out clustering according to the density of sample data distribution, the basic basis is that samples of the same type are closely connected, areas with high density are divided into the same type of clusters, and the distribution condition of the samples is reflected more intuitively.
The algorithm mainly comprises two parameters: neighborhood radius parameter NrAnd a minimum point number parameter MinPts for describing the compactness of sample distribution, effectively expressing the aggregation degree and distribution mode of the geographic space point data, and being effectively applied to the expression of thermodynamic diagrams, wherein the main core concepts are as follows:
neighborhood: refers to a set of samples that are not greater than a given distance for any given sample;
core point: finger to sample piContains at least MinPts samples, then piIs a core point;
the density is up to: finger sample pjIn the sample piIn the neighborhood of (1), and piIs the core object, sample p is calledjAnd sample piThe density is direct;
the density can reach: finger to sample piAnd sample pjIf there is a sample sequence p1,p2,……,pnWherein p is1=pi、pn=pjAnd two consecutive samples are density-through, sample p is callediAnd sample pjThe density can be reached.
In a preferred embodiment, the spatially clustering the first point set according to the DBSCAN algorithm to obtain the second point set specifically includes:
traversing the first point set, judging whether each data point in the first point set is a core point according to the minimum point number parameter and the field radius parameter, and if any data point is the core point, adding the core point data set;
traversing the core point data set, and judging whether each core point in the core point data set is identified as a cluster; if any core point is not identified, traversing the adjacent points of the core point, acquiring the adjacent points with the density reaching the core point, adding the core point and the adjacent points with the density reaching the core point into the same cluster, and setting a cluster identification;
obtaining the second point set from the data point set with the class cluster identification; wherein the second set of points comprises m class clusters, each class cluster comprising n points, m >0, n > 0.
Specifically, the spatial clustering in the embodiment of the present invention specifically includes the following steps:
firstly, adding a cluster identification field clusterID to the first point set D1, initializing all cluster identifications to-1, indicating no classification, and initializing a parameter minimum point number parameter MinPts and a field radius parameter Nr
Traversing the first point set D1 according to the minimum point number parameter MinPts and the domain radius parameter NrJudging whether each data point in D1 is a core point, if any data point is a core point, adding it into the core point data set Dc(ii) a Otherwise, judging the next data point;
traverse the set of core point data DcJudging whether each core point is identified as a class cluster, and if so, judging the next core point; if any core point is not identified, traversing the adjacent points of the core point, acquiring the adjacent points with the density reaching the core point, adding the core point and the adjacent points with the density reaching the core point into the same cluster, and setting a cluster identification;
obtaining the second point set D2 from the data point set with the class cluster identification; wherein the second point set D2 includes m class clusters, each class cluster including n points, m>0,n>0, i.e. the second set of points, can be represented as: d2 ═ P1,P2,P3,……,PmThe kth class cluster can be represented as
Figure BDA0002530199350000101
The ith point in the kth cluster class can be represented as
Figure BDA0002530199350000102
1≤k≤m,1≤i≤n。
In a preferred embodiment, the calculating the geometric barycentric coordinate and the weight of each cluster in the second point set to obtain a third point set specifically includes:
traversing the point set of each cluster type in the second point set;
calculating the geometric barycentric coordinates and the weight of each cluster to obtain the third point set; the calculation formula of the geometric barycentric coordinate and the weight of each cluster is as follows:
Figure BDA0002530199350000103
wherein the content of the first and second substances,
Figure BDA0002530199350000104
as the abscissa of the geometric center of gravity of the kth cluster class,
Figure BDA0002530199350000105
as the ordinate of the geometric center of gravity of the kth cluster class,
Figure BDA0002530199350000106
is the weight of the kth class cluster, n is the number of points of the kth class cluster,
Figure BDA0002530199350000107
is the abscissa of the ith point of the kth cluster class,
Figure BDA0002530199350000108
is the ordinate of the ith point of the kth cluster class,
Figure BDA0002530199350000109
is the weight of the ith point of the kth class cluster, k>0,n>0,1≤i≤n。
It should be noted that, in order to more accurately express the density distribution and the aggregation degree of the samples after spatial clustering, the embodiment of the present invention further calculates the geometric barycentric coordinates and the weights of the same cluster as D2 in the second point set.
The calculation method of the geometric barycentric coordinates and the weights of each cluster comprises the following steps:
traversing the point set of the same class cluster in the second point set D2, wherein the kth class cluster is represented as
Figure BDA0002530199350000111
Wherein any point is represented as
Figure BDA0002530199350000112
Calculating the geometric barycentric coordinates and weights of each cluster, setting as
Figure BDA0002530199350000113
Wherein the content of the first and second substances,
Figure BDA0002530199350000114
the third set of points D3 is finally obtained, wherein the third set of points includes the geometric barycentric coordinates and weights of each cluster type, i.e., D3 ═ p1,p2,p3,……,pmAt any point denoted pi=(xi,yi,wi)。
Each point of the third point set D3 has a coordinate value and a weight value, and the server converts the coordinate value and the weight value into standard GeoJSON format data and returns the standard GeoJSON format data to the client, so that the method can be widely applied to various front-end tools.
The client side of the embodiment of the invention uses the Openlayers front-end framework, updates the data source and refreshes the map by receiving the returned data, and can generate the thermodynamic diagram in real time in any selected time range and space range to obtain the result of the interactive thermodynamic diagram.
Compared with the prior art, the thermodynamic diagram generation method provided by the embodiment of the invention has the beneficial effects that: the time range and the space range are obtained by analyzing the space-time constraint parameters, and data can be filtered according to the use requirements of users to form a universal and easy-to-use interactive thermodynamic diagram generation mode; the server side carries out clustering analysis on the sample data by using a density-based DBSCAN spatial clustering algorithm, clusters according to the density degree of sample data distribution, divides areas with high density into the same type of clusters, visually reflects the distribution condition of the samples, uses the aggregated point set to represent points required by thermodynamic diagram rendering, greatly reduces the data volume, directly calculates and generates in the server side, reduces the rendering pressure of the client side, greatly improves the user experience, can accurately reflect the aggregation degree of the sample data, and efficiently realizes the visualization effect of the thermodynamic diagram; the final analysis result data is converted into a GeoJSON format, the data format is unified, data exchange and interoperation are facilitated, the method can be widely applied to front-end visual frameworks such as Openlayers, Echarts and Mapbox, and the method has strong universality.
It should be understood that all or part of the processes in the above-described thermodynamic diagram generation method may be implemented by a computer program, which may be stored in a computer-readable storage medium, and may be executed by a processor to implement the steps of the thermodynamic diagram generation method. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, etc. It should be noted that the computer readable storage medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable storage media that does not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
Fig. 3 is a schematic structural diagram of a preferred embodiment of a thermodynamic diagram generation apparatus according to the present invention, which is capable of implementing all the processes of the thermodynamic diagram generation method in any of the above embodiments.
As shown in fig. 3, the apparatus includes:
the client comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a thermodynamic diagram generation request initiated by a client; wherein the thermodynamic diagram generation request comprises a temporal constraint parameter and a spatial constraint parameter;
the analysis module is used for analyzing the thermodynamic diagram generation request to obtain an analysis result; the analysis result comprises a time parameter corresponding to the time constraint parameter and a space parameter corresponding to the space constraint parameter;
the processing module is used for carrying out data processing on the space point data of the server according to the analysis result to obtain thermodynamic diagram data;
and the sending module is used for sending the thermodynamic diagram data to the client so that the client generates thermodynamic diagrams according to the thermodynamic diagram data.
Specifically, when a client initiates a thermodynamic diagram generation request, a receiving module of a server receives the thermodynamic diagram generation request initiated by the client, an analysis module analyzes the thermodynamic diagram generation request to obtain an analysis result, a processing module performs data processing on time-space point data according to the analysis result to obtain thermodynamic diagram data, and a sending module sends the thermodynamic diagram data to the client.
The thermodynamic diagram generation request initiated by the client includes a time constraint parameter and a space constraint parameter of the thermodynamic diagram which needs to be generated at this time. It is to be understood that the thermodynamic diagram generation request may include both the temporal constraint parameter and the spatial constraint parameter; or only time constraint parameters; or only the spatial constraint parameters.
Correspondingly, the analysis result obtained by the analysis module comprises a time parameter corresponding to the time constraint parameter of the thermodynamic diagram required to be generated at this time and a space parameter corresponding to the space constraint parameter of the thermodynamic diagram required to be generated at this time.
Preferably, the time constraint parameter is a time period including a start time and an end time, or a specified time; the space constraint parameters are polygons described by the WKT format.
Wherein, in the thermodynamic diagram generation request initiated by the client, the time constraint parameter is defined as: timeframe ═ Ts-Te,TsDenotes the starting time, TeRepresents the termination time; or, the time constraint parameter is defined as: timeframe ═ Ta,TaIndicating a specified time of day.
The spatial constraint parameter is defined as: WKTPolygon ═ POLYGON ((a, B, C.)), WKTPolygon representing a POLYGON described in the WKT format, and A, B, C representing vertices of the POLYGON.
Preferably, the parsing module parses the thermodynamic diagram generation request based on an HTTP standard request protocol specification, and an obtained parsing result is represented by a binary group.
Preferably, the processing module specifically includes:
the screening unit is used for screening the spatial point data of the server according to the time parameter and the spatial parameter in the analysis result to obtain a first point set;
the clustering unit is used for carrying out spatial clustering on the first point set to obtain a second point set;
the calculating unit is used for calculating the geometric barycentric coordinates and the weight of each cluster in the second point set to obtain a third point set;
and the conversion unit is used for converting the third point set into a standard GeoJSON format to obtain the thermodynamic diagram data.
Preferably, the screening unit is specifically configured to:
traversing the space point data of the server according to the time parameter and the space parameter in the analysis result;
and screening out the spatial point data meeting the time parameter and the spatial parameter in the analysis result to obtain the first point set.
Preferably, the clustering unit is specifically configured to:
and performing spatial clustering on the first point set according to a DBSCAN algorithm to obtain the second point set.
Further, the spatially clustering the first point set according to the DBSCAN algorithm to obtain the second point set specifically includes:
adding a cluster identification field to the first point set, initializing all cluster identifications, and initializing a minimum point number parameter and a field radius parameter;
traversing the first point set, judging whether the data points in the first point set are core points according to the minimum point number parameter and the field radius parameter, and if the data points in the first point set are core points, adding the core point data set; if not, judging the next data point;
traversing the core point data set, judging whether the core points in the core point data set are identified as a cluster, and if so, judging the next core point; if not, traversing the adjacent points of the core point, acquiring the adjacent points with the density reaching the core point, adding the core point and the adjacent points with the density reaching the core point into the same cluster, and setting a cluster identifier;
obtaining the second point set from the point set with the class cluster identification; wherein the second set of points comprises m class clusters, each class cluster comprising n points, m >0, n > 0.
Preferably, the computing unit is specifically configured to:
traversing the point set of each cluster type in the second point set;
calculating the geometric barycentric coordinates and the weight of each cluster to obtain the third point set; the calculation formula of the geometric barycentric coordinate and the weight of each cluster is as follows:
Figure BDA0002530199350000151
wherein the content of the first and second substances,
Figure BDA0002530199350000152
as the abscissa of the geometric center of gravity of the kth cluster class,
Figure BDA0002530199350000153
as the ordinate of the geometric center of gravity of the kth cluster class,
Figure BDA0002530199350000154
is the weight of the kth class cluster, n is the number of points of the kth class cluster,
Figure BDA0002530199350000155
is the abscissa of the ith point of the kth cluster class,
Figure BDA0002530199350000156
is the ordinate of the ith point of the kth cluster class,
Figure BDA0002530199350000157
is the weight of the ith point of the kth class cluster, k>0,n>0,1≤i≤n。
According to the thermodynamic diagram generation device provided by the embodiment of the invention, the time range and the space range are obtained by analyzing the time-space constraint parameters, data can be filtered according to the use requirements of users, and a universal and easy-to-use interactive thermodynamic diagram generation mode is formed; the method comprises the steps of performing clustering analysis on sample data by using a density-based DBSCAN spatial clustering algorithm, clustering according to the density degree of sample data distribution, dividing areas with high density into the same type of clusters, reflecting the distribution condition of the samples visually, representing points required by thermodynamic diagram rendering by using a aggregated point set, greatly reducing the data volume, directly calculating and generating at a server, reducing the rendering pressure of a client, improving the user experience to a greater extent, accurately reflecting the aggregation degree of the sample data, and efficiently realizing the visualization effect of the thermodynamic diagram; the final analysis result data is converted into a GeoJSON format, the data format is unified, data exchange and interoperation are facilitated, the method can be widely applied to front-end visual frameworks such as Openlayers, Echarts and Mapbox, and the method has strong universality.
Fig. 4 is a schematic structural diagram of a preferred embodiment of a terminal device provided by the present invention, where the terminal device is capable of implementing all the processes of the thermodynamic diagram generation method in any of the above embodiments.
As shown in fig. 4, the terminal device includes a processor, a memory; wherein a computer program is stored in the memory, the computer program being configured to be executed by the processor and when executed to implement the thermodynamic diagram generation method in any of the above embodiments.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used for describing the execution process of the computer program in the terminal device.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory may be used for storing the computer programs and/or modules, and the processor may implement various functions of the terminal device by executing or executing the computer programs and/or modules stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
It should be noted that the terminal device includes, but is not limited to, a processor and a memory, and those skilled in the art will understand that the structural diagram of fig. 4 is only an example of the terminal device, and does not constitute a limitation to the terminal device, and may include more components than those shown in the drawings, or may combine some components, or may be different components.
The terminal equipment provided by the embodiment of the invention can dynamically screen the space-time data according to the given space-time constraint parameters and generate the thermodynamic diagram in real time.
The above description is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and it should be noted that, for those skilled in the art, several equivalent obvious modifications and/or equivalent substitutions can be made without departing from the technical principle of the present invention, and these obvious modifications and/or equivalent substitutions should also be regarded as the scope of the present invention.

Claims (10)

1. A method of generating a thermodynamic diagram, the method comprising:
receiving a thermodynamic diagram generation request initiated by a client; wherein the thermodynamic diagram generation request comprises a temporal constraint parameter and a spatial constraint parameter;
analyzing the thermodynamic diagram generation request to obtain an analysis result; the analysis result comprises a time parameter corresponding to the time constraint parameter and a space parameter corresponding to the space constraint parameter;
performing data processing on the spatial point data of the server according to the analysis result to obtain thermodynamic diagram data;
and sending the thermodynamic diagram data to the client, so that the client generates thermodynamic diagrams according to the thermodynamic diagram data.
2. The thermodynamic diagram generation method according to claim 1, wherein the performing data processing on the spatial point data of the server according to the analysis result to obtain thermodynamic diagram data specifically includes:
screening the spatial point data of the server according to the time parameter and the spatial parameter in the analysis result to obtain a first point set;
performing spatial clustering on the first point set to obtain a second point set;
calculating the geometric barycentric coordinates and the weight of each cluster in the second point set to obtain a third point set;
and converting the third point set into a standard GeoJSON format to obtain the thermodynamic diagram data.
3. The thermodynamic diagram generation method according to claim 2, wherein the filtering spatial point data of the server according to the time parameter and the spatial parameter in the analysis result to obtain the first point set specifically includes:
traversing the space point data of the server according to the time parameter and the space parameter in the analysis result;
and screening out the spatial point data meeting the time parameter and the spatial parameter from the spatial point data to obtain the first point set.
4. The thermodynamic diagram generation method according to claim 2, wherein the spatial clustering is performed on the first point set to obtain a second point set, specifically:
and performing spatial clustering on the first point set according to a DBSCAN algorithm to obtain the second point set.
5. The thermodynamic diagram generation method according to claim 4, wherein the spatial clustering is performed on the first point set according to a DBSCAN algorithm to obtain the second point set, specifically including:
adding a cluster identification field to the first point set, initializing all cluster identifications, and initializing a minimum point number parameter and a field radius parameter;
traversing the first point set, judging whether each data point in the first point set is a core point according to the minimum point number parameter and the field radius parameter, and if any data point is the core point, adding the core point data set;
traversing the core point data set, and judging whether each core point in the core point data set is identified as a cluster; if any core point is not identified, traversing the adjacent points of the core point, acquiring the adjacent points with the density reaching the core point, adding the core point and the adjacent points with the density reaching the core point into the same cluster, and setting a cluster identification;
obtaining the second point set from the data point set with the class cluster identification; wherein the second set of points comprises m class clusters, each class cluster comprising n points, m >0, n > 0.
6. The thermodynamic diagram generation method according to claim 2, wherein the calculating the geometric barycentric coordinates and the weight of each cluster in the second point set to obtain a third point set specifically includes:
traversing the point set of each cluster type in the second point set;
calculating the geometric barycentric coordinates and the weight of each cluster to obtain the third point set; the calculation formula of the geometric barycentric coordinate and the weight of each cluster is as follows:
Figure FDA0002530199340000031
wherein the content of the first and second substances,
Figure FDA0002530199340000032
as the abscissa of the geometric center of gravity of the kth cluster class,
Figure FDA0002530199340000033
as the ordinate of the geometric center of gravity of the kth cluster class,
Figure FDA0002530199340000034
is the weight of the kth class cluster, n is the number of points of the kth class cluster,
Figure FDA0002530199340000035
is the abscissa of the ith point of the kth cluster class,
Figure FDA0002530199340000036
is the ordinate of the ith point of the kth cluster class,
Figure FDA0002530199340000037
is the weight of the ith point of the kth class cluster, k>0,n>0,1≤i≤n。
7. The thermodynamic diagram generation method according to claim 1, wherein the time constraint parameter is a time period including a start time and an end time, or a specified time;
the space constraint parameters are polygons described by the WKT format.
8. An apparatus for generating a thermodynamic diagram, the apparatus comprising:
the client comprises a receiving module, a sending module and a receiving module, wherein the receiving module is used for receiving a thermodynamic diagram generation request initiated by a client; wherein the thermodynamic diagram generation request comprises a temporal constraint parameter and a spatial constraint parameter;
the analysis module is used for analyzing the thermodynamic diagram generation request to obtain an analysis result; the analysis result comprises a time parameter corresponding to the time constraint parameter and a space parameter corresponding to the space constraint parameter;
the processing module is used for carrying out data processing on the space point data of the server according to the analysis result to obtain thermodynamic diagram data;
and the sending module is used for sending the thermodynamic diagram data to the client so that the client generates thermodynamic diagrams according to the thermodynamic diagram data.
9. A computer-readable storage medium, having stored thereon a computer program which, when executed, implements the thermodynamic diagram generation method according to any one of claims 1 to 7.
10. A terminal device comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the computer program when executed by the processor implementing the thermodynamic diagram generation method as claimed in any one of claims 1 to 7.
CN202010520400.0A 2020-06-09 2020-06-09 Thermodynamic diagram generation method and device, storage medium and equipment Pending CN111881930A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010520400.0A CN111881930A (en) 2020-06-09 2020-06-09 Thermodynamic diagram generation method and device, storage medium and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010520400.0A CN111881930A (en) 2020-06-09 2020-06-09 Thermodynamic diagram generation method and device, storage medium and equipment

Publications (1)

Publication Number Publication Date
CN111881930A true CN111881930A (en) 2020-11-03

Family

ID=73157925

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010520400.0A Pending CN111881930A (en) 2020-06-09 2020-06-09 Thermodynamic diagram generation method and device, storage medium and equipment

Country Status (1)

Country Link
CN (1) CN111881930A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN112965650A (en) * 2021-03-12 2021-06-15 平安国际智慧城市科技股份有限公司 Thermodynamic diagram visualization method and system and computer equipment
CN113011520A (en) * 2021-04-01 2021-06-22 成都九洲迪飞科技有限责任公司 Radar data filtering method based on thermodynamic diagram and graph theory clustering
CN113010626A (en) * 2021-04-27 2021-06-22 威创集团股份有限公司 Thermodynamic diagram generation method, device, equipment and storage medium
CN113010829A (en) * 2021-03-31 2021-06-22 建信金融科技有限责任公司 Data partition visualization method and device, computer equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108564226A (en) * 2018-04-25 2018-09-21 哈尔滨工业大学 A kind of public bus network optimization method based on taxi GPS and mobile phone signaling data
CN108959466A (en) * 2018-06-20 2018-12-07 淮阴工学院 Taxi hot spot method for visualizing and system based on BCS-DBSCAN
CN110851741A (en) * 2019-11-09 2020-02-28 郑州天迈科技股份有限公司 Taxi passenger carrying hot spot identification recommendation algorithm

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108564226A (en) * 2018-04-25 2018-09-21 哈尔滨工业大学 A kind of public bus network optimization method based on taxi GPS and mobile phone signaling data
CN108959466A (en) * 2018-06-20 2018-12-07 淮阴工学院 Taxi hot spot method for visualizing and system based on BCS-DBSCAN
CN110851741A (en) * 2019-11-09 2020-02-28 郑州天迈科技股份有限公司 Taxi passenger carrying hot spot identification recommendation algorithm

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
柴壮壮: "《出租车轨迹数据的挖掘与可视化》", 《中国优秀博硕士学位论文全文数据库(硕士)工程科技Ⅱ辑》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN112965650A (en) * 2021-03-12 2021-06-15 平安国际智慧城市科技股份有限公司 Thermodynamic diagram visualization method and system and computer equipment
CN113010829A (en) * 2021-03-31 2021-06-22 建信金融科技有限责任公司 Data partition visualization method and device, computer equipment and storage medium
CN113010829B (en) * 2021-03-31 2023-01-20 中国建设银行股份有限公司 Data partition visualization method and device, computer equipment and storage medium
CN113011520A (en) * 2021-04-01 2021-06-22 成都九洲迪飞科技有限责任公司 Radar data filtering method based on thermodynamic diagram and graph theory clustering
CN113010626A (en) * 2021-04-27 2021-06-22 威创集团股份有限公司 Thermodynamic diagram generation method, device, equipment and storage medium
CN113010626B (en) * 2021-04-27 2023-12-05 威创集团股份有限公司 Thermodynamic diagram generation method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN111881930A (en) Thermodynamic diagram generation method and device, storage medium and equipment
CN110413812B (en) Neural network model training method and device, electronic equipment and storage medium
WO2023160513A1 (en) Rendering method and apparatus for 3d material, and device and storage medium
US11798181B2 (en) Method and system for location detection of photographs using topographic techniques
CN110618982A (en) Multi-source heterogeneous data processing method, device, medium and electronic equipment
CN113902061A (en) Point cloud completion method and device
CN110349161A (en) Image partition method, device, electronic equipment and storage medium
WO2023103999A1 (en) 3d target point rendering method and apparatus, and device and storage medium
CN114004905B (en) Method, device, equipment and storage medium for generating character style pictogram
CN113505896A (en) Longitudinal federated learning modeling optimization method, apparatus, medium, and program product
CN108228904B (en) Method and apparatus for outputting information
JP7324891B2 (en) Backbone network generation method, apparatus, electronic equipment, storage medium and computer program
CN109493423B (en) Method and device for calculating midpoint positions of two points on surface of three-dimensional earth model
CN116561240A (en) Electronic map processing method, related device and medium
CN113706663B (en) Image generation method, device, equipment and storage medium
JP2022126818A (en) Method and apparatus of processing security information, electronic device, storage medium, and computer program
CN112612427B (en) Vehicle stop data processing method and device, storage medium and terminal
CN114862720A (en) Canvas restoration method and device, electronic equipment and computer readable medium
CN112905792A (en) Text clustering method, device and equipment based on non-text scene and storage medium
WO2024031999A1 (en) Image layering method and apparatus, electronic device, and storage medium
WO2015035129A2 (en) Rendering engine for multi-dimensional tracking, reconstruction and mapping
CN111526054B (en) Method and device for acquiring network
CN110650239A (en) Image processing method, image processing device, computer equipment and storage medium
CN112991415B (en) Depth information determining method, device, electronic equipment and storage medium
CN117654029A (en) Virtual scene display method, device, medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20201103