CN117874371A - Method, system, medium and equipment for inquiring point of interest storage under administrative division - Google Patents

Method, system, medium and equipment for inquiring point of interest storage under administrative division Download PDF

Info

Publication number
CN117874371A
CN117874371A CN202410271983.6A CN202410271983A CN117874371A CN 117874371 A CN117874371 A CN 117874371A CN 202410271983 A CN202410271983 A CN 202410271983A CN 117874371 A CN117874371 A CN 117874371A
Authority
CN
China
Prior art keywords
data
interest
point data
administrative division
interest point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410271983.6A
Other languages
Chinese (zh)
Other versions
CN117874371B (en
Inventor
高强
许宏刚
李目贤
蒋如乔
韩佳轩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Yuance Information Technology Co ltd
Original Assignee
Yuance Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yuance Information Technology Co ltd filed Critical Yuance Information Technology Co ltd
Priority to CN202410271983.6A priority Critical patent/CN117874371B/en
Publication of CN117874371A publication Critical patent/CN117874371A/en
Application granted granted Critical
Publication of CN117874371B publication Critical patent/CN117874371B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Storage Device Security (AREA)

Abstract

The invention relates to the technical field of data processing of geographic information platforms, and discloses a method, a system, a medium and equipment for inquiring point of interest storage under administrative division, wherein the method comprises the following steps: acquiring administrative division information corresponding to the point of interest data and performing segmentation processing according to the administrative division information to obtain a division table; constructing a lock-free queue comprising a plurality of spaces in a memory, encrypting the interest point data according to administrative division information, combining shift operation and weighting operation, storing the encrypted interest point data in one space of the lock-free queue, reading the encrypted interest point data from the lock-free queue, storing the encrypted interest point data in a corresponding sub-table in a database, and storing the interest point data under each sub-table by using a full-scale storage mode; inquiring the sub-table through administrative division information, further inquiring the interest point data in the sub-table, decrypting the interest point data obtained by inquiry, and storing the decrypted interest point data into a space of the lock-free queue. The invention can support heterogeneous data processing, improve the storage query efficiency and prevent data leakage.

Description

Method, system, medium and equipment for inquiring point of interest storage under administrative division
Technical Field
The invention relates to the technical field of data processing of geographic information platforms, in particular to a method, a system, a medium and equipment for inquiring point of interest storage under administrative division.
Background
The mass interest points (Point of Interest, POI) storage retrieval technology not only facilitates users to finish accurate searching of restaurants, scenic spots, buildings and the like in a map and provide detailed information, but also facilitates the users to inquire all places required in a navigation system, and plays an important role in map navigation, data mining, digital twin and the like. However, the massive interest points have the characteristics of huge quantity and obvious difference, so that the technical difficulties exist in the storage and retrieval of the platform application oriented process, and the method becomes one of the most challenging problems in the field of data processing of the geographic information platform.
The existing processing modes for massive POIs at home and abroad are mainly divided into two types: an index-based full-text retrieval method and a longitude and latitude-based data preliminary fragmentation method. The full text retrieval method based on the index mostly uses a database such as MongoDB to store data, and establishes the index through a search engine such as Lucene to carry out full text retrieval. The primary slicing method of data based on longitude and latitude generally stores POI data in different tile files according to classification information, and queries data according to secondary tile files. The methods are widely applied to the processing and searching of POIs (points of interest) in the fields of electronic maps, digital twinning, geographic information and the like, but the methods also have some limitations in storage and searching, and specifically comprise the following problems:
1. heterogeneous data is not supported, and the existing storage scheme is difficult to process whether based on mongoDB storage or tilefile storage;
2. the reading and writing efficiency is low, the existing method can be influenced by data, when fields are changed or data are modified, data indexes or tile files can be frequently created, so that IO (input/output) reading and writing are frequent, and the overall performance is reduced;
3. the searching efficiency is low, the existing method is a full-quantity searching technology whether full-text searching is carried out by using indexes or tile slicing is inquired, and the efficiency is particularly obviously reduced when fields are not in indexes or are inquired in a joint mode by crossing a plurality of slices;
4. the data security is low, the storage mode of the existing method is to directly store POI data into a database or other environments, the protection of the data security is lacking, and the risk of data leakage exists.
Disclosure of Invention
Therefore, the technical problem to be solved by the invention is to overcome the defects in the prior art, and provide a method for storing and inquiring the interest points under administrative division, which comprises the following steps:
acquiring administrative division information corresponding to the point of interest data, and performing slicing treatment on the point of interest data according to the administrative division information to obtain a slicing table;
in the storing process of the interest point data, constructing a lock-free queue comprising a plurality of spaces in a memory, encrypting the interest point data according to administrative division information and combining shift operation and weighting operation, storing the encrypted interest point data in one space of the lock-free queue, reading the encrypted interest point data from the lock-free queue, storing the encrypted interest point data in a corresponding sub-table in a database, and storing the interest point data under each sub-table by using a full-scale storage mode;
in the inquiring process of the interest point data, the administrative division information is used for inquiring the division table, the interest point data is further inquired in the division table, and the interest point data obtained by inquiring is decrypted and then stored in a space of the lock-free queue.
Further, the processing of slicing the interest point data according to the administrative division information to obtain a table includes:
taking administrative division information and user information as attributes of a main key of the segmentation, and segmenting the interest point data uploaded by different users according to the administrative division information; if the administrative division information is the administrative division information uploaded for the first time, analyzing the uploaded administrative division information, constructing a division table name of 'distributed ID+user information+administrative division information+other attributes+multiple administrative division marks', generating the constructed division table name into a database, and storing interest point data of the user under the administrative division information under the table name of a corresponding division table in the database, wherein the multiple administrative division marks are used for indicating the condition of the administrative division information related to multiple administrative divisions; if the administrative division information is not uploaded for the first time, storing the interest point data under the table names of the corresponding sub-tables in the database according to the corresponding administrative division information;
and constructing a slicing main key according to the attribute of the slicing main key, establishing a slicing rule comprising the slicing main key in the same, similar, containing or contained mode, slicing interest point data with the same logic through SQL database language, slicing administrative division information of the interest point data according to the slicing main key, and storing the administrative division information under a corresponding slicing table in a database.
Further, the encrypting the interest point data according to the administrative division information by combining the shift operation and the weighting operation and storing the encrypted interest point data into a space of the lock-free queue comprises:
binarizing administrative division information corresponding to the point of interest data, performing shift operation and weighting operation, weighting the result obtained by the shift operation and the weighting operation and the point of interest data, encrypting the point of interest data by taking the weighted result as a secret key, and storing the encrypted data into one space of a lock-free queue; when the encrypted data is stored in one space of the lock-free queue, the data in other spaces of the lock-free queue are not affected.
Further, when the binarizing the administrative division information corresponding to the point of interest data and performing shift operation and weighting operation, the operation method is as follows:
x’=α1×(x<<n),
wherein x' is the result obtained by the shift operation and the weighting operation, x is the administrative division information corresponding to the binarized interest point data, alpha 1 is the first weighting coefficient, and < represents the left shift operation, and n represents the shift digit.
Further, the weighting method weights the result obtained by the shift operation and the weighting operation and the point of interest data, and the weighting method is as follows:
and (3) reversely binarizing the results obtained by the shift operation and the weighting operation and weighting the interest point data:
y’=α2×y+α3×A,
wherein y' is a weighted result, α2 is a second weighting coefficient, α3 is a third weighting coefficient, y is a result obtained by reversely binarizing a result obtained by the shift operation and the weighting operation, and a is interest point data.
Further, the weighted result is used as a key to encrypt the interest point data, and the encryption method comprises the following steps:
y’’=|sin(A+y’)×exp(y’.length)+tanh(A/y’)|,
wherein y″ is the encrypted data, ||represents the absolute value operation, sin () represents the sine function, exp () represents the exponential function, tanh () represents the hyperbolic tangent function, a represents the point of interest data, y 'is the weighted result, and y'. Length represents the length of the weighted result.
Further, in the process of inquiring the point of interest data, the administrative division information is used for inquiring the division table, the point of interest data is further inquired in the division table, the point of interest data obtained by inquiry is decrypted and then stored in a space of the lock-free queue, and the method comprises the following steps:
constructing a query routing table, wherein the query routing table comprises a table name of a splitting table, a splitting main key, a splitting rule of the splitting main key, other attributes of the splitting, a splitting data analysis rule and a storage mode of interest point data, and the storage mode of the interest point data comprises a data storage rule and a data encryption rule;
constructing a fragment data analyzer, analyzing key information in the interest point data through the fragment data analyzer when inquiring the interest point data, and positioning a sub-table through the inquiry routing table according to the key information;
constructing a merging engine, wherein the merging engine merges the data queried from different sub-tables into the same data packet;
and reading the storage mode of the interest point data in the query routing table, decrypting the data packet obtained by the query in a lock-free queue multithreading mode, and storing the decrypted data packet in one space of the lock-free queue.
The invention also provides a system for inquiring the storage of the interest points under the administrative division, which comprises the following steps:
the data set is stored in a database,
the segmentation processing module is used for acquiring administrative division information corresponding to the point of interest data and carrying out segmentation processing on the point of interest data according to the administrative division information to obtain a segmentation table;
the interest point data storage module is used for constructing a lock-free queue comprising a plurality of spaces in a memory, encrypting the interest point data according to administrative division information and combining shift operation and weighting operation, storing the encrypted interest point data in one space of the lock-free queue, reading the encrypted interest point data from the lock-free queue, storing the encrypted interest point data in a corresponding sub-table in a database, and storing the interest point data under each sub-table by using a full-scale storage mode;
and the interest point data query module is used for querying the sub-table through administrative division information, further querying the interest point data in the sub-table, decrypting the interest point data obtained by query and storing the decrypted interest point data into one space of the lock-free queue.
The invention also provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor implements the method for inquiring the storage of points of interest under the administrative division.
The invention also provides a point-of-interest storage query device under the administrative division, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the point-of-interest storage query method under the administrative division when executing the computer program.
Compared with the prior art, the technical scheme of the invention has the following beneficial effects:
1. the invention segments and stores the interest point data according to the administrative division information of the interest point data, and the segmentation rule selection is scientific and is applicable to the interest point data; meanwhile, the segmented interest point data can be synchronously stored in each sub-table, and can be searched through the sub-table structure in the query process of the interest point data, so that the storage and query efficiency of the interest point data is effectively improved;
2. when the interest point data is stored, a full-quantity storage mode is used under each sub-table, so that heterogeneous data processing can be supported, redundant fields of the sub-tables can be reduced, and the flexibility and the efficiency of query can be improved during query;
3. when the interest point data is stored, the interest point data is encrypted according to the administrative division information and by combining the shift operation and the weighting operation, the key point information of the administrative division is effectively utilized for encryption operation, the data can be safely stored in a database, and the data leakage is prevented;
4. when the interest point data is stored and inquired, the lock-free queue is established in the memory to process the data, and the storage and inquiry efficiency of the interest point data is further improved through a multithreading mode of the lock-free queue.
Drawings
In order that the invention may be more readily understood, a more particular description of the invention will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings, in which:
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a flow chart of the point of interest data storage in an embodiment of the present invention.
Detailed Description
The present invention will be further described with reference to the accompanying drawings and specific examples, which are not intended to be limiting, so that those skilled in the art will better understand the invention and practice it.
Example 1
Referring to fig. 1 and 2, the invention discloses a method for inquiring the storage of interest points under administrative division, which comprises the following steps:
s1: and acquiring administrative division information corresponding to the point of interest data, and performing slicing treatment on the point of interest data according to the administrative division information to obtain a slicing table. In this embodiment, the administrative division information may be latitude and longitude information, an administrative division code, an administrative division name, and the like. When the acquired administrative division information is longitude and latitude information, calculating a corresponding administrative division by using the longitude and latitude of the point location, and then slicing the point of interest data according to the administrative division code or the administrative division name.
S1-1: taking administrative division information and user information as attributes of a main key of the segmentation, and distributing interest point data of different administrative divisions of different users into different sub-tables;
s1-2: the method comprises the steps of slicing interest point data uploaded by different users according to administrative division information; if the administrative division information is the administrative division information uploaded for the first time, analyzing the uploaded administrative division information, constructing a partition table name of 'distributed ID+user information+administrative division information+other attributes+a plurality of administrative division marks', generating the constructed partition table name into a database (the partition table names are unique), and storing interest point data of the user in the administrative division under the corresponding partition table name in the database; if the administrative division information is not uploaded for the first time, the interest point data is stored under the corresponding table names in the database according to the corresponding administrative division information. By using the administrative division flag, the merging of each cell under the large administrative division can be realized, thereby improving the storage effect.
The distributed ID comprises a technical attribute and a service attribute, wherein the technical attribute is used as a unique main key of a sub-table in the database, the service attribute is used as an index of interest point data, and the specific sub-table can be quickly positioned through the distributed ID inquiry. The administrative division indicator is used for indicating the situation of a plurality of administrative divisions related under administrative division information.
For example, the administrative division uploaded by user Zhansan is su (corresponding administrative division code is 320500), and the generated division table name is: uuid) +zhansan (user information, which may be a user name, a user ID, etc) +320500 (administrative division information) +other attributes (custom fields, such as a name of point of interest data, a text address, a latitude and longitude address, etc.), multi (multiple administrative division flag, which may not be set if multiple administrative divisions are not involved under the administrative division information), and then generating a table of the table name into a database, the table name being a unique table name to store data under the user's su state. The distributed ID field serves as a primary key for retrieving quick locations. The data stored under the table name of uuid+zhansan+320500+other attributes+multi is the data of Zhang three in Suzhou and all the areas under Suzhou, such as tiger cone areas 320505, wu Zhongou 320506.
S1-3: the method comprises the steps of constructing a slicing master key according to attributes of the slicing master key (namely administrative division information AND user information), AND establishing a slicing rule comprising the slicing master key IN the same (=), similar (BETWEEN), containing (IN) or contained modes AND the like, wherein the slicing rule can further comprise operators such as >, > =, <=, <, AND, hash AND the like. In this embodiment, the data sources of different databases may be proxied, the SQL database languages of multiple data sources are integrated, and the point of interest data of the same logic is segmented by the SQL database languages of different databases, and the administrative division of the point of interest data is segmented according to the segmentation master key and stored under the corresponding segmentation table in the database, so as to achieve the segmentation of different databases.
S2: in the process of storing the interest point data, constructing a lock-free queue comprising a plurality of spaces in a memory; encrypting the interest point data according to administrative division information by combining shift operation and weighting operation, storing the encrypted interest point data into a space of a lock-free queue, reading the encrypted interest point data from the lock-free queue, storing the encrypted interest point data into corresponding sub-tables in a database, and storing the interest point data under each sub-table by using a full-scale storage mode.
S2-1: a lock-free queue is constructed in memory that includes a plurality of spaces. The lock-free queue is of an annular structure, and specifically comprises:
L=p[i],i=1,…,m;
l represents a lock-free queue, pi represents the ith space in the lock-free queue, pi is long type data, m is the total number of spaces in the lock-free queue, and the value of m is set according to practice.
S2-2: binarizing administrative division information corresponding to the point of interest data and carrying out shift operation and weighting operation, wherein the operation method comprises the following steps:
x’=α1×(x<<n),
wherein x' is the result obtained by the shift operation and the weighting operation, x is the administrative division information corresponding to the binarized interest point data, alpha 1 is the first weighting coefficient, and < represents the left shift operation, and n represents the shift digit. The values of alpha 1 and n are set according to the actual setting, the value of n is an integer, and the right shift operation is represented when the value of n is a negative integer.
S2-3: and (3) reversely binarizing the results obtained by the shift operation and the weighting operation and weighting the interest point data:
y’=α2×y+α3×A,
wherein y 'is a weighted result, alpha 2 is a second weighting coefficient, alpha 3 is a third weighting coefficient, y is a result obtained by reversely binarizing a result x' obtained by the shift operation and the weighting operation, and A is interest point data; the values of α2 and α3 are set according to the actual setting.
S2-4: the weighted result is used as a key to encrypt the interest point data, and the encryption method comprises the following steps:
y’’=|sin(A+y’)×exp(y’.length)+tanh(A/y’)|,
where y″ is the encrypted data, ||represents the absolute value operation, sin () represents the sine function, exp () represents the exponential function, tanh () represents the hyperbolic tangent function, a represents the message to be encrypted, i.e., the original point of interest data, the weighted result y 'is the key used for encryption and decryption, and y'. Length represents the length of the weighted result y ', i.e., the number of bits of y'.
S2-5: and storing the encrypted data into a space of the lock-free queue. When the encrypted data is stored in one space of the lock-free queue, the data in other spaces of the lock-free queue are not affected.
S2-6: the encrypted interest point data is read from the lock-free queue and stored in a corresponding sub-table in the database, the interest point data is stored under each sub-table in a full-quantity storage mode, the contents in the sub-table are firstly emptied, and then the current interest point data is stored in the sub-table.
S3: in the inquiring process of the interest point data, the administrative division information is used for inquiring the division table, the interest point data is further inquired in the division table, and the interest point data obtained by inquiring is decrypted and then stored in a space of the lock-free queue.
S3-1: a query routing table is constructed, wherein the query routing table comprises a table name of a division table, a division main key, a division rule of the division main key, other attributes of the division, a division data analysis rule (SQL or other database languages) and a storage mode of interest point data, and the storage mode of the interest point data comprises a data storage rule (full storage when the division table is stored) and a data encryption rule (a method combining shift operation, weighting operation and AES encryption). By mapping the query search condition of the user into the query routing table, specified search contents can be generated by assembling specific query conditions.
S3-2: constructing a fragment data analyzer, analyzing key information in the interest point data through the fragment data analyzer when inquiring the interest point data, and positioning a sub-table through the inquiry routing table according to the key information; when the fragment data analyzer realizes mapping of SQL sentences through querying the routing table and various database languages, for example, querying names of interest point data in 320500 data, the Zhansan_320500_suzhou_a table can be found through the names of the users and administrative regions of 320500, and then query conditions of the names of the interest point data are converted into SQL query conditions through other attributes of fragments and the fragment data analyzer to query data with the names of xxx in the administrative regions of 320500 of zhangsan of the users, namely: select x from zhansan_320500_suzhou_a where name = 'xxx'. Although the administrative division of the user three is 320500 and the point of interest data is xxx, the condition is only needed by other attribute names of one fragment, and the user name and the administrative division can be directly routed into a specific division table without inquiring all the data, so that the retrieval efficiency is improved.
S3-3: and constructing a merging engine, wherein the merging engine merges the data queried from different sub-tables into the same data packet. For example, the data under the administrative division 320500 of the user zhangsan and the data with the name xxx (xxx is a user-defined structure to cope with a specific scene) of the interest point data under 320200 need to be queried, the data with the name xxx of the interest point data need to be queried in two tables zhangsan_320500_xxx and zhangsan_320200_xxx at the same time, and then the returned data in the two tables are merged into the same returned result by a merging engine and fed back to the user.
S3-4: and data decryption, namely reading the storage mode of the interest point data in the query routing table as well as encryption, decrypting the data packet obtained by query in a lock-free queue multithreading mode, and storing the decrypted data packet in one space of the lock-free queue. In decryption, the ciphertext y″ is subtracted by tan h (a/y '), then divided by an exponent value exp (y'. Length), and the resulting arcsine function is taken, thus obtaining the original interest point data.
In general, the encryption and decryption processes will slow down the data processing speed, so in this embodiment, a lock-free queue with a ring structure is used, so that the processing speed of the encryption process is increased while the pseudo sharing is eliminated. The lock-free queue of the annular structure does not need to clean the used memory and regenerate a new memory to store data, can call the computing capacity of the CPU faster, quickens the gear dropping and inquiring speed of the interest point data, and simultaneously realizes the safe storage of the data to the database and prevents the problem of data leakage.
Example two
The invention also discloses a system for inquiring the storage of the interest points under the administrative division, which comprises the following steps:
the data set is stored in a database,
the segmentation processing module is used for acquiring administrative division information corresponding to the point of interest data and carrying out segmentation processing on the point of interest data according to the administrative division information to obtain a segmentation table;
the interest point data storage module is used for constructing a lock-free queue comprising a plurality of spaces in a memory, encrypting the interest point data according to administrative division information and combining shift operation and weighting operation, storing the encrypted interest point data in one space of the lock-free queue, reading the encrypted interest point data from the lock-free queue, storing the encrypted interest point data in a corresponding sub-table in a database, and storing the interest point data under each sub-table by using a full-scale storage mode;
and the interest point data query module is used for querying the sub-table through administrative division information, further querying the interest point data in the sub-table, decrypting the interest point data obtained by query and storing the decrypted interest point data into one space of the lock-free queue.
Example III
The invention also discloses a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the method for inquiring the storage of points of interest under administrative division in the first embodiment.
Example IV
The invention also discloses a device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the method for inquiring the storage of the interest points under the administrative division in the first embodiment when executing the computer program.
The invention segments and stores the interest point data according to the administrative division information of the interest point data, and the segmentation rule selection is scientific and is applicable to the interest point data; meanwhile, the segmented interest point data can be synchronously stored in each sub-table, and can be searched through the sub-table structure in the query process of the interest point data, so that the storage and query efficiency of the interest point data is effectively improved.
When the interest point data is stored, a full-quantity storage mode is used under each sub-table, so that heterogeneous data processing can be supported, redundant fields of the sub-tables can be reduced, and the flexibility and the efficiency of query can be improved during query. Meanwhile, the interest point data is encrypted according to the administrative division information by combining shift operation and weighting operation, so that the key point information of the administrative division is effectively utilized for encryption operation, the data can be safely stored in a database, and data leakage is prevented.
In general, the encryption and decryption processes can slow down the data processing speed, but when the invention stores and inquires the interest point data, a lock-free queue is established in the memory to process the data, and the efficiency of storing and inquiring the interest point data can be accelerated by a multithreading mode of the lock-free queue. The method can be applied to various application fields such as electronic maps and the like, and provides a more efficient, easy-to-use and safe method for storing and retrieving the point of interest.
In order to further prove the beneficial effects of the invention, in the embodiment, firstly, in the storage stage of the interest point data, 10 ten thousand, 100 ten thousand and 1000 ten thousand interest point data are stored in a database by using the method of the invention and a normal storage method without using a lock-free queue respectively, and the storage time is shown in table 1.
As can be seen from Table 1, with the increase of data volume, the time saving rate of the method of the invention using the lock-free queue is higher and higher, so the method of the invention can be suitable for massive interest point data, and the data storage efficiency is improved.
Then, in the searching stage of the interest point data in this embodiment, four different schemes are used to search 1 piece of designated interest point data in 1000 ten thousand, 1 hundred million and 10 hundred million of interest point data in the database, respectively, and the searching time is shown in table 2.
The four different schemes are respectively as follows:
scheme one, only the administrative division table method in the present invention is used. The interest point data used are 1000 ten thousand, 1 hundred million and 10 hundred million interest point data under Suzhou (administrative division 3205), and in the case of the sub-tables, the interest point data are divided into 5 sub-tables according to administrative divisions 320500, 320501, 320502, 320503 and 320504, and 1 piece of appointed interest point data is retrieved from the data after being stored in a database by using a conventional storage method.
And in the scheme II, only the administrative division table method and the encryption and decryption method in the invention are used. The used interest point data, the table dividing method and the retrieved 1 piece of appointed interest point data are the same as the scheme one, and when the interest point data are stored in the database, the encryption method is used for encrypting the interest point data and then storing the encrypted interest point data in the database; the decryption method in the present invention is used when 1 piece of specified point-of-interest data is retrieved from the database.
And thirdly, encrypting and decrypting by using a traditional elliptic encryption algorithm (ECC) on the basis of using the administrative division table method and the lock-free queue in the invention. The used interest point data, the table dividing method and the retrieved 1 piece of appointed interest point data are the same as the scheme one, and when the interest point data are stored in the database, the interest point data are encrypted by using ECC and then stored in the database through a lock-free queue; when 1 piece of specified point of interest data is retrieved from the database, it is decrypted using ECC and retrieved through the lock-free queue.
Scheme IV, the method of the invention. The used interest point data, the table dividing method and the retrieved 1 piece of appointed interest point data are the same as the scheme one, and when the interest point data are stored in the database, the encryption method is used for encrypting the interest point data and then the interest point data are stored in the database through the lock-free queue; when 1 piece of specified interest point data is retrieved from the database, the decryption method in the present invention is used for decryption and retrieval through the lock-free queue.
As can be seen from table 2, even if the conventional encryption and decryption method is combined with the lock-free queue (i.e., scheme three), the retrieval speed is not as high as the retrieval speed of the encryption and decryption method (i.e., scheme two) in the present invention when the lock-free queue is not used; meanwhile, when the encryption and decryption method and the lock-free queue (namely, the scheme IV) in the scheme are used in combination, the retrieval speed is greatly improved compared with that of the conventional encryption and decryption method (namely, the scheme III). Therefore, the method and the device can be effectively adapted to the retrieval of massive interest point data, and effectively improve the retrieval efficiency.
Finally, in this embodiment, the three methods of explicit storage method without encryption and decryption, the method of replacing the encryption and decryption method with ECC encryption and decryption, and the method of the present invention are used, and the security test under sql injection, unauthorized access and database logical loopholes are performed, and the results are shown in table 3.
In the case of sql injection, if an sql statement (for example delete from A where xzqh =320500) for deleting 1 piece of interest point data is injected, the data will have a risk of deletion, and if the data is encrypted in a normal way, 320500 may be cracked, and there will be a risk of deletion, after the encryption, the sql injection cannot accurately know the value of "xzqh", so that the security can be improved.
Unauthorized access directly skips the authorization mechanism to access the data stored in the database directly through the service, and if the data is explicitly stored, an attacker can query the corresponding point of interest data by inputting a query value (for example, xzqh=320500). After encryption, unauthorized access to the queried service, the query value (e.g., xzqh=320500) cannot be matched because the corresponding point of interest data is encrypted in the database, and the query value can be changed into encrypted data for matching only by the authorized service.
Vulnerabilities in the database logical vulnerabilities refer to that a server is attacked by a person and the database is broken by a person, an attacker can take all database data, and display storage can enable the attacker to directly take all explicit data, so that the risk is high. Through the same attack frequency test, the probability of ECC being cracked is higher than that of the method, so that the encryption and decryption method can effectively resist an attacker and improve the safety on the basis of effectively utilizing administrative division information of the interest point data.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may 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 flow or flows and/or block diagram block or blocks.
It is apparent that the above examples are given by way of illustration only and are not limiting of the embodiments. Other variations and modifications of the present invention will be apparent to those of ordinary skill in the art in light of the foregoing description. It is not necessary here nor is it exhaustive of all embodiments. And obvious variations or modifications thereof are contemplated as falling within the scope of the present invention.

