A spatial query data processing method, device and equipment for an electronic map

By acquiring and analyzing historical spatial query SQL information, and utilizing the combination of PostgreSQL, Elasticsearch, and Kibana, the problem of difficulty in determining the accuracy of spatial queries on electronic maps was solved, thus improving the accuracy and efficiency of queries.

CN116069888BActive Publication Date: 2026-03-20XIAN NAVINFO INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-14
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

In existing technologies, it is impossible to accurately determine the accuracy of spatial queries on electronic maps, resulting in low efficiency.

Method used

By acquiring multiple historical spatial query SQL information, and utilizing PostgreSQL's hook mechanism and Elasticsearch's time-range index library, combined with Kibana for analysis, the accuracy of spatial queries is determined, including SQL variable values, range data, statistical information of related objects, and SQL execution plans.

Benefits of technology

It enables a more comprehensive and accurate determination of the accuracy of spatial queries, improves query efficiency, and provides early warnings to ensure the accuracy and efficiency of query results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116069888B_ABST
    Figure CN116069888B_ABST
Patent Text Reader

Abstract

The embodiment of the specification discloses a kind of electronic map spatial query data processing method, device, equipment, medium and product, method includes: obtaining the multiple historical spatial query SQL information of spatial query for electronic map;Determine whether the query time consumption of the multiple historical spatial query SQL information exceeds preset threshold;The historical spatial query SQL information of the query time consumption exceeding the preset threshold is determined as first spatial query SQL information;Determine the accuracy of the spatial query based on the attribute information of the first spatial query SQL information;The attribute information of the first spatial query SQL information includes SQL variable value, range data, the statistical information of relevant object and SQL execution plan.The embodiment of the application can determine the accuracy of spatial query based on the attribute information of historical spatial query SQL information.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electronic map making, and particularly relates to a spatial query data processing method, device and equipment for an electronic map. BACKGROUND

[0002] A geographic information system (GIS) is also called a geo-information system. It is a specific and very important spatial information system. It is a technical system for collecting, storing, managing, operating, analyzing, displaying and describing relevant geographical distribution data in the whole or part of the earth's surface (including the atmosphere) space under the support of a computer hardware and software system.

[0003] Spatial query is a general term for related technologies for operating spatial data, and it is used to query objects meeting filtering conditions from existing data by constructing filtering conditions through spatial position relationships between geometric objects. Spatial query is the most basic and most commonly used function of GIS, and is also the main feature distinguishing GIS from other digital mapping software. A large part of problems proposed by GIS users can be solved by using the query method, and the method and range of query determine the application degree and level of GIS to a great extent.

[0004] In the process of electronic map making, the efficiency of analyzing spatial query, that is, the accuracy of spatial query, is usually determined in the process of running a geographic information system. A person manually queries the SQL (Structured Query Language) running condition of the current spatial query in the background system, and analyzes the spatial query by collecting statistical information of relevant objects of the spatial query SQL information and manually replacing the spatial query binding variable. However, in this process, only the current spatial query SQL information can be used to determine the accuracy of spatial query, which cannot accurately determine the accuracy of spatial query. SUMMARY

[0005] The embodiments of the present specification provide a spatial query data processing method, device, equipment, medium and product for an electronic map to solve the problem that the existing method cannot accurately determine the accuracy of spatial query.

[0006] To solve the above technical problems, the embodiments of the present specification are implemented as follows:

[0007] The embodiments of the present specification provide a spatial query data processing method for an electronic map, which includes the following steps.

[0008] Obtaining a plurality of historical spatial query SQL information for spatial query of the electronic map;

[0009] determining whether the query time consumption of the plurality of historical spatial query SQL information exceeds a preset threshold value;

[0010] determining the historical spatial query SQL information whose query time consumption exceeds the preset threshold value as first spatial query SQL information;

[0011] determining the accuracy of the spatial query based on attribute information of the first spatial query SQL information; the attribute information of the first spatial query SQL information includes SQL variable value, range data, statistical information of related objects and SQL execution plan.

