Method, device and electronic equipment for measuring spatial position relationship

By obtaining the surface data list and determining its block encoding list, the problem of high computational complexity of spatial data position relationship is solved, and more efficient computing efficiency and accurate spatial position relationship determination are achieved.

CN114741616BActive Publication Date: 2025-05-23HANGZHOU DT DREAM TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210333934.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-30
Publication Date
2025-05-23
Estimated Expiration
2042-03-30

AI Technical Summary

Technical Problem

In spatial data application scenarios, the complexity of computing spatial data position relationship is high, resulting in poor computing performance and low efficiency.

Method used

By obtaining the face data list, determine the number of blocks corresponding to the face data and the block encoding list, and then determine the data comparison relationship between at least two face data, and finally determine the spatial position relationship between the face shapes to avoid the comparison of unrelated face data.

Benefits of technology

The calculation complexity is reduced, the calculation efficiency is improved, and the spatial position relationship is determined through precise comparison relationships.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114741616B_ABST
    Figure CN114741616B_ABST
Patent Text Reader

Abstract

The present application proposes a method, device and electronic device for measuring spatial position relationship, which relates to the field of big data technology, wherein the method comprises: obtaining a surface data list, wherein the surface data list comprises: surface data of at least two surface shapes; for each surface data, determining the number of blocks corresponding to the surface data, and a block code list corresponding to the data below the block number; determining a data comparison relationship between at least two surface data according to the block code list corresponding to at least two surface data; determining a spatial position relationship between at least two surface shapes according to at least two surface data and the data comparison relationship, thereby avoiding comparison of two unrelated surface data, i.e., two surface data without data comparison relationship, reducing the number of comparisons, reducing the calculation complexity, and improving the calculation efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of big data technology, specifically to the field of geographic data information technology, and in particular to a method, device and electronic equipment for measuring spatial position relationship. Background Art

[0002] In the related technology, in the application scenario of spatial data, it is necessary to govern the spatial data first, and obtain the governed spatial data by comparing the positional relationship between the spatial data, such as whether there is an overlapping relationship between the outline shapes of two buildings. Since the calculation of the positional relationship comparison is a pairwise calculation of the spatial data, when the amount of spatial data to be calculated is large, the calculation complexity is large, the calculation performance is poor, and the efficiency is low. Summary of the invention

[0003] The purpose of this application is to solve one of the above technical problems at least to a certain extent.

[0004] To this end, the present application proposes a method, device and electronic device for measuring spatial position relationships, which obtains a list of surface data, determines the number of blocks corresponding to the surface data and the block code list corresponding to the data below the block number, further determines the data comparison relationship between at least two surface data, determines the surface data that needs to be compared based on the data comparison relationship, and then performs comparison processing to determine the spatial position relationship between at least two surface shapes, thereby avoiding comparison of two unrelated surface data, that is, two surface data without data comparison relationship, reducing the number of comparisons, thereby reducing calculation complexity and improving calculation efficiency.

[0005] The first aspect of the present application proposes a method for measuring a spatial position relationship, comprising: obtaining a surface data list, wherein the surface data list includes: surface data of at least two surface shapes; for each surface data, determining the number of blocks corresponding to the surface data, and a block code list corresponding to the surface data under the block number; determining a data comparison relationship between at least two surface data based on the block code lists corresponding to at least two surface data; determining a spatial position relationship between at least two surface shapes based on at least two surface data and the data comparison relationship.

[0006] Optionally, determining, for each of the surface data, the number of blocks corresponding to the surface data, and a block code list corresponding to the surface data under the number of blocks, includes: for each of the surface data, determining, in sequence according to the block code lengths in a block code length list, a candidate block code list corresponding to the surface data under each block code length; selecting a number of candidate blocks that meet a block constraint condition from the number of candidate blocks in at least one of the candidate block code lists; and selecting, from at least one candidate block code list corresponding to the number of candidate blocks that meet the block constraint condition, a candidate block code list with the longest candidate block code length as the block code list corresponding to the surface data.

[0007] Optionally, determining, for each of the surface data, the number of blocks corresponding to the surface data, and a block code list corresponding to the surface data under the number of blocks, includes: determining a block code length list, wherein the block code lengths in the block code length list are arranged in ascending order; for each of the surface data, determining, in turn, for each block code length in the block code length list, a candidate block code list corresponding to the surface data according to the block code length; when the number of candidate blocks in the candidate block code list does not meet the block constraint condition, obtaining the next block code length in the block code length list until it is determined that the number of candidate blocks in the obtained candidate block code list meets the block constraint condition; and selecting, from at least one candidate block code list corresponding to the number of candidate blocks that meet the block constraint condition, a candidate block code list with the longest candidate block code length as the block code list corresponding to the surface data.