Claims (10)

1. The interest point storage query method under the administrative division is characterized by comprising the following steps:
acquiring administrative division information corresponding to the point of interest data, and performing slicing treatment on the point of interest data according to the administrative division information to obtain a slicing table;
in the storing process of the interest point data, constructing a lock-free queue comprising a plurality of spaces in a memory, encrypting the interest point data according to administrative division information and combining shift operation and weighting operation, storing the encrypted interest point data in one space of the lock-free queue, reading the encrypted interest point data from the lock-free queue, storing the encrypted interest point data in a corresponding sub-table in a database, and storing the interest point data under each sub-table by using a full-scale storage mode;
in the inquiring process of the interest point data, the administrative division information is used for inquiring the division table, the interest point data is further inquired in the division table, and the interest point data obtained by inquiring is decrypted and then stored in a space of the lock-free queue.
2. The method for inquiring point of interest storage under an administrative division according to claim 1, wherein: the processing of the interest point data according to the administrative division information to obtain a division table comprises the following steps:
taking administrative division information and user information as attributes of a main key of the segmentation, and segmenting the interest point data uploaded by different users according to the administrative division information; if the administrative division information is the administrative division information uploaded for the first time, analyzing the uploaded administrative division information, constructing a division table name of 'distributed ID+user information+administrative division information+other attributes+multiple administrative division marks', generating the constructed division table name into a database, and storing interest point data of the user under the administrative division information under the table name of a corresponding division table in the database, wherein the multiple administrative division marks are used for indicating the condition of the administrative division information related to multiple administrative divisions; if the administrative division information is not uploaded for the first time, storing the interest point data under the table names of the corresponding sub-tables in the database according to the corresponding administrative division information;
and constructing a slicing main key according to the attribute of the slicing main key, establishing a slicing rule comprising the slicing main key in the same, similar, containing or contained mode, slicing interest point data with the same logic through SQL database language, slicing administrative division information of the interest point data according to the slicing main key, and storing the administrative division information under a corresponding slicing table in a database.
3. The method for inquiring point of interest storage under an administrative division according to claim 1, wherein: the method for encrypting the interest point data according to administrative division information and combining shift operation and weighting operation and storing the encrypted interest point data into a space of a lock-free queue comprises the following steps:
binarizing administrative division information corresponding to the point of interest data, performing shift operation and weighting operation, weighting the result obtained by the shift operation and the weighting operation and the point of interest data, encrypting the point of interest data by taking the weighted result as a secret key, and storing the encrypted data into one space of a lock-free queue; when the encrypted data is stored in one space of the lock-free queue, the data in other spaces of the lock-free queue are not affected.
4. A method for storing and querying points of interest under an administrative division according to claim 3, wherein: when the administrative division information corresponding to the binary interest point data is subjected to shift operation and weighting operation, the operation method is as follows:
x’=α1×(x<<n),
wherein x' is the result obtained by the shift operation and the weighting operation, x is the administrative division information corresponding to the binarized interest point data, alpha 1 is the first weighting coefficient, and < represents the left shift operation, and n represents the shift digit.
5. A method for storing and querying points of interest under an administrative division according to claim 3, wherein: the result obtained by the shift operation and the weighting operation and the point of interest data are weighted by the weighting method:
and (3) reversely binarizing the results obtained by the shift operation and the weighting operation and weighting the interest point data:
y’=α2×y+α3×A,
wherein y' is a weighted result, α2 is a second weighting coefficient, α3 is a third weighting coefficient, y is a result obtained by reversely binarizing a result obtained by the shift operation and the weighting operation, and a is interest point data.
6. A method for storing and querying points of interest under an administrative division according to claim 3, wherein: and the weighted result is used as a key to encrypt the interest point data, and the encryption method comprises the following steps:
y’’=|sin(A+y’)×exp(y’.length)+tanh(A/y’)|,
wherein y″ is the encrypted data, ||represents the absolute value operation, sin () represents the sine function, exp () represents the exponential function, tanh () represents the hyperbolic tangent function, a represents the point of interest data, y 'is the weighted result, and y'. Length represents the length of the weighted result.
7. The method for inquiring the storage of the interest points under the administrative division according to any one of claims 2 to 6, wherein: in the process of inquiring the interest point data, inquiring the partition table through administrative division information, further inquiring the interest point data in the partition table, decrypting the interest point data obtained by inquiry, and storing the interest point data into a space of a lock-free queue, wherein the method comprises the following steps:
constructing a query routing table, wherein the query routing table comprises a table name of a splitting table, a splitting main key, a splitting rule of the splitting main key, other attributes of the splitting, a splitting data analysis rule and a storage mode of interest point data, and the storage mode of the interest point data comprises a data storage rule and a data encryption rule;
constructing a fragment data analyzer, analyzing key information in the interest point data through the fragment data analyzer when inquiring the interest point data, and positioning a sub-table through the inquiry routing table according to the key information;
constructing a merging engine, wherein the merging engine merges the data queried from different sub-tables into the same data packet;
and reading the storage mode of the interest point data in the query routing table, decrypting the data packet obtained by the query in a lock-free queue multithreading mode, and storing the decrypted data packet in one space of the lock-free queue.
8. A point of interest storage query system under an administrative division, comprising:
the data set is stored in a database,
the segmentation processing module is used for acquiring administrative division information corresponding to the point of interest data and carrying out segmentation processing on the point of interest data according to the administrative division information to obtain a segmentation table;
the interest point data storage module is used for constructing a lock-free queue comprising a plurality of spaces in a memory, encrypting the interest point data according to administrative division information and combining shift operation and weighting operation, storing the encrypted interest point data in one space of the lock-free queue, reading the encrypted interest point data from the lock-free queue, storing the encrypted interest point data in a corresponding sub-table in a database, and storing the interest point data under each sub-table by using a full-scale storage mode;
and the interest point data query module is used for querying the sub-table through administrative division information, further querying the interest point data in the sub-table, decrypting the interest point data obtained by query and storing the decrypted interest point data into one space of the lock-free queue.
9. A computer-readable storage medium having stored thereon a computer program, characterized by: the computer program, when executed by a processor, implements a point of interest storage querying method under an administrative division according to any one of claims 1-7.
10. The utility model provides a point of interest storage query device under administrative division which characterized in that: comprising a memory, a processor and a computer program stored on the memory and executable on the processor, said processor implementing the point of interest storage querying method under an administrative division according to any one of claims 1-7 when said computer program is executed.
CN202410271983.6A 2024-03-11 2024-03-11 Method, system, medium and equipment for inquiring point of interest storage under administrative division Active CN117874371B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410271983.6A CN117874371B (en) 2024-03-11 2024-03-11 Method, system, medium and equipment for inquiring point of interest storage under administrative division

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410271983.6A CN117874371B (en) 2024-03-11 2024-03-11 Method, system, medium and equipment for inquiring point of interest storage under administrative division

