CN118332147A - Multi-layer pattern spot data difference comparison method and device and electronic equipment - Google Patents

Multi-layer pattern spot data difference comparison method and device and electronic equipment Download PDF

Info

Publication number
CN118332147A
CN118332147A CN202410775584.3A CN202410775584A CN118332147A CN 118332147 A CN118332147 A CN 118332147A CN 202410775584 A CN202410775584 A CN 202410775584A CN 118332147 A CN118332147 A CN 118332147A
Authority
CN
China
Prior art keywords
data
layer
difference comparison
spot data
layer pattern
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
CN202410775584.3A
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.)
Fullsee Technology Co ltd
Original Assignee
Fullsee Technology Co ltd
Filing date
Publication date
Application filed by Fullsee Technology Co ltd filed Critical Fullsee Technology Co ltd
Publication of CN118332147A publication Critical patent/CN118332147A/en
Pending legal-status Critical Current

Links

Abstract

The disclosure provides a difference comparison method and device for multi-layer pattern spot data and electronic equipment, and relates to the technical field of geographic information, wherein the method comprises the following steps: receiving a multi-layer image spot data compression file uploaded by a user, and receiving a difference comparison type selected by the user, wherein the multi-layer image spot data compression file is a plurality of vector image layers; converting the data format of the multi-layer pattern spot data compression file into a unified format, and storing the converted multi-layer pattern spot data into a spatial database, wherein the spatial database comprises PostGIS; and obtaining converted multi-layer pattern spot data from the spatial database, and comparing the differences among the converted multi-layer pattern spot data according to the difference comparison type by utilizing a space-time data processing framework to obtain a difference comparison result, wherein the space-time data processing framework comprises GeoMesa. The method reduces the calculated amount of the contrast multi-layer image spot data difference, improves the speed of the contrast multi-layer image spot data difference, and reduces the time of the contrast multi-layer image spot data difference.

Description