[0008] Optionally, the block constraint condition is that the number of candidate blocks is greater than a first number threshold, and the number of candidate blocks is less than a second number threshold.

[0009] Optionally, the block constraint includes: a first constraint and a second constraint; wherein the first constraint is that the number of candidate blocks is greater than a first number threshold, and the number of candidate blocks is less than a second number threshold; and the second constraint is to take the maximum number from at least one candidate block number that satisfies the first constraint.

[0010] Optionally, determining the data comparison relationship between at least two of the surface data based on the block coding lists corresponding to at least two of the surface data includes: integrating and deduplicating the block coding lists corresponding to at least two of the surface data to obtain a full block coding list; and determining the data comparison relationship between at least two of the surface data based on the full block coding list and the block coding lists corresponding to at least two of the surface data.

[0011] Optionally, determining the data comparison relationship between at least two of the surface data according to the full block code list and the block code list corresponding to at least two of the surface data includes: for each block code to be processed in the full block code list, obtaining a first block code corresponding to the block code to be processed, wherein the first block code is a prefix of the block code to be processed; determining a surface data set according to the block code to be processed and the first block code, wherein the block code list corresponding to the surface data in the surface data set includes the block code to be processed or the first block code; and determining that a data comparison relationship exists between any two surface data in the surface data set.

[0012] The method for measuring the spatial position relationship of the embodiment of the present application obtains a surface data list, wherein the surface data list includes: surface data of at least two surface shapes; for each surface data, determines the number of blocks corresponding to the surface data, and a block code list corresponding to the data below the block number; determines the data comparison relationship between the at least two surface data based on the block code list corresponding to the at least two surface data; determines the spatial position relationship between the at least two surface shapes based on the at least two surface data and the data comparison relationship, thereby reducing calculation complexity and improving calculation efficiency.

[0013] The second aspect of the present application proposes a device for measuring spatial position relationship, including: an acquisition module, used to acquire a surface data list, wherein the surface data list includes: surface data of at least two surface shapes; a first determination module, used to determine, for each of the surface data, the number of blocks corresponding to the surface data, and a block code list corresponding to the surface data under the block number; a second determination module, used to determine a data comparison relationship between at least two of the surface data based on the block code lists corresponding to at least two of the surface data; and a third determination module, used to determine the spatial position relationship between at least two of the surface shapes based on at least two of the surface data and the data comparison relationship.

[0014] Optionally, the first determination module is specifically used to, for each of the surface data, determine, in turn according to the block code lengths in the block code length list, a candidate block code list corresponding to the surface data under each block code length; select a number of candidate blocks that meet a block constraint condition from the number of candidate blocks in at least one of the candidate block code lists; and select a candidate block code list with the longest candidate block code length from at least one candidate block code list corresponding to the number of candidate blocks that meet the block constraint condition as the block code list corresponding to the surface data.

[0015] Optionally, the first determination module is further specifically used to determine a block code length list, wherein the block code lengths in the block code length list are arranged in ascending order; for each of the surface data, for each block code length in the block code length list, determine a candidate block code list corresponding to the surface data according to the block code length; when the number of candidate blocks in the candidate block code list does not meet the block constraint condition, obtain the next block code length in the block code length list until it is determined that the number of candidate blocks in the obtained candidate block code list meets the block constraint condition; from at least one candidate block code list corresponding to the number of candidate blocks that meet the block constraint condition, select a candidate block code list with the longest candidate block code length as the block code list corresponding to the surface data.

[0016] Optionally, the block constraint condition is that the number of candidate blocks is greater than a first number threshold, and the number of candidate blocks is less than a second number threshold.

[0017] Optionally, the block constraint includes: a first constraint and a second constraint; wherein the first constraint is that the number of candidate blocks is greater than a first number threshold, and the number of candidate blocks is less than a second number threshold; and the second constraint is to take the maximum number from at least one candidate block number that satisfies the first constraint.

[0018] Optionally, the second data module includes: a processing unit and a determination unit; the processing unit is used to integrate and deduplicate block coding lists corresponding to at least two of the surface data to obtain a full block coding list; the determination unit is used to determine a data comparison relationship between at least two of the surface data based on the full block coding list and the block coding lists corresponding to at least two of the surface data.