Publications (2)

Publication Number Publication Date
CN117874371A true CN117874371A (en) 2024-04-12
CN117874371B CN117874371B (en) 2024-05-31

Family

ID=90595015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410271983.6A Active CN117874371B (en) 2024-03-11 2024-03-11 Method, system, medium and equipment for inquiring point of interest storage under administrative division

Country Status (1)

Country Link
CN (1) CN117874371B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104021120A (en) * 2013-02-28 2014-09-03 北京四维图新科技股份有限公司 Navigation data retrieval method and device and navigation terminal
US20190156051A1 (en) * 2017-11-21 2019-05-23 International Business Machines Corporation Processing analytical queries over encrypted data using dynamical decryption
CN113360789A (en) * 2021-05-31 2021-09-07 维沃移动通信有限公司 Interest point data processing method and device, electronic equipment and storage medium
CN115309850A (en) * 2022-08-24 2022-11-08 中国华能集团清洁能源技术研究院有限公司 GeoHash-based map visual range interest point retrieval method and system
CN116680356A (en) * 2023-06-13 2023-09-01 北京世纪高通科技有限公司 Address data processing method and device, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104021120A (en) * 2013-02-28 2014-09-03 北京四维图新科技股份有限公司 Navigation data retrieval method and device and navigation terminal
US20190156051A1 (en) * 2017-11-21 2019-05-23 International Business Machines Corporation Processing analytical queries over encrypted data using dynamical decryption
CN113360789A (en) * 2021-05-31 2021-09-07 维沃移动通信有限公司 Interest point data processing method and device, electronic equipment and storage medium
CN115309850A (en) * 2022-08-24 2022-11-08 中国华能集团清洁能源技术研究院有限公司 GeoHash-based map visual range interest point retrieval method and system
CN116680356A (en) * 2023-06-13 2023-09-01 北京世纪高通科技有限公司 Address data processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN117874371B (en) 2024-05-31