[0012] Optionally, the obtaining of the plurality of historical spatial query SQL information for the spatial query of the electronic map specifically includes:

[0013] obtaining the plurality of historical spatial query SQL information for the spatial query of the electronic map by using a hook mechanism of PostgreSQL.

[0014] Optionally, after the obtaining of the plurality of historical spatial query SQL information for the spatial query of the electronic map, the method further includes:

[0015] processing the plurality of historical spatial query SQL information to write into a time range index database of Elasticsearch;

[0016] reading the time range index database of Elasticsearch by Kibana to obtain the query time consumption of the plurality of historical spatial query SQL information.

[0017] Optionally, the processing of the plurality of historical spatial query SQL information to write into the time range index database of Elasticsearch specifically includes:

[0018] processing the plurality of historical spatial query SQL information into a json format to obtain information in the json format;

[0019] writing the information in the json format into the time range index database of Elasticsearch.

[0020] Optionally, the determining of the accuracy of the spatial query based on the attribute information of the first spatial query SQL information specifically includes:

[0021] reading a geographic space Map layer by Kibana to determine the accuracy of range data of the spatial query; the geographic space Map layer is made based on the SQL variable value of the first spatial query SQL information and the range data of the first spatial query SQL information.

[0022] and / or,

[0023] comparing the statistical information of the related object of the first spatial query SQL information with the statistical information of the related object of the current spatial query SQL information to obtain a comparison result; the statistical information of the related object of the first spatial query SQL information is read through Kibana;

[0024] determining the accuracy of the statistical information of the related object of the spatial query according to the comparison result;

[0025] and / or,

[0026] determining the accuracy of the SQL execution plan of the spatial query based on the SQL execution plan of the first spatial query SQL information and using a spatial query SQL expert library; the SQL execution plan of the first spatial query SQL information is read through Kibana; the spatial query SQL expert library is a database containing technical optimization rules of the spatial query accumulated according to the experience of making electronic maps.

[0027] Optionally, the method further comprises:

[0028] determining a warning threshold based on the query time consumption of the plurality of historical spatial query SQL information;

[0029] judging whether the query time consumption of the current spatial query SQL information is greater than or equal to the warning threshold;

[0030] if yes, performing spatial query warning.

[0031] An electronic map spatial query data processing device provided by an embodiment of the present specification comprises:

[0032] an acquisition module configured to acquire a plurality of historical spatial query SQL information of a spatial query for an electronic map;

[0033] a judgment module configured to judge whether the query time consumption of the plurality of historical spatial query SQL information exceeds a preset threshold;

[0034] a first determination module configured to determine the historical spatial query SQL information whose query time consumption exceeds the preset threshold as first spatial query SQL information;

[0035] a second determination module configured to determine the accuracy of the spatial query based on attribute information of the first spatial query SQL information; the attribute information of the first spatial query SQL information includes SQL variable values, range data, statistical information of related objects, and a SQL execution plan.

[0036] Optionally, the obtaining module specifically comprises:

[0037] The obtaining unit is configured to obtain a plurality of pieces of historical spatial query SQL information for spatial query of the electronic map by using a hook mechanism of PostgreSQL.

[0038] Optionally, the device further comprises:

[0039] The information processing module is configured to process the plurality of pieces of historical spatial query SQL information to write into a time range index database of Elasticsearch.

[0040] The reading module is configured to read the time range index database of Elasticsearch by Kibana to obtain query time consumption of the plurality of pieces of historical spatial query SQL information.

[0041] Optionally, the information processing module specifically comprises:

[0042] The information processing unit is configured to process the plurality of pieces of historical spatial query SQL information into a json format to obtain information in the json format.

[0043] The information writing unit is configured to write the information in the json format into the time range index database of Elasticsearch.

[0044] Optionally, the second determining module specifically comprises:

[0045] The reading unit is configured to read a geographic space Map layer by Kibana to determine accuracy of the range data of the spatial query; the geographic space Map layer is made based on a SQL variable value of the first spatial query SQL information and the range data of the first spatial query SQL information.

[0046] And / or,

[0047] The comparing unit is configured to compare statistical information of a related object of the first spatial query SQL information with statistical information of a related object of a current spatial query SQL information to obtain a comparison result; the statistical information of the related object of the first spatial query SQL information is read by Kibana.

[0048] The first determining unit is configured to determine accuracy of the statistical information of the related object of the spatial query according to the comparison result.

[0049] And / or,

[0050] The second determining unit determines the accuracy of the SQL execution plan of the spatial query based on the SQL execution plan of the first spatial query SQL information and by using a spatial query SQL expert library; the SQL execution plan of the first spatial query SQL information is read by Kibana; and the spatial query SQL expert library is a database containing technical optimization rules of the spatial query accumulated according to experiences of making electronic maps.

[0051] Optionally, the apparatus further comprises:

[0052] The third determining module is configured to determine a warning threshold based on the query time consumption of the plurality of pieces of historical spatial query SQL information.

[0053] The judging module is configured to judge whether the query time consumption of the current spatial query SQL information is greater than or equal to the warning threshold.

[0054] The warning module is configured to perform spatial query warning when the query time consumption of the current spatial query SQL information is greater than or equal to the warning threshold.

[0055] The computer device provided by the embodiment of the present specification comprises a memory, a processor and a computer program stored in the memory, and the processor executes the computer program to implement the steps of the spatial query data processing method of the electronic map.

[0056] The computer readable storage medium provided by the embodiment of the present specification has computer instructions stored thereon, and the computer instructions are executed by a processor to implement the steps of the spatial query data processing method of the electronic map.

[0057] The computer program product provided by the embodiment of the present specification comprises computer instructions, and the computer instructions are executed by a processor to implement the steps of the spatial query data processing method of the electronic map.

[0058] The embodiment of the present specification can achieve the following beneficial effects: the accuracy of the spatial query is determined by querying the attribute information of the historical spatial query SQL information whose query time consumption exceeds the preset threshold, and compared with the prior art of determining the accuracy of the spatial query based on only the attribute information of the current spatial query SQL information, the embodiment of the present specification can more comprehensively and accurately determine the accuracy of the spatial query. BRIEF DESCRIPTION OF DRAWINGS

[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present specification or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.

[0060] Figure 1 A flow chart of an electronic map spatial query data processing method provided by the embodiments of the present specification;

[0061] Figure 2 A schematic diagram of an electronic map spatial query data processing device provided by the embodiments of the present specification;

[0062] Figure 3 A schematic diagram of a computer device structure provided by the embodiments of the present specification. DETAILED DESCRIPTION

[0063] In order to make the purpose, technical solutions and advantages of one or more embodiments of the present specification more clear, the technical solutions of one or more embodiments of the present specification will be described clearly and completely in the following with reference to the specific embodiments of the present specification and corresponding drawings. Obviously, the described embodiments are only some embodiments of the present specification, not all embodiments. Based on the embodiments in the present specification, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of one or more embodiments of the present specification.

[0064] The technical solutions provided by the embodiments of the present specification will be described in detail below with reference to the drawings.

[0065] In the process of electronic map making, the efficiency of analyzing spatial query, that is, determining the accuracy of spatial query, is usually in the process of geographic information system running, manually querying the SQL (Structured Query Language, structured query language database) running situation of the current spatial query in the background system, and analyzing by collecting statistical information of related objects of spatial query SQL information and manually replacing spatial query binding variables. However, this method is low in efficiency, and cannot obtain the SQL variable value of spatial query SQL information, nor can it use historical spatial query SQL information, resulting in the inability to accurately determine the accuracy of spatial query.

[0066] In order to solve the defects in the prior art, the present scheme provides the following embodiments:

[0067] Figure 1A flowchart of an electronic map spatial query data processing method provided by an embodiment of the present specification. From a program perspective, the execution subject of the flowchart can be a program or an application client loaded on an application server. As shown in Figure 1 the method can include the following steps:

[0068] Step 110: Obtain a plurality of historical spatial query SQL information for spatial query of the electronic map.

[0069] Spatial query is a general term for related technologies for operating spatial data. Spatial query constructs filtering conditions through spatial position relationships between geometric objects, and queries objects that meet the filtering conditions from existing data.

[0070] Spatial query can be used in the process of making an electronic map. If the spatial query is accurate, the object that meets the condition can be accurately queried in the electronic map. Therefore, whether the spatial query is accurate or not is particularly important.

[0071] Each spatial query corresponds to a piece of spatial query SQL information. The attribute information of each piece of spatial query SQL information includes SQL variable value, range data, related object statistical information, and SQL execution plan. Each spatial query can have an ID. In the present embodiment, the spatial query SQL information corresponding to the spatial query, the SQL variable value, the range data, the related object statistical information, and the SQL execution plan can be obtained according to the ID of the spatial query.

[0072] In step 110, the hook mechanism of PostgreSQL can be used to obtain a plurality of historical spatial query SQL information for spatial query of the electronic map. Specifically, the attribute information of the plurality of historical spatial query SQL information for spatial query of the electronic map can be obtained by snapshot.

[0073] PostgreSQL is a powerful, open-source client / server relational database management system. The hook mechanism of PostgreSQL originates from the Windows platform. The hook mechanism, commonly known as a hook, is a Windows message interception mechanism.

[0074] In one specific embodiment, after obtaining the plurality of historical spatial query SQL information for spatial query of the electronic map, the method can further include:

[0075] processing the plurality of historical spatial query SQL information to write into a time range index database of Elasticsearch;

[0076] The time range index library of Elasticsearch is read by Kibana to obtain the query time consumption of the plurality of pieces of historical spatial query SQL information.

[0077] The Elasticsearch is a distributed, high-scaling, and high-real-time search and data analysis engine, and can be used to search various documents.

[0078] Further, the plurality of pieces of historical spatial query SQL information are processed to be written into the time range index library of Elasticsearch, and specifically can include:

[0079] The plurality of pieces of historical spatial query SQL information are processed into a json format to obtain information in the json format;

[0080] The information in the json format is written into the time range index library of Elasticsearch.

[0081] The json (JavaScript Object Notation, JS object score) is a lightweight data exchange format. The information in the json format is written into the time range index library of Elasticsearch, and specifically can be read by an automatic program to be written into the time range index library of Elasticsearch.

[0082] In the embodiment, the plurality of pieces of historical spatial query SQL information can also be processed into other formats as long as they can be written into the time range index library of Elasticsearch.

[0083] Step 120: determining whether the query time consumption of the plurality of pieces of historical spatial query SQL information exceeds a preset threshold.

[0084] In step 120, the query time consumption of the plurality of pieces of historical spatial query SQL information in the time range index library of Elasticsearch is read by Kibana to determine whether the query time consumption of the plurality of pieces of historical spatial query SQL information exceeds a preset threshold.

[0085] The Kibana is an open-source analysis and visualization platform, and is designed to work with Elasticsearch. The Kibana can be used to search and view the data stored in the time range index library of Elasticsearch, and to interact with the data stored in the time range index library of Elasticsearch.

[0086] The preset threshold in step 120 can be determined according to the query time consumption of the plurality of historical spatial query SQL information, for example, can be determined according to the average value of the query time consumption of the plurality of historical spatial query SQL information.

[0087] If the query time consumption of a piece of historical spatial query SQL information is longer, obviously longer than the average value of the query time consumption of the plurality of historical spatial query SQL information, the spatial query may not be accurate, and the accuracy of the spatial query can be determined by using the historical spatial query SQL information whose query time consumption exceeds the preset threshold.

[0088] Step 130: determining the historical spatial query SQL information whose query time consumption exceeds the preset threshold as the first spatial query SQL information.

[0089] Step 140: determining the accuracy of the spatial query SQL based on the attribute information of the first spatial query SQL information; the attribute information of the first spatial query SQL information includes SQL variable value, range data, related object statistical information and SQL execution plan.

[0090] In step 140, the accuracy of the spatial query is determined based on the attribute information of the first spatial query SQL information, which can specifically be the accuracy of the range data of the spatial query, the accuracy of the statistical information of the related object and the accuracy of the SQL execution plan.

[0091] Specifically, the accuracy of the range data of the spatial query can be determined by reading the geographic space Map layer through Kibana; wherein the geographic space Map layer is made based on the SQL variable value of the first spatial query SQL information in the time range index database of Elasticsearch and the range data of the first spatial query SQL information.

[0092] The geographic space Map layer can visually display the range data of the spatial query SQL information, and by reading the geographic space Map layer through Kibana, the accuracy of the range data of the spatial query can be determined.

[0093] For example, in a certain job scene, such as a certain single-element lane group production process, the range data of the spatial query is reasonable within 1,000, and in the geographic space Map layer, the range data is displayed as 100 million, obviously the range data of the spatial query is unreasonable, and the range data of the spatial query is inaccurate.

[0094] When a program has a bug, it may cause the range of the spatial query to be too large, and then the range data of the spatial query is more, so that the query time consumption is longer.

[0095] In determining the accuracy of the statistical information of the related objects of the spatial query, the statistical information of the related objects of the first spatial query SQL information can be read from the time range index library of Elasticsearch through Kibana, the statistical information of the related objects of the first spatial query SQL information is compared with the statistical information of the related objects of the current spatial query SQL information obtained through the hook mechanism of PostgreSQL, and a comparison result is obtained; and the accuracy of the statistical information of the related objects of the spatial query is determined according to the comparison result.

[0096] For example, the spatial query on RDLINK (road line in an electronic map), the statistical information of the related objects of the first spatial query SQL information is full table scan of 2 million data, 100 blocks (storage block of PostgreSQL database), and the statistical information of the related objects of the current spatial query SQL information is full table scan of 40 million data, 10,000 blocks, obviously the statistical information of the related objects of the spatial query is unreasonable and inaccurate.

[0097] If the statistical information of the related objects of the spatial query is too old, the first spatial query SQL information is not obtained in time, which can cause the CBO (Cost-Based Optimization) optimizer to evaluate the incorrect statistical information of the related objects, and cause the query time to become long. If the statistical information of the related objects of the first spatial query SQL information is full table scan of 35 million data, 8,000 blocks, it can be recognized that the statistical information of the related objects of the spatial query is reasonable and accurate.

[0098] In addition, if the execution plan is not accurate during the spatial query, the query time can also become long. In determining the accuracy of the SQL execution plan of the spatial query, the SQL execution plan of the first spatial query SQL information can be read through Kibana, and the SQL execution plan of the spatial query is determined based on the SQL execution plan of the first spatial query SQL information and the spatial query SQL expert library. The spatial query SQL expert library is a database accumulated according to the experience of making an electronic map, which has precipitated a lot of technical optimization plans of spatial query.

[0099] For example, the spatial query on RDLINK, according to the spatial query SQL expert library, the spatial query on RDLINK needs to use A display function conversion, and the SQL execution plan of the first spatial query SQL information uses B display function conversion, so the SQL execution plan of the spatial query is inaccurate. For another example, the SQL execution plan of the first spatial query does not use the function calculation mode, index mode and query condition in the spatial query SQL expert library, and the SQL execution plan of the spatial query can be recognized as inaccurate.

[0100] In the embodiment, the electronic map spatial query data processing method can further include:

[0101] determining a warning threshold based on the query time consumption of the plurality of historical spatial query SQL information;

[0102] judging whether the query time consumption of the current spatial query SQL information is greater than or equal to the warning threshold;

[0103] if yes, performing spatial query warning.

[0104] The warning threshold can be determined according to the query time consumption of the plurality of historical spatial query SQL information in the Elasticsearch time range index library, for example, can be determined according to the average value of the query time consumption of the plurality of historical spatial query SQL information in the Elasticsearch time range index library.

[0105] The existing spatial query accuracy determination method is very low in efficiency, and cannot obtain the SQL variable value of the spatial query SQL information, that is, cannot accurately determine the accuracy of the range data of the spatial query; in addition, the accuracy of the spatial query cannot be determined according to the attribute information of the historical spatial query SQL information. The embodiments of the present application can analyze the historical spatial query SQL information in a platformized and visualized manner based on PostgreSQL, Elasticsearch and Kibana, so as to determine the efficiency and accuracy of the spatial query. Specifically, the embodiments of the present application can determine the accuracy of the spatial query based on the attribute information of the historical spatial query SQL information, wherein the attribute information of the historical spatial query SQL information includes the SQL variable value, the range data, the statistical information of the related object and the SQL execution plan; and the embodiments of the present application can also obtain the query time consumption of the historical spatial query SQL information, and perform spatial query warning based on the query time consumption of the historical spatial query SQL information, so as to ensure the query efficiency of the spatial query.

[0106] Based on the same idea, the embodiments of the present application also provide a device corresponding to the above method.

[0107] Figure 2 A schematic diagram of an electronic map spatial query data processing device provided by the embodiments of the present application is shown in Figure 2 The device can include:

[0108] The obtaining module 210 is configured to obtain a plurality of historical spatial query SQL information of spatial query for an electronic map;

[0109] The judging module 220 is configured to judge whether the query time consumption of the plurality of historical spatial query SQL information exceeds a preset threshold;

[0110] The first determination module 230 is configured to determine the historical spatial query SQL information with the query time consumption exceeding the preset threshold as first spatial query SQL information.

[0111] The second determination module 240 is configured to determine the accuracy of the spatial query based on attribute information of the first spatial query SQL information; the attribute information of the first spatial query SQL information includes SQL variable values, range data, statistical information of related objects, and SQL execution plans.

[0112] In this embodiment, the acquisition module 210 specifically includes:

[0113] The acquisition unit is configured to acquire a plurality of pieces of historical spatial query SQL information of spatial queries on the electronic map by using a hook mechanism of PostgreSQL.

[0114] In this embodiment, the device further includes:

[0115] The information processing module is configured to process the plurality of pieces of historical spatial query SQL information to write into a time range index database of Elasticsearch.

[0116] The reading module is configured to read the time range index database of Elasticsearch by using Kibana to obtain the query time consumption of the plurality of pieces of historical spatial query SQL information.

[0117] Further, the information processing module specifically includes:

[0118] The information processing unit is configured to process the plurality of pieces of historical spatial query SQL information into a json format to obtain information in the json format.

[0119] The information writing unit is configured to write the information in the json format into the time range index database of Elasticsearch.

[0120] Further, the second determination module 240 specifically includes:

[0121] The reading unit is configured to read a geographic space Map layer by using Kibana to determine the accuracy of the range data of the spatial query; the geographic space Map layer is made based on the SQL variable values of the first spatial query SQL information and the range data of the first spatial query SQL information.

[0122] And / or,

[0123] The comparison unit is configured to compare statistical information of a related object of the first spatial query SQL information with statistical information of a related object of current spatial query SQL information to obtain a comparison result; the statistical information of the related object of the first spatial query SQL information is read by Kibana;

[0124] The first determination unit is configured to determine accuracy of the statistical information of the related object of the spatial query according to the comparison result.

[0125] And / or,

[0126] The second determination unit is configured to determine accuracy of a SQL execution plan of the spatial query based on a SQL execution plan of the first spatial query SQL information by using a spatial query SQL expert library; the SQL execution plan of the first spatial query SQL information is read by Kibana; and the spatial query SQL expert library is a database containing technical optimization rules of the spatial query accumulated according to experience of making electronic maps.

[0127] Further, the apparatus further comprises:

[0128] The third determination module is configured to determine a warning threshold based on query time consumption of the plurality of historical spatial query SQL information.

[0129] The judgment module is configured to judge whether the query time consumption of the current spatial query SQL information is greater than or equal to the warning threshold.

[0130] The warning module is configured to perform spatial query warning when the query time consumption of the current spatial query SQL information is greater than or equal to the warning threshold.

[0131] Based on the same idea, the embodiment of the present application also provides a device corresponding to the above method.

[0132] Figure 3 A computer device structure schematic diagram provided by the embodiment of the present application is shown in FIG. 3. Figure 3 As shown in FIG. 3, the device 300 can include a memory 330, a processor 310 and a computer program 320 stored in the memory 330. The processor 310 executes the computer program 320 to implement the steps of the above method.

[0133] Based on the same idea, the embodiment of the present application also provides a computer readable storage medium having computer instructions stored thereon, which are executed by a processor to implement the steps of the above method.

[0134] Based on the same idea, the embodiment of the present application also provides a computer program product comprising computer instructions, which are executed by a processor to implement the steps of the above method.

[0135] The various embodiments described in this specification are presented by way of example, and each embodiment is not inherently more important than any other embodiment. The embodiments described herein can be combined, other embodiments can be implemented, and some embodiments can be left out, without departing from the scope of the disclosure. In particular, while the embodiments are described in the context of a method embodiment, it should be appreciated that the embodiments can also be implemented in the context of a computer program product, a computer system, or a computer device. Figure 3 The computer device illustrated in the figures is described in relatively simple terms, as it is essentially similar to the method embodiments, and reference is made to the relevant parts of the description of the method embodiments.

[0136] In the 1990s, it was relatively easy to distinguish whether an improvement in a technology was a hardware improvement (e.g., an improvement in the circuit structure of a diode, transistor, switch, etc.) or a software improvement (an improvement in a method flow). However, as technology has evolved, many improvements in method flows today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into a hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A designer programs a digital system "onto" a PLD without having to order a custom integrated circuit chip from a chip manufacturer. Moreover, instead of manually fabricating an integrated circuit chip, today this programming is mostly implemented using "logic compiler" software, which is similar to a software compiler used in program development, and the original code before compilation must also be written in a specific programming language, which is called a hardware description language (HDL), and there are many such languages, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should be aware that, as long as the method flow is logically programmed in one of the above hardware description languages and programmed into an integrated circuit, a hardware circuit that implements the logical method flow can be easily obtained.

[0137] The controller can be implemented in any suitable way, e.g. the controller can take the form of a microprocessor or processor and a computer readable medium storing computer readable program code, e.g. software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91 SAM, Microchip PIC 18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to being implemented in pure computer readable program code form, the controller can perfectly well be implemented by means of logic programmed into logic gates, switches, application specific integrated circuits, programmable logic controllers and embedded microcontrollers, etc. to perform the same functions. The controller can thus be considered as a hardware component, and the means comprised therein for performing various functions can be considered as structures within the hardware component. Alternatively, or even additionally, the means for performing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0138] The systems, apparatuses, modules or units illustrated by the above embodiments can be implemented by computer chips or entities, or products with certain functions. A typical implementation device is a computer. Specifically, the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0139] For the sake of description, the above apparatuses are described in various units by functions respectively. Of course, the functions of the units can be implemented in one or more software and / or hardware in the implementation of the present application.

[0140] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.

[0141] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0142] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0143] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof. Figure 1 one or more flowcharts and / or blocks in the flowcharts and / or combination thereof.

[0144] In one typical configuration, the computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0145] The memory can include non-persistent memory and / or volatile memory, such as random access memory (RAM) about which the processor can execute instructions. The memory can also include non-volatile memory, such as read only memory (ROM) or flash RAM. The memory is an example of computer readable media.

[0146] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0147] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusions, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but also other elements not explicitly listed, or other elements inherent to such a process, method, article or apparatus. Without more limitations, the element defined by the phrase "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0148] Those skilled in the art will appreciate that embodiments of the present application can be provided as a method, system or computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROMs, optical storage devices, etc.) containing computer usable program code.

[0149] The present application can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including memory storage devices.

[0150] The above merely provides an example of the present application, and is not intended to limit the present application. Any modification, equivalent replacement, improvement, etc. within the spirit and principle of the present application should be included in the scope of claims of the present application.

Claims

1. A method for processing spatial query data of an electronic map, characterized in that, include: Retrieve multiple historical spatial query SQL records for spatial queries on electronic maps; Determine whether the query time of the multiple historical space query SQL information exceeds a preset threshold; The historical space query SQL information whose query time exceeds the preset threshold is identified as the first space query SQL information; Based on the attribute information of the first space query SQL information, the accuracy of the space query is determined; The attribute information of the SQL information queried in the first space includes SQL variable values, range data, statistical information of related objects, and SQL execution plan; The determination of the accuracy of the space query based on the attribute information of the first space query SQL information specifically includes: The accuracy of the spatial query range data is determined by reading the geospatial map layer through Kibana. The geospatial map layer is created based on the SQL variable values ​​of the first spatial query SQL information and the range data of the first spatial query SQL information.

2. The method according to claim 1, characterized in that, The process of obtaining multiple historical spatial query SQL records for spatial queries on electronic maps specifically includes: By utilizing PostgreSQL's hook mechanism, we can obtain multiple historical spatial query SQL records for spatial queries on electronic maps.

3. The method according to claim 1 or 2, characterized in that, After obtaining multiple historical spatial query SQL records for spatial queries on the electronic map, the method further includes: The multiple historical spatial query SQL messages are processed and written into the time range index of Elasticsearch. The query time of the multiple historical spatial query SQL information is obtained by reading the time range index of Elasticsearch through Kibana.

4. The method according to claim 3, characterized in that, The process of processing the multiple historical spatial query SQL messages and writing them into the Elasticsearch time-range index specifically includes: The multiple historical space query SQL information are processed into JSON format to obtain JSON format information; Write the JSON-formatted information into the Elasticsearch time-range index.

5. The method according to claim 3, characterized in that, The determination of the accuracy of the space query based on the attribute information of the first space query SQL information specifically includes: The statistical information of the objects related to the SQL query information in the first space is compared with the statistical information of the objects related to the SQL query information in the current space to obtain the comparison result; the statistical information of the objects related to the SQL query information in the first space is read through Kibana; Based on the comparison results, determine the accuracy of the statistical information of the relevant objects in the spatial query; And / or, Based on the SQL execution plan of the first spatial query SQL information, the accuracy of the spatial query SQL execution plan is determined using the spatial query SQL expert database; the SQL execution plan of the first spatial query SQL information is read through Kibana; the spatial query SQL expert database is a database containing technical optimization rules for the spatial query, accumulated based on experience in making electronic maps.

6. The method according to claim 1, characterized in that, The method further includes: Based on the query time of the multiple historical spatial query SQL information, a warning threshold is determined; Determine whether the query time for the current spatial SQL information query is greater than or equal to the warning threshold; If so, a spatial query alert will be issued.

7. A spatial query data processing device for electronic maps, characterized in that, The device includes: The acquisition module is used to acquire multiple historical spatial query SQL information for spatial queries on electronic maps; The judgment module is used to determine whether the query time of the multiple historical spatial query SQL information exceeds a preset threshold; The first determining module is used to determine the historical space query SQL information whose query time exceeds the preset threshold as the first space query SQL information; The second determining module is used to determine the accuracy of the spatial query based on the attribute information of the first spatial query SQL information; the attribute information of the first spatial query SQL information includes SQL variable values, range data, statistical information of related objects, and SQL execution plan; The second determining module specifically includes: The reading unit is used to read the geospatial map layer through Kibana to determine the accuracy of the range data of the spatial query; the geospatial map layer is created based on the SQL variable values ​​of the first spatial query SQL information and the range data of the first spatial query SQL information.

8. A computer device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.

9. A computer-readable storage medium storing computer instructions thereon, characterized in that, When executed by a processor, the computer instructions implement the steps of the method according to any one of claims 1 to 6.

10. A computer program product comprising computer instructions, characterized in that, When executed by a processor, the computer instructions implement the steps of the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Slow query monitoring method and device based on ELK, computer equipment and storage medium

    CN111352921A

  • Database optimization method, database optimization device, electronic equipment and storage medium

    CN113535773A