[0019] Optionally, the determination unit is specifically used to, for each block code to be processed in the full block code list, obtain a first block code corresponding to the block code to be processed, wherein the first block code is a prefix of the block code to be processed; determine a surface data set according to the block code to be processed and the first block code, wherein the block code list corresponding to the surface data in the surface data set includes the block code to be processed or the first block code; and determine that there is a data comparison relationship between any two surface data in the surface data set.

[0020] The device for measuring the spatial position relationship of the embodiment of the present application obtains a surface data list, wherein the surface data list includes: surface data of at least two surface shapes; for each surface data, determines the number of blocks corresponding to the surface data, and a block code list corresponding to the data below the block number; determines the data comparison relationship between the at least two surface data based on the block code list corresponding to the at least two surface data; determines the spatial position relationship between the at least two surface shapes based on the at least two surface data and the data comparison relationship, thereby reducing calculation complexity and improving calculation efficiency.

[0021] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for measuring the spatial position relationship as described in the first aspect is implemented.

[0022] The fourth aspect of the present application provides a non-temporary computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method for measuring the spatial position relationship as described in the first aspect.

[0023] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0025] Figure 1 A schematic diagram of a flow chart of a method for measuring a spatial position relationship provided in an embodiment of the present application;

[0026] Figure 2 A schematic diagram of a flow chart of another method for measuring a spatial position relationship provided in an embodiment of the present application;

[0027] Figure 3 It is a structural schematic diagram of a device for measuring a spatial position relationship according to an embodiment of the present application;

[0028] Figure 4 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0030] In the related technology, in the application scenario of spatial data, it is necessary to govern the spatial data first, and obtain the governed spatial data by comparing the positional relationship between the spatial data, such as whether there is an overlapping relationship between the outline shapes of two buildings. Since the calculation of the positional relationship comparison is a pairwise calculation of the spatial data, when the amount of spatial data to be calculated is large, the calculation complexity is large, the calculation performance is poor, and the efficiency is low.

[0031] In order to solve the above problems, the embodiments of the present application provide a method, device and electronic device for measuring spatial position relationship.

[0032] Combine the following Figure 1 , the measurement method of the spatial position relationship provided in this application is described in detail.

[0033] Figure 1 A schematic flow chart of a method for measuring a spatial position relationship provided in an embodiment of the present application.

[0034] The execution subject of the embodiment of the present application is the spatial position relationship measurement device provided by the present application. The spatial position relationship measurement device in the present application can be applied to an electronic device to perform the spatial position relationship measurement function. Alternatively, the spatial position relationship measurement device can be configured in an application of an electronic device so that the application can perform the spatial position relationship measurement function.

[0035] The electronic device may be any device with computing capability, and the device or the application in the device may perform the function of measuring spatial position relationship. The device with computing capability may be, for example, a personal computer (PC), a mobile terminal, a server, etc. The mobile terminal may be, for example, a vehicle-mounted device, a mobile phone, a tablet computer, a personal digital assistant, a wearable device, or other hardware device with various operating systems, touch screens, and / or display screens.

[0036] like Figure 1 As shown, the method for measuring the spatial position relationship includes the following steps:

[0037] Step 101: Obtain a surface data list, wherein the surface data list includes: surface data of at least two surface shapes.

[0038] In the embodiment of the present application, the surface shape refers to the contour shape of the space object, etc. The contour shape may be, for example, a polygon, an irregular shape, etc. The surface data corresponding to the surface shape may be data obtained by representing the contour shape of the space object using a polygon vector.

[0039] Step 102: for each surface data, determine the number of blocks corresponding to the surface data, and a block code list corresponding to the data below the block number.

[0040] In an embodiment of the present application, in one example, the process of the spatial position relationship measurement device executing step 102 may be, for example, determining, for each surface data, in turn according to the block code lengths of each block in the block code length list, a candidate block code list corresponding to the data below each block code length; selecting a number of candidate blocks that meet the block constraint condition from the number of candidate blocks in at least one candidate block code list; and selecting a candidate block code list with the longest candidate block code length from at least one candidate block code list corresponding to the number of candidate blocks that meet the block constraint condition as the block code list corresponding to the surface data.

[0041] In the embodiment of the present application, in another example, the process of the spatial position relationship measurement device executing step 102 can also be, for example, determining a block code length list, wherein the block code lengths in the block code length list are arranged in ascending order; for each surface data, for each block code length in the block code length list, determining a candidate block code list corresponding to the surface data according to the block code length; when the number of candidate blocks in the candidate block code list does not meet the block constraint condition, obtaining the next block code length in the block code length list until it is determined that the number of candidate blocks in the obtained candidate block code list meets the block constraint condition; from the candidate block code list corresponding to the number of candidate blocks that meet the block constraint condition, selecting the candidate block code list with the longest candidate block code length as the block code list corresponding to the surface data.

[0042] For one surface data, it is possible that in at least two block code lengths, the number of candidate blocks in the candidate block code lists obtained is the same. From the candidate block code lists corresponding to the number of candidate blocks that satisfy the block constraint condition, the candidate block code list with the longest candidate block code length is selected as the block code list corresponding to the surface data.

[0043] In the embodiment of the present application, a candidate block coding list corresponding to the surface data is determined according to the block coding length in the block coding length list. When the number of candidate blocks in the candidate block coding list does not meet the block constraint condition, the next block coding length is obtained, and the candidate block coding list is continuously determined until the number of candidate blocks in the candidate block coding list meets the block constraint condition. The candidate block coding list corresponding to the number of candidate blocks is determined as the block coding list. The block coding list can be determined without obtaining each block coding length, thereby reducing the amount of calculation and improving the calculation efficiency.

[0044] It should be noted that Geohash is an address encoding method that can encode two-dimensional spatial longitude and latitude data into a one-dimensional string. Each string represents a specific rectangle, and all coordinates within the rectangular range share this string. The longer the string, the higher the precision, and the smaller the corresponding rectangular range. When encoding a geographic coordinate, according to the initial interval range of latitude [-90,90] and longitude [-180,180], calculate whether the target longitude and latitude fall in the left interval or the right interval. If it falls in the left interval, it takes 0, and if it falls in the right interval, it takes 1. Then, continue to search the interval obtained in the previous step in half according to this method, and get the binary encoding corresponding to the longitude and latitude respectively. According to the rule of "longitude in even digits and latitude in odd digits", a new binary string is obtained. Finally, according to the base32 comparison table, the binary string is translated into a string, that is, the GeoHash string corresponding to the geographic coordinate is obtained. Among them, the block is the location area defined by the rectangle represented by a geographic code.

[0045] It can be understood that the larger the block code length, the higher the accuracy, and the corresponding calculation overhead is greater. Therefore, in order to balance the accuracy and calculation overhead, the corresponding block code length range can be preset. Usually, the length range can be a continuous length value, including multiple block code lengths, such as a block code length of 3 to 7. In addition, the preset block code length range can be set by the user through the interactive page of the terminal device, or it can be set directly in the program, and the block code length range can be fixed after setting, or it can be a range value adjusted according to the actual application scenario, and this application does not limit this.

[0046] In one example, the block constraint condition is that the number of candidate blocks is greater than a first number threshold and the number of candidate blocks is less than a second number threshold. The number of candidate blocks that meet the block constraint condition selected according to the constraint condition is multiple.

[0047] In another example, the block constraint includes: a first constraint and a second constraint; wherein the first constraint is that the number of candidate blocks is greater than a first number threshold, and the number of candidate blocks is less than a second number threshold; and the second constraint is that the maximum number is taken from at least one candidate block number that satisfies the first constraint. According to the block constraint, the maximum number of candidate blocks can be determined, and a block coding list with higher accuracy can be obtained, thereby determining the spatial position relationship between the surface shapes, reducing the computational complexity, and improving the computational efficiency.

[0048] The range of the number of blocks is usually between [5, 30], 5 is the first number threshold, and 30 is the second number threshold. The block code list can completely cover the surface data.

[0049] Step 103: determining a data comparison relationship between at least two surface data according to the block code lists corresponding to the at least two surface data.

[0050] In an embodiment of the present application, block code lists corresponding to at least two surface data are integrated, and duplicate data in the block code lists are deduplicated to obtain a full block code list without duplication, and a data comparison relationship is determined based on the full block code list and the block code lists corresponding to at least two surface data.

[0051] Step 104: Determine the spatial position relationship between at least two surface shapes according to at least two surface data and the data comparison relationship.

[0052] The spatial position relationship may be, for example, whether the outline shapes of two buildings overlap.

[0053] The method for measuring the spatial position relationship provided in the embodiment of the present application obtains a surface data list, wherein the surface data list includes: surface data of at least two surface shapes; for each surface data, determines the number of blocks corresponding to the surface data, and a block code list corresponding to the data below the block number; determines the data comparison relationship between the at least two surface data based on the block code list corresponding to the at least two surface data; determines the spatial position relationship between the at least two surface shapes based on the at least two surface data and the data comparison relationship, thereby reducing calculation complexity and improving calculation efficiency.

[0054] In order to determine the data comparison relationship between at least two surface data and realize the measurement of spatial position relationship, such as Figure 2 As shown, the method for measuring the spatial position relationship provided in this application is further explained.

[0055] Figure 2 A schematic diagram of another method for measuring a spatial position relationship provided in an embodiment of the present application. Figure 2 As shown, the above method may include the following steps:

[0056] Step 201: Obtain a surface data list, wherein the surface data list includes: surface data of at least two surface shapes.

[0057] Step 202: for each surface data, determine the number of blocks corresponding to the surface data, and a block code list corresponding to the data below the block number.

[0058] Step 203 , integrating and removing duplicates of the block code lists corresponding to at least two surface data to obtain a full block code list.

[0059] In the embodiment of the present application, the number of blocks in the block code list corresponding to at least two surface data is summarized, and duplicate blocks are removed to obtain a full block code list without duplication, thereby reducing the amount of calculation and improving the calculation efficiency.

[0060] Step 204 : determining a data comparison relationship between at least two surface data according to the full block code list and the block code lists corresponding to at least two surface data.

[0061] In the embodiment of the present application, the process of executing step 204 by the spatial position relationship measuring device may, for example, be as follows: for each block code to be processed in the full block code list, obtain the first block code corresponding to the block code to be processed, wherein the first block code is a prefix of the block code to be processed; determine a surface data set based on the block code to be processed and the first block code, wherein the block code list corresponding to the surface data in the surface data set includes the block code to be processed or the first block code; and determine that there is a data comparison relationship between any two surface data in the surface data set.

[0062] In one embodiment of the present application, the second surface data corresponding to the block code to be processed and the first surface data corresponding to the first block code are determined; a data comparison calculation is performed on the first surface data and the second surface data to determine whether a data comparison relationship exists. In another example, the second surface data corresponding to the block code to be processed is determined, and a data comparison calculation is performed on the second surface data and other surface data to determine whether a data comparison relationship exists.

[0063] For each block code to be processed in the full block code list, obtain a first block code corresponding to the block code to be processed, wherein the first block code is a prefix of the block code to be processed; determine the second surface data corresponding to the block code to be processed and the first surface data corresponding to the first block code; and determine that there is a data comparison relationship between the first surface data and the second surface data.

[0064] In one example, the block code to be processed may be “wwkb1”, and the corresponding first block code may be “wwkb”, “wwk”, “ww”, or “w”.

[0065] Step 205: Determine the spatial position relationship between at least two surface shapes according to at least two surface data and the data comparison relationship.

[0066] The method for measuring the spatial position relationship of the embodiment of the present application obtains a surface data list, wherein the surface data list includes: surface data of at least two surface shapes; for each surface data, determines the number of blocks corresponding to the surface data, and a block code list corresponding to the data below the block number; integrates and de-duplicates the block code lists corresponding to the at least two surface data to obtain a full block code list; determines a data comparison relationship between the at least two surface data based on the full block code list and the block code lists corresponding to the at least two surface data; determines a spatial position relationship between the at least two surface shapes based on the at least two surface data and the data comparison relationship, thereby reducing computational complexity and improving computational efficiency.

[0067] It should be noted that the details of step 201, step 202, and step 205 can be found in Figure 1 Step 101, step 102 and step 104 in the illustrated embodiment will not be described in detail herein.

[0068] For example, the process of determining the spatial position relationship can be as follows: first, for each surface data A in the surface data list, a suitable GeoHash block list (block code list) is found using a step-by-step subdivision method so as to meet the following conditions: 1) the GeoHash block list can completely cover the surface data A; 2) the number of GeoHash blocks is limited, usually between 5 and 30, 5 is called the typical value lower bound TypicalLow (first quantity threshold), and 30 is called the typical value upper bound TypicalUp (second quantity threshold); 3) Use GeoHash blocks with the smallest possible area. The specific process of the step-by-step subdivision method is as follows: initialize the previous GeoHash block list PrevBL to be empty; traverse different GeoHash lengths L (block code lengths) from small to large, for example, from 3 to 7; use the length L as the GeoHash precision to calculate the GeoHash block list BL (block code list) of the coverage data A; if the number of candidate blocks BCount in BL is less than TypicalLow (the first number threshold), continue to obtain the next GeoHash length L; if the number of blocks BCount in BL is greater than TypicalUp (the second number threshold), use the GeoHash block list PrevBL as the result; if the number of blocks BCount in BL falls within the interval [TypicalLow, TypicalUp], use BL as the result. For example, BL may include the following block codes: "wwk8p", "wwkb3", "wwhz8", "wwkb0", "wwhzc", "wwk8n", "wwk8r", "wwkb1", "wwhzb", "wwk8q", "wwkb2", "wwhxz". Then, for all the face shapes that need to be compared, use the GeoHash block list obtained earlier to summarize the GeoHash blocks to form a non-repeating full GeoHash block code list AllGeoHashList. Secondly, traverse each GeoHash value SG in AllGeoHashList, and use this value as a filtering condition for screening, with the goal of screening the data comparison relationship between at least two face data. Among them, the screening method is: 1) The GeoHash of the face data is equal to SG; 2) The length of the GeoHash value (block code) of the face data is less than the length of SG, and the former is the prefix part of the latter. For example, if the current SG is 'wwkb1', the surface data corresponding to "wwkb", "wwk", "ww", and "w" in AllGeoHashList need to be filtered out. Finally, based on the data comparison relationship between at least two surface data, the spatial position relationship between the two is compared. For example, if at least two surface data are surface data A and surface data B, the relationship between surface data A and surface data B will only be calculated once.

[0069] Corresponding to the spatial position relationship measurement methods provided in the above-mentioned embodiments, an embodiment of the present application further provides a spatial position relationship measurement device. Since the spatial position relationship measurement device provided in the embodiment of the present application corresponds to the spatial position relationship measurement methods provided in the above-mentioned embodiments, the implementation method of the spatial position relationship measurement method is also applicable to the spatial position relationship measurement device provided in this embodiment, and will not be described in detail in this embodiment.

[0070] Figure 3 It is a schematic diagram of the structure of a device for measuring spatial position relationship according to an embodiment of the present application.

[0071] like Figure 3 As shown, the spatial position relationship measuring device 300 may include: an acquisition module 310 , a first determination module 320 , a second determination module 330 and a third determination module 340 .

[0072] The acquisition module 310 is used to acquire a surface data list, wherein the surface data list includes: surface data of at least two surface shapes;

[0073] A first determination module 320 is used to determine, for each of the surface data, the number of blocks corresponding to the surface data and a block code list corresponding to the surface data under the number of blocks;

[0074] A second determination module 330, configured to determine a data comparison relationship between at least two surface data according to block code lists corresponding to at least two surface data;

[0075] The third determination module 340 is used to determine the spatial position relationship between at least two of the surface shapes according to the at least two surface data and the data comparison relationship.

[0076] As a possible implementation method of an embodiment of the present application, the first determination module 320 is specifically used to, for each of the surface data, determine, in turn according to the block code lengths in the block code length list, a candidate block code list corresponding to the surface data under each block code length; select a number of candidate blocks that meet a block constraint condition from the number of candidate blocks in at least one of the candidate block code lists; and select a candidate block code list with the longest candidate block code length from at least one candidate block code list corresponding to the number of candidate blocks that meet the block constraint condition as the block code list corresponding to the surface data.

[0077] As another possible implementation manner of the embodiment of the present application, the first determination module 320 is further specifically used to determine a block code length list, wherein the block code lengths in the block code length list are arranged in ascending order; for each of the surface data, for each block code length in the block code length list, determine a candidate block code list corresponding to the surface data according to the block code length; when the number of candidate blocks in the candidate block code list does not meet the block constraint condition, obtain the next block code length in the block code length list until it is determined that the number of candidate blocks in the obtained candidate block code list meets the block constraint condition; from at least one candidate block code list corresponding to the number of candidate blocks that meet the block constraint condition, select a candidate block code list with the longest candidate block code length as the block code list corresponding to the surface data.

[0078] As another possible implementation manner of the embodiment of the present application, the block constraint condition is that the number of candidate blocks is greater than a first number threshold, and the number of candidate blocks is less than a second number threshold.

[0079] As another possible implementation method of an embodiment of the present application, the block constraint condition includes: a first constraint condition and a second constraint condition; wherein the first constraint condition is that the number of candidate blocks is greater than a first number threshold, and the number of candidate blocks is less than a second number threshold; the second constraint condition is to take the maximum number from at least one candidate block number that satisfies the first constraint condition.

[0080] As another possible implementation method of the embodiment of the present application, the second determination module 330 includes: a processing unit and a determination unit; the processing unit is used to integrate and deduplicate the block coding lists corresponding to at least two of the surface data to obtain a full block coding list; the determination unit is used to determine the data comparison relationship between at least two of the surface data based on the full block coding list and the block coding lists corresponding to at least two of the surface data.