Similar Documents

Publication Publication Date Title
US7519835B2 (en) Encrypted table indexes and searching encrypted tables
US10922432B2 (en) Method for accessing a database stored on a server using a relation
CN105678189B (en) Data file encryption storage and retrieval system and method
Wang et al. Searchable encryption over feature-rich data
Wang et al. Search me in the dark: Privacy-preserving boolean range query over encrypted spatial data
US20180232533A1 (en) Zero-knowledge databases
US20170068688A1 (en) Efficient spatial queries in large data tables
US10439992B2 (en) System for accessing data
US20170068694A1 (en) Processing large data tables
WO2022013793A1 (en) Method and system for secure distributed software-service
Ananthi et al. FSS-SDD: fuzzy-based semantic search for secure data discovery from outsourced cloud data
US20200293686A1 (en) A method for securing access to a relation
CN117874371B (en) Method, system, medium and equipment for inquiring point of interest storage under administrative division
KR20230003238A (en) Encrypted search for encrypted data with reduced volume leakage
CN117390118A (en) Quick data retrieval method and system based on block chain
Chang et al. Sub-trajectory similarity join with obfuscation
Miao et al. Optimizing quality for probabilistic skyline computation and probabilistic similarity search
WO2024087312A1 (en) Database access method, computing device and server
US20230318809A1 (en) Multi-key information retrieval
WO2024130721A1 (en) Data storage server and client devices for securely storing and retrieving data
Ali et al. Synonym Multi-keyword Search Over Encrypted Data Using Hierarchical Bloom Filters Index
Souror et al. Secure query processing for smart grid data using searchable symmetric encryption
CN118747187A (en) Equivalent connection query method and device for secret database
Cavojsky et al. User Experience Meets GPS Trajectory Search
Fu et al. Research on privacy protection scheme based on data fuzzy processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant