Geographic element calling method and device, electronic equipment and storage medium

By storing high-frequency data in an in-memory database based on the frequency of usage of geographical feature data and low-frequency data in the back-end database, the problem of slow data retrieval and high disk I/O pressure is solved, and the rapidity is achieved Efficient data access and storage optimization.

CN119311211AInactive Publication Date: 2025-01-14ANHUI IFLYTEK INTELLIGENT SYST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411236646.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2025-01-14
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, geographic element data needs to be cached to memory when retrieved from the backend database, resulting in slow speed and high disk I/O pressure, which cannot effectively improve the speed of geographic element calling.

Method used

By obtaining the frequency of usage of geographic feature data, the data used for high frequency is stored in the in-memory database and the data used for low frequency is stored in the back-end database, thereby quickly retrieving high frequency data in the in-memory database and reducing disk I/O operations .

Benefits of technology

It effectively improves the call speed of geographical feature, reduces disk I/O pressure, and optimizes the storage pressure of the in-memory database, ensuring that the fast access of high-frequency data and non-real-time call of low-frequency data does not affect the overall speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311211A_ABST
    Figure CN119311211A_ABST
Patent Text Reader

Abstract

The invention discloses a geographic element calling method and device, electronic equipment and a storage medium. The method comprises the steps that the use frequency of target geographic element data to be called is acquired; calling the target geographic element data from the memory database in response to the condition that the use frequency of the target geographic element data meets a high-frequency condition; wherein the memory database is used for storing a plurality of geographic element data of which the use frequency meets a high-frequency condition; calling the target geographic element data from a back-end database in response to the condition that the use frequency of the target geographic element data meets a low-frequency condition; wherein the back-end database is used for storing a plurality of geographic element data of which the use frequency meets the low-frequency condition. In this way, the geographic element calling speed can be increased, and the disk I / O pressure can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of geographic information system technology, and in particular to a geographic element calling method, device, electronic device and storage medium. Background Art

[0002] Currently, the backend database stores geographic feature data on disk. When relevant geographic feature data needs to be retrieved from the backend database, it is necessary to first cache the relevant geographic feature data from disk to memory, and then retrieve the relevant geographic feature data from memory, resulting in very slow retrieval of geographic feature data and high disk I / O pressure. Summary of the invention

[0003] The main technical problem solved by the present application is to provide a geographic element calling method, device, electronic device and storage medium, which can improve the geographic element calling speed and reduce the disk I / O pressure.

[0004] In order to solve the above technical problems, a technical solution adopted in the present application is: to provide a geographic element calling method, the method comprising: obtaining the usage frequency of the target geographic element data to be called; in response to the usage frequency of the target geographic element data satisfying the high frequency condition, calling the target geographic element data from the memory database; wherein the memory database is used to store a number of geographic element data whose usage frequency satisfies the high frequency condition; in response to the usage frequency of the target geographic element data satisfying the low frequency condition, calling the target geographic element data from the back-end database; wherein the back-end database is used to store a number of geographic element data whose usage frequency satisfies the low frequency condition.

[0005] To solve the above technical problems, another technical solution adopted by the present application is: to provide a geographic element calling method, the method comprising: obtaining a number of reference geographic element data to be written; for each reference geographic element data to be written, in response to the usage frequency of the reference geographic element data satisfying the high-frequency condition, writing the reference geographic element data to be written into the memory database, so that the client can retrieve the geographic element data whose usage frequency satisfies the high-frequency condition from the memory database; in response to the usage frequency of the reference geographic element data satisfying the low-frequency condition, writing the reference geographic element data to be written into the back-end database, so that the client can retrieve the geographic element data whose usage frequency satisfies the low-frequency condition from the back-end database.

[0006] To solve the above technical problems, another technical solution adopted in the present application is: to provide a geographic element calling device, which includes an acquisition module, a first calling module and a second calling module; the acquisition module is used to obtain the usage frequency of the target geographic element data to be called; the first calling module is used to call the target geographic element data from the memory database in response to the usage frequency of the target geographic element data meeting the high-frequency condition; wherein the memory database is used to store a number of geographic element data whose usage frequency meets the high-frequency condition; the second calling module is used to call the target geographic element data from the back-end database in response to the usage frequency of the target geographic element data meeting the low-frequency condition.

[0007] To solve the above technical problems, another technical solution adopted in the present application is: to provide a geographic element calling device, which includes an acquisition module, a first writing module and a second writing module; the acquisition module is used to acquire a number of reference geographic element data to be written; the first writing module is used to, for each reference geographic element data to be written, in response to the usage frequency of the reference geographic element data meeting the high-frequency condition, write the reference geographic element data to be written into a memory database, so that the client can retrieve the geographic element data whose usage frequency meets the high-frequency condition from the memory database; the second writing module is used to, in response to the usage frequency of the reference geographic element data meeting the low-frequency condition, write the reference geographic element data to be written into a back-end database, so that the client can retrieve the geographic element data whose usage frequency meets the low-frequency condition from the back-end database.

[0008] In order to solve the above technical problems, another technical solution adopted by the present application is: to provide an electronic device, the electronic device includes a processor and a memory, the memory stores program instructions, and the program instructions can be executed to implement the above method.

[0009] In order to solve the above technical problem, another technical solution adopted by the present application is: providing a computer-readable storage medium, which is used to store program instructions, and the program instructions can be executed to implement the above method.

[0010] The above technical solution stores several geographic element data that meet the high-frequency conditions in the memory database, that is, stores several commonly used geographic element data in the memory database. When it is determined that the target geographic element data is commonly used geographic element data, it can be quickly retrieved from the memory database, effectively reducing the disk I / O pressure.

[0011] Some geographic element data that meet the low-frequency condition are stored in the back-end database, that is, some infrequently used geographic element data are stored in the back-end database, so the disk will not be accessed frequently, effectively reducing the disk I / O pressure; in addition, the calls to infrequently used geographic element data are rare, and the retrieval speed of some infrequently used geographic element data is slow, which basically does not affect the speed of the overall geographic element call; furthermore, since infrequently used geographic element data are stored in the back-end database instead of storing all geographic element data in the memory database, the storage pressure of the memory database can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a flowchart of an embodiment of a geographic element calling method provided by the present application;

[0013] Figure 2 It is a schematic diagram of the process of retrieving geographic element data from the memory database provided by this application;

[0014] Figure 3 It is a flowchart of another embodiment of the geographic element calling method provided by the present application;

[0015] Figure 4 It is a structural diagram of an embodiment of a geographic element calling device provided by the present application;

[0016] Figure 5 It is a structural schematic diagram of another embodiment of the geographic element calling device provided by the present application;

[0017] Figure 6 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application;

[0018] Figure 7 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION

[0019] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.

[0020] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.

[0021] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.

[0022] See also Figure 1 , Figure 1 is a flowchart of an embodiment of a geographic element calling method provided by the present application. It should be noted that if there are substantially the same results, this embodiment does not Figure 1 The process sequence shown is limited. Figure 1 As shown, this embodiment includes:

[0023] Step S11: Obtain the usage frequency of the target geographic element data to be called.

[0024] In this implementation, the usage frequency of the target geographic element data to be called is obtained, and subsequently, based on the usage frequency of the target geographic element data to be called, it can be determined whether the target geographic element data to be called is high-frequency called geographic element data or low-frequency called geographic element data, thereby determining whether to retrieve this target geographic element data from the in-memory database or the back-end database.

[0025] In one implementation, the usage frequency of the target geographic element data to be called may be determined based on the historical usage frequency of the target geographic element data.

[0026] In one embodiment, in response to a geographic element loading instruction executed by a user on a map, the usage frequency of the target geographic element data to be called is obtained, so that the target geographic element data can be subsequently retrieved from a database matching its usage frequency.

[0027] In GIS (Geographic Information System), geographic elements are the basic units that constitute the system. They represent geographic entities in the real world and have spatial location and attribute characteristics. Elements are map elements with geometric shapes that can represent physical entities in GIS. Among them, there are several types: the first is point elements, which indicate geographic entities with clear locations and no area or length, such as cities, mountains, manhole covers, etc. The second is line elements, which represent geographic entities with length but no width, such as roads, rivers, boundaries, etc.; they can be composed of multiple points (vertices) to form continuous line segments. The third is surface elements, which represent geographical areas with clear boundaries and areas, such as lakes, forests, administrative areas, etc.; they are composed of a series of closed line segments (rings) to form closed polygons. It should be noted that there are other types of elements in the GIS system, which will not be introduced one by one here.

[0028] Geographic feature data usually includes the symbol system of geographic features, the spatial coordinates of geographic features, the attribute fields of geographic features, and other information of geographic features. The symbol system of geographic features defines the display style of geographic features on the map, including color, shape, size, etc. Through the symbol system, the geographic features in the feature layer can be presented on the map in an intuitive and easy-to-understand way. (Take hospitals as an example. In order to distinguish different hospitals on the map, different hospitals have different symbols. The symbol settings can be combined with the attribute fields of the hospital (such as hospital type, number of beds, service scope, etc.) to represent.) The spatial coordinates of geographic features are the location identifiers of geographic features in geographic space. The attribute fields of geographic features are used to store information related to geographic features, such as name, type, description, creation time, etc. Other information of geographic features includes the source, creation time, modification time, etc. of the geographic features.

[0029] In GIS systems, different geographic elements are used at different frequencies, some are frequently used geographic elements, and some are less frequently used geographic elements. Among them, frequently used geographic elements include point elements, line elements, surface elements, and annotation elements (used to add text descriptions on maps, such as place names, road names, and labels, etc.); less frequently used geographic elements include multi-point elements (composed of multiple points, usually used to represent a large number of discretely distributed point objects), polyhedron elements (used to represent three-dimensional objects in three-dimensional space, such as buildings, mountains, etc.) and special formats or custom elements.

[0030] Step S12: In response to the usage frequency of the target geographic element data satisfying the high frequency condition, calling the target geographic element data from the memory database.

[0031] In this embodiment, in response to the usage frequency of the target geographic element data satisfying the high frequency condition, the target geographic element data is retrieved from the memory database, wherein the memory database is used to store a number of geographic element data whose usage frequency satisfies the high frequency condition. In other words, the memory database is used to store a number of geographic element data whose usage frequency satisfies the high frequency condition, that is, the memory database is used to store a number of frequently used or frequently used geographic element data. When it is determined that the usage frequency of the target geographic element data to be called satisfies the high frequency condition, it can be considered that the target geographic element data to be called is a frequently used or frequently used geographic element data, and then the target geographic element data must be retrieved from the memory database storing a number of frequently used or frequently used geographic element data.

[0032] In-memory databases store geographic feature data in memory, reducing I / O operations and being able to complete data operations within milliseconds or even microseconds, that is, providing extremely fast data access speeds. Backend databases store geographic feature data on disk. When you need to retrieve relevant geographic feature data from the backend database, you need to first cache the relevant geographic feature data from the disk to the memory, and then retrieve the relevant geographic feature data from the memory, which results in very slow retrieval of geographic feature data and high disk I / O pressure.

[0033] If some geographic element data that are used frequently meet the high-frequency condition are stored in the back-end database, the disk will be frequently accessed, the disk I / O pressure is large, and the geographic element data retrieval speed is slow. Therefore, some geographic element data that are used frequently meet the high-frequency condition are stored in the memory database, that is, some commonly used geographic element data are stored in the memory database. When it is determined that the target geographic element data is commonly used geographic element data, it can be quickly retrieved from the memory database, which effectively reduces the disk I / O pressure. In addition, retrieving frequently used or commonly used geographic element data from the memory database reduces the disk I / O pressure, so it can support calling more geographic element data from the memory database at one time.

[0034] In one embodiment, the memory database may be a Redis database. Redis is a high-performance key-value database, often referred to as a data structure server, because the Redis database supports multiple types of data structures, such as strings, hashes, lists, sets, sorted sets, bitmaps, hyperloglogs, and geospatial index radius queries. The Redis database provides fast access speed by storing data in memory, and it also has a persistence function that can save data in memory to disk so that data can be restored when restarted.

[0035] Of course, in other implementations, the in-memory database can also be a Memcached database, a VoltDB database, or a TimesTen database, which is not limited here. Memcached is a high-performance distributed memory object caching system that provides fast read and write access by storing data in memory; Memcached supports functions such as distributed caching and data sharding, and is suitable for scenarios that require fast access to large amounts of data. VoltDB is an in-memory relational database system designed for real-time applications; it supports ACID transactions, distributed deployment, and scalability, and provides highly available and persistent data storage; the VoltDB database is suitable for scenarios that require real-time data processing and high-performance transaction processing. TimesTen is an in-memory relational database system that can be used for real-time data processing and high-performance transaction processing; it provides a hybrid mode of in-memory database and disk database, and can store data in memory or on disk as needed.

[0036] It should be noted that the high frequency condition is not limited and can be set according to actual usage needs; for example, the high frequency condition is that the usage frequency is greater than or equal to the first frequency threshold.