[0081] As another possible implementation method of the embodiment of the present application, the determination unit is specifically used to, for each block code to be processed in the full block code list, obtain a first block code corresponding to the block code to be processed, wherein the first block code is a prefix of the block code to be processed; determine a surface data set based on the block code to be processed and the first block code, wherein the block code list corresponding to the surface data in the surface data set includes the block code to be processed or the first block code; and determine that there is a data comparison relationship between any two surface data in the surface data set.

[0082] The spatial position relationship measurement device provided in the embodiment of the present application obtains a surface data list, wherein the surface data list includes: surface data of at least two surface shapes; for each surface data, determines the number of blocks corresponding to the surface data, and a block code list corresponding to the data below the block number; determines the data comparison relationship between the at least two surface data according to the block code list corresponding to the at least two surface data; determines the spatial position relationship between the at least two surface shapes according to the at least two surface data and the data comparison relationship, thereby reducing calculation complexity and improving calculation efficiency.

[0083] In order to implement the above embodiment, the present application also proposes an electronic device, Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device includes:

[0084] Memory 401 , processor 402 , and a computer program stored in the memory 401 and executable on the processor 402 .

[0085] When the processor 402 executes the program, the method for measuring the spatial position relationship provided in the above embodiment is implemented.

[0086] Furthermore, the electronic device further comprises:

[0087] The communication interface 403 is used for communication between the memory 401 and the processor 402 .

[0088] The memory 401 is used to store computer programs that can be executed on the processor 402 .

[0089] The memory 401 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0090] The processor 402 is used to implement the spatial position relationship measurement method described in the above embodiment when executing the program.

[0091] If the memory 401, the processor 402 and the communication interface 403 are implemented independently, the communication interface 403, the memory 401 and the processor 402 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation,Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0092] Optionally, in a specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can communicate with each other through an internal interface.

[0093] The processor 402 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0094] In order to implement the above embodiments, the embodiments of the present application also propose a non-temporary computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method for measuring the spatial position relationship provided in the above embodiments is implemented.

[0095] In order to implement the above embodiments, the embodiments of the present application further propose a computer program product, which, when an instruction processor in the computer program product executes, implements the method for measuring the spatial position relationship provided in the above embodiments.

[0096] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0097] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0098] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0099] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0100] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0101] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0102] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0103] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A method for measuring spatial position relationship, It is characterized in that include: Acquire a surface data list, wherein the surface data list includes: surface data of at least two surface shapes, wherein the surface data are two building outline shapes; For each of the surface data, determine the number of blocks corresponding to the surface data, and a list of block codes corresponding to the surface data under the number of blocks; wherein the block is a location area defined by a rectangle represented by a geographic code; Determining a data comparison relationship between at least two pieces of surface data according to block code lists corresponding to at least two pieces of surface data; Determine the spatial position relationship between at least two of the surface shapes according to at least two of the surface data and the data comparison relationship; The step of determining, for each of the surface data, the number of blocks corresponding to the surface data and a block code list corresponding to the surface data under the number of blocks comprises: For each of the surface data, determining a candidate block code list corresponding to the surface data under each block code length according to each block code length in the block code length list; Selecting a number of candidate blocks satisfying a block constraint from the number of candidate blocks in at least one of the candidate block coding lists; From at least one candidate block code list corresponding to the number of candidate blocks satisfying the block constraint condition, a candidate block code list in which the candidate block code length is the longest is selected as the block code list corresponding to the surface data.

2. The method according to claim 1, It is characterized in that The step of determining, for each of the surface data, the number of blocks corresponding to the surface data and a block code list corresponding to the surface data under the number of blocks comprises: Determine a block code length list, wherein each block code length in the block code length list is arranged in ascending order; For each of the surface data, determining a candidate block code list corresponding to the surface data according to each block code length in the block code length list in turn; When the number of candidate blocks in the candidate block code list does not satisfy the block constraint condition, obtaining the next block code length in the block code length list until it is determined that the number of candidate blocks in the obtained candidate block code list satisfies the block constraint condition; From at least one candidate block code list corresponding to the number of candidate blocks satisfying the block constraint condition, a candidate block code list having the longest candidate block code length is selected as the block code list corresponding to the surface data.

3. The method according to claim 1 or 2, It is characterized in that The block constraint condition is that the number of candidate blocks is greater than a first number threshold, and the number of candidate blocks is less than a second number threshold.

4. The method according to claim 1 or 2, It is characterized in that The block constraint conditions include: a first constraint condition and a second constraint condition; The first constraint condition is that the number of candidate blocks is greater than a first number threshold, and the number of candidate blocks is less than a second number threshold; The second constraint condition is to take the maximum number from at least one candidate block number that meets the first constraint condition.