Multi-layer pattern spot data difference comparison method and device and electronic equipment
Technical Field
The disclosure relates to the technical field of geographic information, in particular to a difference comparison method and device for multi-layer map spot data and electronic equipment.
Background
With the deep advancement of urban construction, the important role of homeland space planning is gradually reflected, and how to reasonably plan the space of urban construction, basic farmland, water source area and the like becomes the base point of modern construction. The map spot difference comparison analysis compares two different national land planning map spots, and can intuitively analyze the change condition of various functional land spaces through the conflict map spots, so as to provide guidance for the next planning.
When the related technology performs the contrast analysis of the image spots, the image spot data in a plurality of vector image layers are converted into a map set, and each image spot data in one image layer is used for sequentially comparing and marking with all image spot data in the other image layer until all image spot data in one image layer are traversed; however, the cartesian product generated by this comparison method is relatively large, so that the difference between the map spots of the whole map layer can take a lot of time, a few hours and a dozen hours more.
Aiming at the problems of large calculated amount and long time consumption of the contrast analysis of the pattern spot difference in the related technology, no effective technical solution is proposed at present.
Disclosure of Invention
The main purpose of the present disclosure is to provide a method, an apparatus and an electronic device for comparing differences of multi-layer image spot data, so as to solve the problems of large calculation amount and long time consumption in image spot difference comparison analysis in the related art.
To achieve the above object, a first aspect of the present disclosure provides a method for comparing differences between multi-layer patch data, including:
receiving a multi-layer image spot data compression file uploaded by a user, and receiving a difference comparison type selected by the user, wherein the multi-layer image spot data compression file comprises a plurality of vector image layers, the data format of the multi-layer image spot data compression file comprises SHAPEFILE, GDB and mdb, and the difference comparison type comprises erasure, cross-merging, cross-inverting, topology and buffer;
Converting the data format of the multi-layer pattern spot data compression file into a unified format, and storing the converted multi-layer pattern spot data into a spatial database, wherein the spatial database comprises PostGIS;
Obtaining converted multi-layer pattern spot data from a spatial database, and comparing differences among the converted multi-layer pattern spot data according to a difference comparison type by utilizing a space-time data processing frame to obtain a difference comparison result, wherein the space-time data processing frame comprises GeoMesa; and
And storing the difference comparison result into a spatial database, and displaying the difference comparison result to a user.
Optionally, the number of the vector layer patch data compression files is 2, each vector layer patch data compression file contains a plurality of data files in different formats, and each data file contains a plurality of pieces of data with data numbers;
the method for converting the data format of the multi-layer pattern spot data compression file into a unified format and storing the converted multi-layer pattern spot data into a space database comprises the following steps:
Extracting each piece of data in each data file one by one according to the corresponding relation of the data numbers in each data file, and merging the extracted pieces of data into one piece of complete data;
converting the format of the complete data into a unified format by using a conversion tool, wherein the conversion tool comprises a geospatial data abstraction library;
and storing the multi-layer pattern spot data in the uniform format after conversion into the spatial database according to a spatial data table structure defined in the spatial database.
Further, converting, with a conversion tool, the format of the complete data into a unified format, including:
converting the format of the complete data into GeoJson format by using a geospatial data abstraction library; or (b)
The format of the complete data is converted to xml format using a geospatial data abstraction library.
Optionally, comparing differences between the converted multi-layer patch data according to a difference comparison type by using a space-time data processing framework to obtain a difference comparison result, including:
Using a space-time data processing frame, configuring a data source into a corresponding data table in a spatial database, and loading multi-layer pattern spot data of differences to be compared from the spatial database;
Converting map coordinate systems of different codes used by multi-layer map spot data into a uniformly-coded map coordinate system by using a conversion tool, wherein the uniformly-coded map coordinate system takes an endpoint of a lower left corner of a page as an origin, and the right direction in the page is an X-axis forward direction and the upward direction is a Y-axis forward direction;
Determining an X-axis direction minimum value, an X-axis direction maximum value, a Y-axis direction minimum value and a Y-axis direction maximum value of multi-layer map spot data under a uniformly coded map coordinate system by a big data processing engine, and constructing a rectangular frame, wherein the big data processing engine comprises Spark;
according to the size of the rectangular frame, uniformly dividing the rectangular frame into a plurality of grids with equal size in an equidistant mode;
And calling an application program interface to set parallel lines through the big data processing engine, and sequentially comparing each piece of pattern spot data in the grid in the first layer with all pieces of pattern spot data in the corresponding position grid in the second layer according to the difference comparison type to obtain a difference comparison result.
Further, assuming that the minimum value in the X-axis direction of the multi-layer patch data is X min, the maximum value in the X-axis direction is X max, the minimum value in the Y-axis direction is Y min, and the maximum value in the Y-axis direction is Y max, then: the length X frame=Xmax-Xmin of the rectangular frame in the X axis direction and the length Y frame=Ymax-Ymin of the rectangular frame in the Y axis direction;
Wherein, according to the size of rectangle frame, adopt the equidistant mode to evenly divide into the grid that a plurality of sizes are equal with the rectangle frame, include:
the X-axis direction spacing of each grid is determined according to the following formula And Y-axis direction spacing
Wherein GridNum is the number of divided grids, the value is 9 or 16, when the area of the rectangular frame is smaller than the preset threshold, the number of grids is 9, and when the area of the rectangular frame is larger than or equal to the preset threshold, the number of grids is 16.
Further, according to the difference comparison type, sequentially comparing each piece of image spot data in the grid in the first image layer with all pieces of image spot data in the grid at the corresponding position in the second image layer to obtain a difference comparison result, including:
According to AndAll patch data in each grid within each layer is determined, wherein,The abscissa of the ith patch data,The ordinate of the ith spot data is positive integer, the value of j is determined by the divided grid number, when the grid number is 9, the value of j is {1,2,3}, and when the grid number is 16, the value of j is {1,2,3,4};
Adding all the image spot data in each grid in the first image layer to a first map set, and adding all the image spot data in each grid in the second image layer to a second map set;
judging whether position intersection exists between the image spot data in the first map set and the image spot data in the second map set;
If so, marking out the image spot data with the position intersection, calling a corresponding application program interface according to the difference comparison type selected by the user, and determining a difference comparison result;
if not, continuing to traverse backwards, and repeatedly executing judgment.
Optionally, after receiving the user selected difference contrast type, the method further comprises:
Creating a difference comparison task corresponding to the difference comparison type, and adding the difference comparison task to a task list;
before presenting the difference comparison result to the user, the method further comprises:
responding to a query request of a user for a result corresponding to the difference comparison task in the task list.
A second aspect of the present disclosure provides a difference contrast apparatus for multi-layer patch data, comprising:
the receiving unit is used for receiving the multi-layer image spot data compression file uploaded by the user and receiving a difference comparison type selected by the user, wherein the multi-layer image spot data compression file comprises data formats of SHAPEFILE, GDB and mdb, and the difference comparison type comprises erasure, cross merging, cross inverting, topology and buffer;
The conversion unit is used for converting the data format of the multi-layer pattern spot data compression file into a unified format and storing the converted multi-layer pattern spot data into a spatial database, wherein the spatial database comprises PostGIS;
The comparison unit is used for acquiring the converted multi-layer pattern spot data from the spatial database, and comparing the differences among the converted multi-layer pattern spot data according to the difference comparison type by utilizing a space-time data processing frame to obtain a difference comparison result, wherein the space-time data processing frame comprises GeoMesa; and
And the display unit is used for storing the difference comparison result into the spatial database and displaying the difference comparison result to a user.
A third aspect of the present disclosure provides a computer-readable storage medium storing computer instructions for causing a computer to perform the difference contrast method of multi-layer patch data provided in any one of the first aspects.
A fourth aspect of the present disclosure provides an electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor to cause the at least one processor to perform the method of contrast of multi-layer plaque data provided in any of the first aspects.
In the difference comparison method of multi-layer image spot data provided by the embodiment of the disclosure, a multi-layer image spot data compression file uploaded by a user is received, and a difference comparison type selected by the user is received, wherein the multi-layer image spot data compression file is a plurality of vector image layers, the data format of the multi-layer image spot data compression file comprises SHAPEFILE, GDB and mdb, and the difference comparison type comprises erasure, cross-merging, cross-inverting, topology and buffer; converting the data format of the multi-layer pattern spot data compression file into a unified format, and storing the converted multi-layer pattern spot data into a spatial database, wherein the spatial database comprises PostGIS; the data format of the multi-layer pattern spot data compression file is converted into a unified format, so that the difference between the multi-layer pattern spot data can be conveniently compared, and the data processing is convenient;
Obtaining converted multi-layer pattern spot data from a spatial database, and comparing differences among the converted multi-layer pattern spot data according to a difference comparison type by utilizing a space-time data processing frame to obtain a difference comparison result, wherein the space-time data processing frame comprises GeoMesa; and storing the difference comparison result into a spatial database, and displaying the difference comparison result to a user. The space-time data processing framework GeoMesa is utilized to compare the differences among the converted multi-layer pattern spot data, so that the calculated amount of comparing the pattern spot data differences of a plurality of vector layers is reduced, the speed of comparing the pattern spot data differences of the vector layers is improved, the pattern spot data differences of the vector layers are compared for only half an hour, the time consumed in comparing the pattern spot differences of the vector layers is obviously reduced, and the problems of larger calculated amount and longer time consumed in comparing and analyzing the pattern spot differences in the related art are solved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the related art, the drawings that are required to be used in the description of the embodiments or the related art will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present disclosure, and other drawings may be obtained according to the drawings without inventive effort to those of ordinary skill in the art.
FIG. 1 is a flow chart of a method for comparing differences between multi-layer patch data according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a method for comparing differences between multi-layer patch data according to an embodiment of the present disclosure;
FIG. 3 is a diagram of a difference versus result for a page display provided by an embodiment of the present disclosure;
FIG. 4 is a block diagram of a device for comparing differences between multi-layer patch data according to an embodiment of the present disclosure;
fig. 5 is a block diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
In order that those skilled in the art will better understand the present disclosure, a technical solution in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present disclosure, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure, shall fall within the scope of the present disclosure.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate in order to describe the embodiments of the disclosure herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, without conflict, the embodiments of the present disclosure and features of the embodiments may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
With the deep advancement of urban construction, the important role of homeland space planning is gradually reflected, and how to reasonably plan the space of urban construction, basic farmland, water source area and the like becomes the base point of modern construction. The map spot difference comparison analysis compares two different national land planning map spots, and can intuitively analyze the change condition of various functional land spaces through the conflict map spots, so as to provide guidance for the next planning.
When the related technology performs the contrast analysis of the image spots, the image spot data in a plurality of vector image layers are converted into a map set, and each image spot data in one image layer is used for sequentially comparing and marking with all image spot data in the other image layer until all image spot data in one image layer are traversed; however, the cartesian product generated by this comparison method is relatively large, so that the difference between the map spots of the whole map layer can take a lot of time, a few hours and a dozen hours more.
In order to solve the above-mentioned problems, an embodiment of the present disclosure provides a method for comparing differences between multi-layer patch data, as shown in fig. 1, the method includes the following steps S11 to S14:
step S11: receiving a multi-layer image spot data compression file uploaded by a user and receiving a difference comparison type selected by the user, wherein the multi-layer image spot data compression file comprises a plurality of vector image layers, the data format of the multi-layer image spot data compression file comprises SHAPEFILE, GDB and mdb, and the difference comparison type comprises space modification, deletion, intersection merging, intersection negation, topology and buffer;
Step S12: converting the data format of the multi-layer pattern spot data compression file into a unified format, and storing the converted multi-layer pattern spot data into a spatial database, wherein the spatial database comprises PostGIS; postGIS is an object-relational database management system dedicated to storing pattern data, storing pattern data in a key value pair;
in an optional embodiment of the present disclosure, the number of the vector layer patch data compression files is 2, each vector layer patch data compression file includes a plurality of data files with different formats, and each data file includes a plurality of data with data numbers; the default number of the layers or the vector layers is 2, the default number of the vector layer pattern spot data compressed files is 2, and each compressed file comprises a plurality of data files in different formats;
For example, the shapefile includes a shp file, a shx file, a dbf file, a prj file, etc., wherein the shp file is used for storing vector map data, and recording spatial position information of each element; the shx file is an index file and is used for storing the positions of elements in the shp file, so that the data access speed is increased; the dbf file is used for storing attribute information of vector data, such as information of names, types and the like of each point on a map; prj is a map coordinate system file for storing map projection information.
Wherein, step S12 includes:
Extracting each piece of data in each data file one by one according to the corresponding relation of the data numbers in each data file, and merging the extracted pieces of data into one piece of complete data;
Converting the format of the complete data into a unified format by using a conversion tool, wherein the conversion tool comprises a geospatial data abstraction library; a geospatial data abstraction library (Geospatial Data Abstraction Library, abbreviated GDAL) uses an abstract data model to express various supported file formats, and uses a series of commands to perform data conversion and processing, thereby implementing efficient processing of raster and vector data;
and storing the multi-layer pattern spot data in the uniform format after conversion into the spatial database according to a spatial data table structure defined in the spatial database.
In a preferred embodiment of the present disclosure, converting the format of the complete data to a unified format using a conversion tool includes:
converting the format of the complete data into GeoJson format by using a geospatial data abstraction library; or (b)
The format of the complete data is converted to xml format using a geospatial data abstraction library.
Converting the format of the complete data into a required unified format by using a conversion tool, wherein the unified format can be GeoJson format or xml format; the data format of the multi-layer pattern spot data compression file is converted into a unified format and then stored in the spatial database, so that the difference between the multi-layer pattern spot data can be conveniently compared, and the data processing is convenient.
Step S13: obtaining converted multi-layer pattern spot data from a spatial database, and comparing differences among the converted multi-layer pattern spot data according to a difference comparison type by utilizing a space-time data processing frame to obtain a difference comparison result, wherein the space-time data processing frame comprises GeoMesa; geoMesa is an open-source, distributed computing system-based tool pack for massive spatio-temporal data query and analysis.
According to the embodiment of the disclosure, the space-time data processing framework GeoMesa is utilized to compare the differences among the converted multi-layer pattern spot data, so that the calculated amount of comparing the multi-vector layer pattern spot data differences is reduced, the speed of comparing the multi-vector layer pattern spot data differences is improved, the multi-vector layer pattern spot data differences are compared for only half an hour, the time consumed in comparing the multi-vector layer pattern spot differences is obviously reduced, and the problems of larger calculated amount and longer time consumption in the comparison analysis of the pattern spot differences in the related art are solved.
In an alternative embodiment of the present disclosure, the comparing, by using the spatiotemporal data processing framework in step S13, the differences between the converted multi-layer patch data according to the difference comparison type to obtain a difference comparison result includes:
Using a space-time data processing frame, configuring a data source into a corresponding data table in a spatial database, and loading multi-layer pattern spot data of differences to be compared from the spatial database;
Converting map coordinate systems of different codes used by multi-layer map spot data into a uniformly-coded map coordinate system by using a conversion tool, wherein the uniformly-coded map coordinate system takes an endpoint of a lower left corner of a page as an origin, and the right direction in the page is an X-axis forward direction and the upward direction is a Y-axis forward direction; the map coordinate system of unified coding is used for describing the position coordinates of the map spot data on the two-dimensional plane, the page is an interface displayed for a user, the X axis indicates the east-west direction, and the Y axis indicates the north-south direction; the uniformly encoded map coordinate system can be a national standard for mapping geographic information, and the position of the multi-layer map spot data and the map spot data can be prevented from being disordered during processing by converting the map coordinate systems with different encodings used by the multi-layer map spot data into the uniformly encoded map coordinate system.
Determining an X-axis direction minimum value, an X-axis direction maximum value, a Y-axis direction minimum value and a Y-axis direction maximum value of multi-layer map spot data under a uniformly coded map coordinate system by a big data processing engine, and constructing a rectangular frame, wherein the big data processing engine comprises Spark; spark provides a complete set of development application program interfaces (Application Programming Interface, abbreviated as API) supporting batch and stream processing;
according to the size of the rectangular frame, uniformly dividing the rectangular frame into a plurality of grids with equal size in an equidistant mode;
And calling an application program interface to set parallel lines through the big data processing engine, and sequentially comparing each piece of pattern spot data in the grid in the first layer with all pieces of pattern spot data in the corresponding position grid in the second layer according to the difference comparison type to obtain a difference comparison result. By sequentially comparing each piece of image spot data in the grid in the first image layer with all pieces of image spot data in the corresponding position grid in the second image layer, compared with the prior art of directly comparing all pieces of image spot data in the two image layers, the calculation amount for comparing the image spot data differences of the plurality of vector image layers is obviously reduced, the speed for comparing the image spot data differences of the plurality of vector image layers is improved, and the time consumed for comparing the image spot differences of the plurality of vector image layers is reduced.
GeoMesa configuring an integrated Spark calling API to construct a space geographic data environment, dividing a plurality of vector image layers into a plurality of grids with equal sizes in an equidistant mode according to the sizes of image layers or rectangular frames, and sequentially comparing and marking each piece of image spot data in the grid in one image layer with all pieces of image spot data in the corresponding position grid in the other image layer until all the grids in the image layer are traversed completely, so as to obtain a difference comparison result.
In a preferred embodiment of the present disclosure, assuming that the minimum value in the X-axis direction of the multi-layer patch data is X min, the maximum value in the X-axis direction is X max, the minimum value in the Y-axis direction is Y min, and the maximum value in the Y-axis direction is Y max, then: the length X frame=Xmax-Xmin of the rectangular frame in the X axis direction and the length Y frame=Ymax-Ymin of the rectangular frame in the Y axis direction;
Wherein, according to the size of rectangle frame, adopt the equidistant mode to evenly divide into the grid that a plurality of sizes are equal with the rectangle frame, include:
the X-axis direction spacing of each grid is determined according to the following formula And Y-axis direction spacing
Wherein GridNum is the number of divided grids, the value is 9 or 16, when the area of the rectangular frame is smaller than the preset threshold, the number of grids is 9, and when the area of the rectangular frame is larger than or equal to the preset threshold, the number of grids is 16. When the area of the rectangular frame is smaller than a preset threshold value, dividing the rectangular frame into 9 grids, wherein the length of the rectangular frame in the X-axis direction is 3 times of the spacing of the grids in the X-axis direction, and the length of the rectangular frame in the Y-axis direction is 3 times of the spacing of the rectangular frame in the Y-axis direction; when the area of the rectangular frame is larger than or equal to a preset threshold value, the rectangular frame is divided into 16 grids, the length of the rectangular frame in the X-axis direction is 4 times of the spacing of the grids in the X-axis direction, and the length of the rectangular frame in the Y-axis direction is 4 times of the spacing of the rectangular frame in the Y-axis direction.
The grid number is divided according to the size of the rectangular frame, the calculated amount and the amount of occupied resources are comprehensively considered, so that the number of the image spot data in each divided grid is moderate, and excessive system resources are not occupied while the calculated amount for comparing the image spot data differences of a plurality of vector image layers is reduced.
In a preferred embodiment of the present disclosure, according to a difference comparison type, comparing each piece of image spot data in the grid in the first image layer with all pieces of image spot data in the corresponding position grid in the second image layer in sequence to obtain a difference comparison result, including:
According to AndAll patch data in each grid within each layer is determined, wherein,The abscissa of the ith patch data,The ordinate of the ith spot data is positive integer, the value of j is determined by the divided grid number, when the grid number is 9, the value of j is {1,2,3}, and when the grid number is 16, the value of j is {1,2,3,4};
Adding all the image spot data in each grid in the first image layer to a first map set, and adding all the image spot data in each grid in the second image layer to a second map set;
Judging whether position intersection exists between the image spot data in the first map set and the image spot data in the second map set; judging whether the map spot data in the two map sets have position intersections or not, and comparing whether the two map layer map spot data have differences or not;
If so, marking out the image spot data with the position intersection, calling a corresponding application program interface according to the difference comparison type selected by the user, and determining a difference comparison result;
if not, continuing to traverse backwards, and repeatedly executing judgment.
Step S14: and storing the difference comparison result into a spatial database, and displaying the difference comparison result to a user.
In an alternative embodiment of the present disclosure, after receiving the difference contrast type selected by the user in step S11, the method further includes:
Creating a difference comparison task corresponding to the difference comparison type, and adding the difference comparison task to a task list;
before presenting the difference comparison result to the user in step S14, the method further comprises:
responding to a query request of a user for a result corresponding to the difference comparison task in the task list.
When a difference comparison task is newly established, receiving operation of a user on a front-end page, creating the difference comparison task and adding the difference comparison task to a task list; after the difference comparison result is stored in the spatial database, responding to a query request of a user for the result corresponding to the difference comparison task, and displaying the difference comparison result to the user through a front-end page.
A schematic diagram of a difference comparison method for multi-layer pattern spot data provided by the embodiment of the disclosure is shown in fig. 2, a user creates a difference comparison task or a difference analysis task on a front end page, converts the multi-layer pattern spot data into data in a uniform format, stores the data in a spatial database PostGIS, loads the multi-layer pattern spot data to be compared with the difference from PostGIS by a space-time data processing framework GeoMesa, performs difference comparison analysis to obtain a difference comparison result, and writes the difference comparison result into PostGIS;
after a user initiates a request for inquiring a task result on a front-end page, the front-end inquires a stored difference comparison result from PostGIS, and displays the difference comparison result to the user through the page;
The difference comparison result diagram of the page display is shown in fig. 3, the difference of two image layer image spot data of an image spot of an image layer A and an image spot of an image layer B is compared in fig. 3, the two image layer image spot data are image spot data of the same administrative region at different moments, the total number of the difference image spots is 2 through the comparison difference, the difference comparison types of the 2 difference image spots are respectively spatially modified and deleted, one image spot with an id of 1012 is modified, and one image spot with an id of 2301 is deleted.
From the above description, it can be seen that the present disclosure achieves the following technical effects:
According to the embodiment of the disclosure, the space-time data processing framework GeoMesa is utilized to compare the differences among the converted multi-layer pattern spot data, so that the calculated amount of comparing the multi-vector layer pattern spot data differences is reduced, the speed of comparing the multi-vector layer pattern spot data differences is improved, the multi-vector layer pattern spot data differences are compared for only half an hour, the time consumed in comparing the multi-vector layer pattern spot differences is obviously reduced, and the problems of larger calculated amount and longer time consumption in the comparison analysis of the pattern spot differences in the related art are solved.
It should be noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and that although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The disclosed embodiments also provide a difference comparing device for implementing the multi-layer speckle data of the method embodiment, as shown in fig. 4, the difference comparing device 40 includes:
the receiving unit 41 is configured to receive a multi-layer patch data compression file uploaded by a user, and receive a difference comparison type selected by the user, where the multi-layer is a plurality of vector layers, a data format of the multi-layer patch data compression file includes SHAPEFILE, GDB and mdb, and the difference comparison type includes erasure, intersection and inversion, topology and a buffer;
The conversion unit 42 is configured to convert a data format of the multi-layer patch data compression file into a unified format, and store the converted multi-layer patch data into a spatial database, where the spatial database includes PostGIS;
The comparing unit 43 is configured to obtain converted multi-layer patch data from the spatial database, and compare differences between the converted multi-layer patch data according to a difference comparison type by using a spatio-temporal data processing framework, so as to obtain a difference comparison result, where the spatio-temporal data processing framework includes GeoMesa; and
And a display unit 44, configured to store the difference comparison result in the spatial database, and display the difference comparison result to the user.
The specific manner in which the units of the above embodiments of the apparatus perform their operations has been described in detail in relation to the embodiments of the method and is not described in detail here.
The disclosed embodiment also provides an electronic device, as shown in fig. 5, which includes one or more processors 51 and a memory 52, and one processor 51 is exemplified in fig. 5.
The controller may further include: an input device 53 and an output device 54.
The processor 51, the memory 52, the input device 53 and the output device 54 may be connected by a bus or otherwise, for example in fig. 5.
The processor 51 may be a central processing unit (Central Processing Unit, abbreviated as CPU), the processor 51 may be other general purpose processors, digital signal processor (DIGITALSIGNAL PROCESSOR, abbreviated as DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or a combination of the foregoing, and the general purpose processor may be a microprocessor or any conventional processor.
The memory 52, as a non-transitory computer readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as program instructions/modules corresponding to the control methods in embodiments of the present disclosure. The processor 51 executes various functional applications of the server and data processing, i.e., implements the difference contrast method of the multi-layer patch data of the above-described method embodiments, by running non-transitory software programs, instructions, and modules stored in the memory 52.
Memory 52 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of a processing device operated by the server, or the like. In addition, memory 52 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 52 may optionally include memory located remotely from processor 51, which may be connected to the network connection device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 53 may receive input numeric or character information and generate key signal inputs related to user settings and function control of the processing device of the server. The output device 54 may include a display device such as a display screen.
One or more modules are stored in the memory 52 that, when executed by the one or more processors 51, perform the method shown in fig. 1.
Those skilled in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by way of a computer program to instruct related hardware, and the program may be stored in a computer readable storage medium, which when executed may include the above-described method embodiment. The storage medium may be a magnetic disk, an optical disc, a Read-Only Memory (ROM), a random access Memory (RandomAccess Memory RAM), a Flash Memory (FM), a hard disk (HARDDISK DRIVE HDD), or a Solid state disk (Solid-STATE DRIVE SSD); the storage medium may also comprise a combination of memories of the kind described above.
Although embodiments of the present disclosure have been described with reference to the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the disclosure, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A method for contrast of multi-layer patch data, comprising:
Receiving a multi-layer image spot data compression file uploaded by a user, and receiving a difference comparison type selected by the user, wherein the multi-layer image spot data compression file comprises a plurality of vector image layers, the data format of the multi-layer image spot data compression file comprises SHAPEFILE, GDB and mdb, and the difference comparison type comprises erasure, cross merging, cross inverting, topology and buffer;
Converting the data format of the multi-layer pattern spot data compression file into a unified format, and storing the converted multi-layer pattern spot data into a spatial database, wherein the spatial database comprises PostGIS;
Obtaining converted multi-layer pattern spot data from the spatial database, and comparing differences among the converted multi-layer pattern spot data according to the difference comparison type by utilizing a space-time data processing frame to obtain a difference comparison result, wherein the space-time data processing frame comprises GeoMesa; and
And storing the difference comparison result to the spatial database, and displaying the difference comparison result to the user.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
The number of the vector layer pattern spot data compression files is 2, each vector layer pattern spot data compression file comprises a plurality of data files with different formats, and each data file comprises a plurality of data with data numbers;
the converting the data format of the multi-layer pattern spot data compression file into a unified format, and storing the converted multi-layer pattern spot data into a spatial database, including:
Extracting each piece of data in each data file one by one according to the corresponding relation of the data numbers in each data file, and merging the extracted pieces of data into one piece of complete data;
Converting the format of the complete data into a unified format by using a conversion tool, wherein the conversion tool comprises a geospatial data abstraction library;
And storing the multi-layer pattern spot data in the uniform format after conversion into the spatial database according to a spatial data table structure defined in the spatial database.
3. The method of claim 2, wherein converting the format of the complete data to a unified format using a conversion tool comprises:
Converting the format of the complete data into GeoJson format by using a geospatial data abstraction library; or (b)
The format of the complete data is converted into xml format by using a geospatial data abstraction library.
4. The method of claim 1, wherein comparing differences between the converted multi-layer plaque data according to the difference comparison type using a spatiotemporal data processing framework to obtain a difference comparison result comprises:
Using the space-time data processing frame to configure a data source as a corresponding data table in a spatial database, and loading multi-layer pattern spot data of differences to be compared from the spatial database;
Converting map coordinate systems of different codes used by multi-layer map spot data into a uniformly-coded map coordinate system by using a conversion tool, wherein the uniformly-coded map coordinate system takes an end point of a lower left corner of a page as an origin, and the right direction in the page is an X-axis forward direction and the upward direction is a Y-axis forward direction;
determining an X-axis direction minimum value, an X-axis direction maximum value, a Y-axis direction minimum value and a Y-axis direction maximum value of multi-layer map spot data under a uniformly coded map coordinate system by a big data processing engine, and constructing a rectangular frame, wherein the big data processing engine comprises Spark;
according to the size of the rectangular frame, uniformly dividing the rectangular frame into a plurality of grids with equal size in an equidistant mode;
And calling an application program interface to set parallel lines through the big data processing engine, and sequentially comparing each piece of image spot data in the grid in the first image layer with all pieces of image spot data in the grid at the corresponding position in the second image layer according to the difference comparison type to obtain a difference comparison result.
5. The method of claim 4, wherein assuming that the minimum X-axis direction, the maximum X-axis direction, the minimum Y-axis direction, and the maximum Y-axis direction of the multi-layer patch data are X min, X max, Y min, and Y max, respectively, then: the length X frame=Xmax-Xmin of the rectangular frame in the X axis direction and the length Y frame=Ymax-Ymin of the rectangular frame in the Y axis direction;
wherein, according to the size of rectangle frame adopts the equidistant mode to evenly divide into the net that a plurality of sizes are equal with the rectangle frame, includes:
the X-axis direction spacing of each grid is determined according to the following formula And Y-axis direction spacing
Wherein GridNum is the number of divided grids, the value is 9 or 16, when the area of the rectangular frame is smaller than a preset threshold, the number of grids is 9, and when the area of the rectangular frame is larger than or equal to the preset threshold, the number of grids is 16.
6. The method according to claim 5, wherein sequentially comparing each patch data in the grid in the first layer with all patch data in the corresponding position grid in the second layer according to the difference comparison type to obtain a difference comparison result, including:
According to AndAll patch data in each grid within each layer is determined, wherein,The abscissa of the ith patch data,The ordinate of the ith spot data is positive integer, the value of j is determined by the divided grid number, when the grid number is 9, the value of j is {1,2,3}, and when the grid number is 16, the value of j is {1,2,3,4};
Adding all the image spot data in each grid in the first image layer to a first map set, and adding all the image spot data in each grid in the second image layer to a second map set;
judging whether position intersection exists between the image spot data in the first map set and the image spot data in the second map set;
If so, marking out the image spot data with the position intersection, calling a corresponding application program interface according to the difference comparison type selected by the user, and determining a difference comparison result;
if not, continuing to traverse backwards, and repeatedly executing judgment.
7. The method of claim 1, wherein the step of determining the position of the substrate comprises,
After receiving the user-selected contrast type, the method further comprises:
creating a difference comparison task corresponding to the difference comparison type, and adding the difference comparison task to a task list;
Before presenting the difference comparison result to the user, the method further comprises:
And responding to the query request of the user for the result corresponding to the difference comparison task in the task list.
8. A contrast device for multi-layer patch data, comprising:
the receiving unit is used for receiving the multi-layer image spot data compression file uploaded by a user and receiving a difference comparison type selected by the user, wherein the multi-layer image spot data compression file comprises data formats of SHAPEFILE, GDB and mdb, and the difference comparison type comprises erasure, cross merging, cross negation, topology and buffer;
The conversion unit is used for converting the data format of the multi-layer pattern spot data compression file into a unified format and storing the converted multi-layer pattern spot data into a spatial database, wherein the spatial database comprises PostGIS;
The comparison unit is used for acquiring the converted multi-layer pattern spot data from the spatial database, and comparing differences among the converted multi-layer pattern spot data according to the difference comparison type by utilizing a space-time data processing frame to obtain a difference comparison result, wherein the space-time data processing frame comprises GeoMesa; and
And the display unit is used for storing the difference comparison result to the spatial database and displaying the difference comparison result to the user.
9. A computer-readable storage medium storing computer instructions for causing a computer to perform the difference contrast method of multi-layer patch data according to any one of claims 1 to 7.
10. An electronic device, the electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores a computer program executable by the at least one processor to cause the at least one processor to perform the difference contrast method of multi-layer patch data of any one of claims 1 to 7.
CN202410775584.3A 2024-06-17 Multi-layer pattern spot data difference comparison method and device and electronic equipment Pending CN118332147A (en)

Publications (1)

Publication Number Publication Date
CN118332147A true CN118332147A (en) 2024-07-12

Family

ID=

Similar Documents

Publication Publication Date Title
CN110990516B (en) Map data processing method, device and server
CN110399441B (en) Mass point data aggregation rendering method, device, equipment and storage medium
CN109165215A (en) Construction method, device and the electronic equipment of temporal index under a kind of cloud environment
CN110647596B (en) Map data processing method and device
CN112233009A (en) Picture rendering method, device, equipment and storage medium
CN114546558B (en) Drawing processing method, device, computer equipment and storage medium
US20220375186A1 (en) Method and apparatus for generating bounding box, device and storage medium
CN110428505B (en) Method for removing video projection interferents in three-dimensional map and computer storage medium
CN110248165B (en) Label display method, device, equipment and storage medium
CN110709891A (en) Virtual reality scene model establishing method and device, electronic equipment and storage medium
CN111091497A (en) Map vector line and plane thinning method, intelligent terminal and storage medium
CN112632303A (en) Distributed storage method, analysis method and device for image data
CN115984022B (en) Unified account checking method and device for distributed payment system
CN109925715B (en) Virtual water area generation method and device and terminal
CN118332147A (en) Multi-layer pattern spot data difference comparison method and device and electronic equipment
CN114564268A (en) Equipment management method and device, electronic equipment and storage medium
CN116188565A (en) Position area detection method, device, apparatus, storage medium and program product
CN115238659A (en) Report data processing method and device
CN109726023B (en) Graphic task synchronous management method supporting multithreading and multiple contexts
WO2011082651A1 (en) Method and apparatus for judging occlusion type of spatial entity
CN112966041A (en) Data processing method, device, equipment and storage medium
CN115168112B (en) Method, device, equipment and medium for restoring section data under dynamic section change
CN115239895B (en) Mass data loading and optimal rendering method for GIS water environment 3D map
CN115270530B (en) Method, system, device and medium for rapidly establishing progress visualization model
CN117472380B (en) Front-end form generation method and system

Legal Events

Date Code Title Description
PB01 Publication