[0037] Step S13: In response to the usage frequency of the target geographic element data satisfying the low frequency condition, the target geographic element data is called from the backend database.

[0038] In this embodiment, in response to the usage frequency of the target geographic element data satisfying the low-frequency condition, the target geographic element data is retrieved from the back-end database, wherein the back-end database is used to store a number of geographic element data whose usage frequency satisfies the low-frequency condition. In other words, the back-end database is used to store a number of geographic element data whose usage frequency satisfies the low-frequency condition, that is, the back-end database is used to store a number of geographic element data that are used infrequently or infrequently. When it is determined that the usage frequency of the target geographic element data to be called satisfies the low-frequency condition, it can be considered that the target geographic element data to be called is a low-frequency or infrequently used geographic element data, and then the target geographic element data must be retrieved from the back-end database storing a number of low-frequency or infrequently used geographic element data.

[0039] In-memory databases store geographic feature data in memory, reducing I / O operations and being able to complete data operations within milliseconds or even microseconds, that is, providing extremely fast data access speeds. Backend databases store geographic feature data on disk. When you need to retrieve relevant geographic feature data from the backend database, you need to first cache the relevant geographic feature data from the disk to the memory, and then retrieve the relevant geographic feature data from the memory, which results in very slow retrieval of geographic feature data and high disk I / O pressure.

[0040] For some geographic element data that meet the low-frequency condition, that is, some geographic element data that are not often used or not frequently used, if some infrequently used geographic element data are stored in the back-end database, the disk will not be accessed frequently, which effectively reduces the disk I / O pressure; in addition, the calls to infrequently used geographic element data are rare, and the retrieval speed of some infrequently used geographic element data is slow, which basically does not affect the speed of the overall geographic element call; furthermore, since infrequently used geographic element data are stored in the back-end database instead of storing all geographic element data in the memory database, the storage pressure of the memory database can be reduced.

[0041] It should be noted that the low-frequency condition is not limited and can be specifically set according to actual use needs; for example, the low-frequency condition is that the use frequency is less than or equal to the second frequency threshold. In one embodiment, the geographic element data in the memory database and the geographic element data in the back-end database can be updated regularly. For example, if a certain geographic element data in the back-end database is frequently called, the geographic element data can be written to the memory database, or, while writing the geographic element data to the memory database, the geographic element data can be deleted from the back-end database.

[0042] In one embodiment, the backend database is also used to store a number of geographic element data whose usage frequency meets the high-frequency condition, and the calling priority of the geographic element data meeting the high-frequency condition in the memory database is higher than the geographic element data meeting the high-frequency condition in the backend database.

[0043] That is to say, the in-memory database is only used to store some geographic element data that meet the high-frequency conditions, and the back-end database is used to store some geographic element data that meet the high-frequency conditions and some geographic element data that meet the low-frequency conditions. However, the calling priority of the geographic element data that meet the high-frequency conditions in the in-memory database is higher than that of the geographic element data that meet the high-frequency conditions in the back-end database, that is, the high-frequency geographic element data will be called from the in-memory database first.

[0044] In a specific embodiment, the usage frequency of the target geographic element data to be called meets the high-frequency condition, and in response to an exception in the called target geographic element data or a failure in calling the target geographic element data from the memory database, the target geographic element data is called from the back-end database. The frequently used target geographic element data called from the memory database may be abnormal, or in other words, the frequently used target geographic element data cannot be called from the memory database, then the target geographic element data can be retrieved from the back-end database that also stores several frequently used geographic element data. In other words, when an exception occurs in the retrieval from the memory database, the several frequently used geographic element data stored in the back-end database can be regarded as a backup, which can ensure that the frequently used geographic element data can be successfully and accurately retrieved.

[0045] In one embodiment, the target geographic element data is retrieved from the database, specifically: a retrieval instruction for the target geographic element data is sent to the database; and the target geographic element data fed back by the database is obtained, wherein the target geographic element data is retrieved from the database based on the retrieval instruction. That is, after determining the data provider that provides the target geographic element data, a retrieval instruction for the target geographic element data is sent to the data provider, so as to retrieve the target geographic element data from the data provider based on the retrieval instruction.