5. The method according to claim 1, It is characterized in that The step of determining a data comparison relationship between at least two pieces of surface data according to the block code lists corresponding to at least two pieces of surface data includes: Integrate and remove duplicates of the block code lists corresponding to at least two of the surface data to obtain a full block code list; A data comparison relationship between at least two of the surface data is determined according to the full block code list and the block code lists corresponding to at least two of the surface data.

6. The method according to claim 5, It is characterized in that The determining, according to the full block code list and the block code lists corresponding to the at least two surface data, a data comparison relationship between the at least two surface data comprises: For each block code to be processed in the full block code list, obtaining a first block code corresponding to the block code to be processed, wherein the first block code is a prefix of the block code to be processed; Determine a surface data set according to the block code to be processed and the first block code, wherein a block code list corresponding to the surface data in the surface data set includes the block code to be processed or the first block code; It is determined that there is a data comparison relationship between any two surface data in the surface data set.

7. A device for measuring spatial position relationship, It is characterized in that include: An acquisition module, used for acquiring a surface data list, wherein the surface data list includes: surface data of at least two surface shapes, wherein the surface data are two building outline shapes; A first determination module is used to determine, for each of the surface data, the number of blocks corresponding to the surface data and a list of block codes corresponding to the surface data under the number of blocks; wherein the block is a location area defined by a rectangle represented by a geographic code; A second determination module, configured to determine a data comparison relationship between at least two pieces of surface data according to a block code list corresponding to at least two pieces of surface data; A third determination module, configured to determine a spatial position relationship between at least two of the surface shapes according to at least two of the surface data and the data comparison relationship; The first determination module is specifically configured to determine, for each piece of surface data, a candidate block code list corresponding to the surface data under each block code length in the block code length list in turn; Selecting a number of candidate blocks satisfying a block constraint from the number of candidate blocks in at least one of the candidate block coding lists; From at least one candidate block code list corresponding to the number of candidate blocks satisfying the block constraint condition, a candidate block code list in which the candidate block code length is the longest is selected as the block code list corresponding to the surface data.

8. The device according to claim 7, It is characterized in that The first determining module is further specifically configured to: Determine a block code length list, wherein each block code length in the block code length list is arranged in ascending order; For each of the surface data, determining a candidate block code list corresponding to the surface data according to each block code length in the block code length list in turn; When the number of candidate blocks in the candidate block code list does not satisfy the block constraint condition, obtaining the next block code length in the block code length list until it is determined that the number of candidate blocks in the obtained candidate block code list satisfies the block constraint condition; From at least one candidate block code list corresponding to the number of candidate blocks satisfying the block constraint condition, a candidate block code list having the longest candidate block code length is selected as the block code list corresponding to the surface data.

9. The device according to claim 7 or 8, It is characterized in that The block constraint condition is that the number of candidate blocks is greater than a first number threshold, and the number of candidate blocks is less than a second number threshold.

10. The device according to claim 7 or 8, It is characterized in that The block constraint conditions include: a first constraint condition and a second constraint condition; The first constraint condition is that the number of candidate blocks is greater than a first number threshold, and the number of candidate blocks is less than a second number threshold; The second constraint condition is to take the maximum number from at least one candidate block number that meets the first constraint condition.

11. The device according to claim 7, It is characterized in that The second determination module includes: a processing unit and a determination unit; The processing unit is used to integrate and remove duplicates of the block code lists corresponding to at least two of the surface data to obtain a full block code list; The determining unit is used to determine a data comparison relationship between at least two surface data according to the full block coding list and the block coding lists corresponding to at least two surface data.

12. The device according to claim 11, It is characterized in that The determining unit is specifically configured to: For each block code to be processed in the full block code list, obtaining a first block code corresponding to the block code to be processed, wherein the first block code is a prefix of the block code to be processed; Determine a surface data set according to the block code to be processed and the first block code, wherein a block code list corresponding to the surface data in the surface data set includes the block code to be processed or the first block code; It is determined that there is a data comparison relationship between any two surface data in the surface data set.

13. An electronic device, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for measuring the spatial position relationship as described in any one of claims 1 to 6 is implemented.

14. A non-transitory computer-readable storage medium having stored thereon a computer program, It is characterized in that When the program is executed by a processor, the method for measuring the spatial position relationship as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Regional plot overlapping recognition and overlapping area calculation method based on space-time big data

    CN111737381A