[0046] In a specific implementation, sending a call instruction about the target geographic element data to the database specifically includes: sending a call instruction to the data call server, so that the data call server searches for the target geographic element data from the database after receiving the call instruction; and receiving the target geographic element data fed back by the data call server. In other words, specifically sending a call instruction about the target geographic element data to the data call server, and the data call server searches for the target geographic element data from the database.

[0047] For example, if Figure 2 As shown, Figure 2 This is a flow chart of retrieving geographic feature data from an in-memory database provided by the present application, taking the in-memory database as a Redis database, the data retrieval server as a Rest server, and the usage frequency of the target geographic feature data meeting the high-frequency condition as an example: the client generates a retrieval instruction for the target geographic feature data and sends the retrieval instruction to the Rest server; after receiving the data retrieval instruction, the Rest server searches for the target geographic feature data in the in-memory database and feeds it back to the client.

[0048] It should be noted that the Rest interface is first encapsulated by Python or Java code, and then the Rest service is published on the server, so that the client can use JavaScript to search for the target geographic feature data from the memory database through the server encapsulated with the Rest interface to visualize the target geographic feature data.

[0049] In addition, the process of rendering and loading geographic features on a map includes: initializing a map object and initializing a feature layer; then, reading geographic feature data from a memory database and / or a backend database, and encapsulating the read geographic feature data into a layer object; then, adding the layer object to the feature layer to render and load the geographic features on the map object. After adding the layer object to the feature layer, the layer object can be set, such as geometric parameter settings (such as geometric type, coordinate reference, etc.), attribute settings (such as name, value), symbol settings (color, type, size), etc.

[0050] See also Figure 3 , Figure 3 FIG. 1 is a flowchart of another embodiment of the geographic element calling method provided by the present application. It should be noted that if there are substantially the same results, this embodiment does not necessarily use Figure 3 The process sequence shown is limited. Figure 3 As shown, this embodiment includes:

[0051] Step S31: Obtain some reference geographic element data to be written.

[0052] In this implementation, a number of reference geographic element data to be written are obtained.

[0053] In one embodiment, obtaining a number of reference geographic element data to be written specifically includes: obtaining a number of first geographic data; for each first geographic data, extracting geographic attribute data from the first geographic data as the reference geographic element data to be written. Storing complete geographic element data in a database will cause storage pressure on the database, so the geographic attribute data is extracted from the geographic element data and the extracted geographic attribute data is stored.

[0054] The attributes may be name, address, coordinates, city, county, category, etc., which are not limited here.

[0055] For example, taking the attributes of name, address, coordinates and category as an example: the reference geographic element data A to be written is extracted for geographic data, and the name "Palace Museum", the address "No. 4 Jingshanqian Street, Dongcheng District, Beijing", the coordinates "Longitude: 116.402976 Latitude: 39.915134", and the category "Scenic Spot Museum" are obtained.

[0056] For another example, taking the attributes of name, address, coordinates, city, district and category as an example: the reference geographic element data A to be written is extracted with geographic data, and the name "Palace Museum", the address "No. 4 Jingshanqian Street, Dongcheng District, Beijing", the coordinates "longitude: 116.402976 latitude: 39.915134", the category "Scenic Spot Museum", the city "Beijing", and the district "Dongcheng District" are obtained.

[0057] For another example, taking the attributes of name, address, coordinates, city, district and category as an example: the reference geographic element data B to be written is extracted with geographic data to obtain the name "Temple of Heaven Park", the address "No. 1, Tiantandongli, Dongcheng District, Beijing", the coordinates "Longitude: 116.410829 Latitude: 39.881913", the category "Scenic Spots | Parks", the city "Beijing", and the district "Dongcheng District".

[0058] In a specific implementation, geographic attribute data is extracted from the first geographic data as reference geographic element data to be written, specifically: geographic attribute data is extracted from the first geographic data; geographic attribute data is preprocessed and converted to a first format in sequence, and the preprocessed and format-converted geographic attribute data is used as reference geographic element data to be written. The geographic attribute data is preprocessed to improve the quality of the geographic attribute data. The first format conversion of the geographic attribute data is performed to convert the geographic attribute data into a format that can be used in the GIS system, so that the geographic element data can be directly used after being retrieved from the database.

[0059] The preprocessing may be to delete duplicate, missing or erroneous data in the geographic attribute data, or to repair topological errors or geometric errors in the geographic attribute data. In addition, the first format may be a Shapefile, etc., which is not limited here.

[0060] In one implementation, before writing the reference geographic element data into the corresponding database, the reference geographic element data is format converted to convert the reference geographic element data into a writing format that matches the database.

[0061] That is, before writing the reference geographic feature data into the corresponding database, the reference geographic feature data needs to be converted into a writing format that matches the database, so that the database can stably store the written reference geographic feature data.

[0062] For example, when the in-memory database is a Redis database, the reference geographic feature data can be converted into a JSON format.

[0063] In a specific implementation, the reference geographic element data may be written into the database via Python or Java code.

[0064] Step S32: For each reference geographic element data to be written, in response to the usage frequency of the reference geographic element data satisfying the high frequency condition, the reference geographic element data to be written is written into the memory database.

[0065] In this implementation, for each reference geographic element data to be written, in response to the usage frequency of the reference geographic element data satisfying the high-frequency condition, the reference geographic element data to be written is written into the memory database, so that the client can retrieve the geographic element data whose usage frequency satisfies the high-frequency condition from the memory database.

[0066] In-memory databases store geographic feature data in memory, reducing I / O operations and being able to complete data operations within milliseconds or even microseconds, that is, providing extremely fast data access speeds. Backend databases store geographic feature data on disk. When you need to retrieve relevant geographic feature data from the backend database, you need to first cache the relevant geographic feature data from the disk to the memory, and then retrieve the relevant geographic feature data from the memory, which results in very slow retrieval of geographic feature data and high disk I / O pressure.

[0067] Several reference geographic element data that meet the high-frequency condition are used frequently, that is, several reference geographic element data that are often used or frequently used. If the frequently used reference geographic element data are stored in the back-end database, the disk will be frequently accessed, the disk I / O pressure is large, and the reference geographic element data retrieval speed is slow. Therefore, several reference geographic element data that meet the high-frequency condition are stored in the memory database, that is, several commonly used reference geographic element data are stored in the memory database. When it is determined that the geographic element data to be called is the commonly used geographic element data, it can be quickly retrieved from the memory database, which effectively reduces the disk I / O pressure. In addition, retrieving frequently used geographic element data from the memory database reduces the disk I / O pressure, so it can support calling more geographic element data from the memory database at one time.

[0068] Step S33: In response to the usage frequency of the reference geographic element data satisfying the low-frequency condition, the reference geographic element data to be written is written into the backend database.

[0069] In this implementation, for each reference geographic element data to be written, in response to the usage frequency of the reference geographic element data satisfying the low-frequency condition, the reference geographic element data to be written is written into the back-end database, so that the client can retrieve the geographic element data whose usage frequency satisfies the low-frequency condition from the back-end database.

[0070] In-memory databases store geographic feature data in memory, reducing I / O operations and being able to complete data operations within milliseconds or even microseconds, that is, providing extremely fast data access speeds. Backend databases store geographic feature data on disk. When you need to retrieve relevant geographic feature data from the backend database, you need to first cache the relevant geographic feature data from the disk to the memory, and then retrieve the relevant geographic feature data from the memory, which results in very slow retrieval of geographic feature data and high disk I / O pressure.

[0071] If some reference geographic feature data that are not frequently used or will not be used frequently are stored in the back-end database, the disk will not be accessed frequently, which effectively reduces the disk I / O pressure. In addition, there are few calls to the infrequently used reference geographic feature data, and the retrieval speed of some infrequently used reference geographic feature data is slow, which basically does not affect the speed of the overall geographic feature call. Furthermore, since the infrequently used reference geographic feature data are stored in the back-end database instead of storing all the reference geographic feature data in the memory database, the storage pressure of the memory database can be reduced.

[0072] See also Figure 4 , Figure 4 It is a structural diagram of an embodiment of a geographic element calling device provided by the present application. The geographic element calling device 40 includes an acquisition module 41, a first calling module 42 and a second calling module 43. The acquisition module 41 is used to obtain the usage frequency of the target geographic element data to be called; the first calling module 42 is used to call the target geographic element data from the memory database in response to the usage frequency of the target geographic element data meeting the high frequency condition; wherein the memory database is used to store a number of geographic element data whose usage frequency meets the high frequency condition; the second calling module 43 is used to call the target geographic element data from the backend database in response to the usage frequency of the target geographic element data meeting the low frequency condition; wherein the backend database is used to store a number of geographic element data whose usage frequency meets the low frequency condition.

[0073] Among them, the above-mentioned memory database includes a Redis database.

[0074] Among them, the above-mentioned backend database is also used to store a number of geographic element data whose usage frequency meets the high-frequency conditions. The calling priority of the geographic element data meeting the high-frequency conditions in the memory database is higher than the geographic element data meeting the high-frequency conditions in the backend database.

[0075] The usage frequency of the target geographic element data to be called meets the high frequency condition; in response to an abnormality in the called target geographic element data or a failure in calling the target geographic element data from the memory database, the target geographic element data is called from the backend database.

[0076] Retrieving the target geographic element data from the database includes: sending a retrieval instruction about the target geographic element data to the database; obtaining the target geographic element data fed back by the database; wherein the target geographic element data is retrieved from the database based on the retrieval instruction.

[0077] Among them, sending a retrieval instruction about the target geographic element data to the database includes: sending a retrieval instruction to a data retrieval server, so that the data retrieval server searches for the target geographic element data from the database after receiving the retrieval instruction; receiving the target geographic element data fed back by the data retrieval server.

[0078] See also Figure 5 , Figure 5 It is a structural diagram of another embodiment of the geographic element calling device provided by the present application. The geographic element calling device 50 includes an acquisition module 51, a first writing module 52 and a second writing module 53. The acquisition module 51 is used to acquire a number of reference geographic element data to be written; the first writing module 52 is used for, for each reference geographic element data to be written, in response to the usage frequency of the reference geographic element data meeting the high frequency condition, writing the reference geographic element data to be written into the memory database, so that the client can retrieve the geographic element data whose usage frequency meets the high frequency condition from the memory database; the second writing module 53 is used for, in response to the usage frequency of the reference geographic element data meeting the low frequency condition, writing the reference geographic element data to be written into the back-end database, so that the client can retrieve the geographic element data whose usage frequency meets the low frequency condition from the back-end database.

[0079] The acquisition module 51 is used to acquire a number of reference geographic element data to be written, including: acquiring a number of first geographic data; for each first geographic data, extracting geographic attribute data from the first geographic data as the reference geographic element data to be written.

[0080] Among them, the acquisition module 51 is used to extract geographic attribute data from the first geographic data as reference geographic element data to be written, including: extracting geographic attribute data from the first geographic data; preprocessing and converting the geographic attribute data into a first format in sequence, and using the preprocessed and format-converted geographic attribute data as reference geographic element data to be written.

[0081] The acquisition module 51 is used to convert the reference geographic element data into a writing format that matches the database before writing the reference geographic element data into the corresponding database.

[0082] See also Figure 6 , Figure 6 6 is a schematic diagram of the structure of an embodiment of an electronic device provided by the present application. The electronic device 60 includes a memory 61 and a processor 62 coupled to each other, and the processor 62 is used to execute program instructions stored in the memory 61 to implement the steps of any of the above-mentioned geographic element calling method embodiments. In a specific implementation scenario, the electronic device 60 may include but is not limited to: a microcomputer, a server, and in addition, the electronic device 60 may also include a mobile device such as a laptop computer and a tablet computer, which is not limited here.

[0083] Specifically, the processor 62 is used to control itself and the memory 61 to implement the steps of any of the above-mentioned geographic element calling method embodiments. The processor 62 can also be called a CPU (Central Processing Unit). The processor 62 may be an integrated circuit chip with signal processing capabilities. The processor 62 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 62 can be implemented by an integrated circuit chip.

[0084] See also Figure 7 , Figure 7It is a structural diagram of an embodiment of a computer-readable storage medium provided by the present application. The computer-readable storage medium 70 of the embodiment of the present application stores program instructions 71, and when the program instructions 71 are executed, the method provided by any embodiment of the geographic element calling method of the present application and any non-conflicting combination is implemented. Among them, the program instructions 71 can form a program file and be stored in the above-mentioned computer-readable storage medium 70 in the form of a software product, so that a computer device (which can be a personal computer, server, etc.) executes all or part of the steps of each implementation method of the present application. The aforementioned computer-readable storage medium 70 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, or a terminal device such as a computer, a server, a mobile phone, and a tablet.

[0085] If the technical solution of this application involves personal information, the product using the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using the technical solution of this application has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, clear and prominent signs are set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to the collection of his or her personal information; or on the device that processes personal information, the personal information processing rules are notified by obvious signs / information, and the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among them, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.

[0086] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A geographic element calling method, characterized in that: The method comprises: Obtain the usage frequency of the target geographic feature data to be called; In response to the usage frequency of the target geographic element data satisfying the high frequency condition, calling the target geographic element data from the memory database; wherein the memory database is used to store a plurality of geographic element data whose usage frequency satisfies the high frequency condition; In response to the usage frequency of the target geographic element data satisfying the low frequency condition, the target geographic element data is called from a backend database; wherein the backend database is used to store a number of geographic element data whose usage frequency satisfies the low frequency condition.

2. The method according to claim 1, characterized in that The memory database includes a Redis database.

3. The method according to claim 1, characterized in that The backend database is also used to store a number of geographic element data whose usage frequency meets the high-frequency condition. The calling priority of the geographic element data meeting the high-frequency condition in the memory database is higher than the geographic element data meeting the high-frequency condition in the backend database.

4. The method according to claim 3, characterized in that The usage frequency of the target geographic element data to be called meets the high frequency condition; the method further includes: In response to the called target geographic element data being abnormal or the call of the target geographic element data from the memory database failing, the target geographic element data is called from the backend database.

5. The method according to claim 1, characterized in that Retrieving the target geographic element data from a database includes: Sending a retrieval instruction about the target geographic element data to the database; The target geographic element data fed back by the database is obtained; wherein the target geographic element data is searched from the database based on the calling instruction.

6. The method according to claim 5, characterized in that The sending of a retrieval instruction about the target geographic element data to the database includes: Sending the retrieval instruction to a data retrieval server, so that the data retrieval server searches for the target geographic element data from the database after receiving the retrieval instruction; Receive the target geographic element data fed back by the data retrieval server.

7. A geographic element calling method, characterized in that: The method comprises: Obtain some reference geographic feature data to be written; For each of the reference geographic element data to be written, in response to the usage frequency of the reference geographic element data satisfying the high frequency condition, writing the reference geographic element data to be written into the memory database, so that the client can retrieve the geographic element data whose usage frequency satisfies the high frequency condition from the memory database; In response to the usage frequency of the reference geographic element data satisfying the low frequency condition, the reference geographic element data to be written is written into a backend database, so that the client can retrieve the geographic element data whose usage frequency satisfies the low frequency condition from the backend database.

8. The method according to claim 7, characterized in that The step of obtaining a plurality of reference geographic element data to be written includes: Acquiring some first geographic data; For each of the first geographic data, geographic attribute data is extracted from the first geographic data as the reference geographic element data to be written.

9. The method according to claim 8, characterized in that The step of extracting geographic attribute data from the first geographic data as the reference geographic element data to be written includes: Extracting the geographic attribute data from the first geographic data; The geographic attribute data is preprocessed and converted into a first format in sequence, and the preprocessed and format-converted geographic attribute data is used as the reference geographic element data to be written.

10. The method according to claim 7, characterized in that Before writing the reference geographic element data into the corresponding database, the method further includes: The reference geographic element data is format converted to convert the reference geographic element data into a writing format matching the database.

11. A geographic element calling device, characterized in that: The device comprises: An acquisition module, used to acquire the usage frequency of the target geographic element data to be called; A first calling module is used to call the target geographic element data from the memory database in response to the usage frequency of the target geographic element data meeting the high frequency condition; wherein the memory database is used to store a plurality of geographic element data whose usage frequency meets the high frequency condition; The second calling module is used to call the target geographic element data from the backend database in response to the usage frequency of the target geographic element data satisfying the low frequency condition; wherein the backend database is used to store a number of geographic element data whose usage frequency satisfies the low frequency condition.

12. A geographic element calling device, characterized in that: The device comprises: An acquisition module is used to acquire a number of reference geographic element data to be written; A first writing module is used for writing each reference geographic element data to be written into a memory database in response to the usage frequency of the reference geographic element data satisfying a high frequency condition, so that the client can retrieve the geographic element data whose usage frequency satisfies the high frequency condition from the memory database; The second writing module is used to write the reference geographic element data to be written into the back-end database in response to the usage frequency of the reference geographic element data satisfying the low-frequency condition, so that the client can retrieve the geographic element data whose usage frequency satisfies the low-frequency condition from the back-end database.

13. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory stores program instructions, and the program instructions can be executed to implement the method according to any one of claims 1-10.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program instructions, and the program instructions can be executed to implement the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Writing data to different storage devices based on write frequency

    CN101874239A

  • Data storage method and device, electronic equipment and storage medium

    CN117742567A