CN110427449A - A kind of method and system for searching for geographical location information in embedded device - Google Patents

A kind of method and system for searching for geographical location information in embedded device Download PDF

Info

Publication number
CN110427449A
CN110427449A CN201910721918.8A CN201910721918A CN110427449A CN 110427449 A CN110427449 A CN 110427449A CN 201910721918 A CN201910721918 A CN 201910721918A CN 110427449 A CN110427449 A CN 110427449A
Authority
CN
China
Prior art keywords
data
document
geographical location
location information
database
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
CN201910721918.8A
Other languages
Chinese (zh)
Other versions
CN110427449B (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.)
Shenzhen Aipei Science And Technology Co Ltd
Original Assignee
Shenzhen Aipei Science And 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 Shenzhen Aipei Science And Technology Co Ltd filed Critical Shenzhen Aipei Science And Technology Co Ltd
Priority to CN201910721918.8A priority Critical patent/CN110427449B/en
Publication of CN110427449A publication Critical patent/CN110427449A/en
Application granted granted Critical
Publication of CN110427449B publication Critical patent/CN110427449B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S19/00Satellite radio beacon positioning systems; Determining position, velocity or attitude using signals transmitted by such systems
    • G01S19/38Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system
    • G01S19/39Determining a navigation solution using signals transmitted by a satellite radio beacon positioning system the satellite radio beacon positioning system transmitting time-stamped messages, e.g. GPS [Global Positioning System], GLONASS [Global Orbiting Navigation Satellite System] or GALILEO
    • G01S19/42Determining position
    • 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/29Geographical information databases
    • 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)
  • Remote Sensing (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention provides a kind of in embedded device searches for the method and system of geographical location information, terminal saves as the second document after constructing quaternary tree database structure according to the latitude and longitude coordinates of the first document first, and database is built into after compressing the volume of second document, the database constructed after volume due to compressing second document only stores effective information and marker, therefore database volume is very small, the database can be imported into the relatively small embedded device of memory space, the GPS coordinate of the available target position of embedded device, according to the latitude and longitude coordinates of the target position, the geo-location service information on the target position periphery is searched in the database.

Description

A kind of method and system for searching for geographical location information in embedded device
Technical field
The present invention relates to embedded device fields, and in particular to a kind of that geographical location information is searched in embedded device Method and system.
Background technique
Embedded device is mainly made of embeded processor, associated support hardware and embedded system, it is that collection is soft or hard Part is in " device " that can work independently of one.Embeded processor is mainly made of a single-chip microcontroller or microcontroller (MCU). Associated support hardware includes the reading equipment of display card, storage medium (ROM and RAM etc.), communication apparatus, IC card or credit card Deng.Embedded system is different from general computer processing system, it does not have the storage medium of the large capacity as hard disk, and Use flash memory (Flash Memory) as storage medium mostly.For example a kind of embedded device product, CPU frequency are 600MHz, inside saves as 64MB, and disk is SPI Flash, capacity 32MB.
Geographical location information data library, such as GPS navigation, DVR insertion are stored in the ROM of current some embedded devices Formula product, embedded device can be provided according to current vehicle position by geographical location information data library in real time The information such as neighbouring gas station, maintenace point, parking lot, can also provide whether current road segment has car speed limitation, disobeys in real time Rule photography such as is taken pictures at the information.
Current geographical location information library mostly uses relevant database (such as Oracle, mySQL), but relationship type number It is chiefly used in server apparatus according to library, and the hardware configuration of embedded device will be well below server apparatus, using relationship type number It is applied to embedded device according to the geographical location information library in library, the geographical location information that can not only be stored is considerably less and search speed It is very slow, therefore embedded device is not appropriate for using the geographical location information library of relevant database.As can be seen that needing one Kind geographical location information library, more geographical location information can be stored on embedded device by applying it.
Therefore, the existing technology has yet to be improved and developed.
Summary of the invention
In view of above-mentioned deficiencies of the prior art, the purpose of the present invention is to provide one kind searches for geography in embedded device The method and system of location information, it is intended to solve geographical location information data library in the prior art and apply the energy on embedded device The less problem of the geographical location information of storage.
In a first aspect, a kind of method for searching for geographical location information in embedded device provided by the invention, wherein packet Include step:
First passing through quaternary tree computer data structure is built into database for geographical location information in advance;
The database is imported into the embedded device;
The GPS coordinate for obtaining target position, by the geographical position for calling target position periphery described in the database search Set information on services.
Further, described the step of geographical location information is built by database by quaternary tree computer data structure It specifically includes:
Be successively read every data line in the first document, extract in first document longitude coordinate of every data line and Latitude coordinate, and quaternary tree data structure is established according to the longitude coordinate and latitude coordinate;
It is successively read each of quaternary tree data structure node, and is stored to the second document;Wherein, described four A node in tree data structure corresponds to the data line in second document, every data line in second document Format is all the same, and every data line includes number, quaternary tree storage region, geographical location information and works as in second document The child node of front nodal point;
It is successively read every data line in second document, extracts the son section of geographical location information and present node Point forms complex data, and constructs database according to the complex data.
Further, described to be successively read every data line in the first document, extract each line number in first document According to longitude coordinate and latitude coordinate, and the step of quaternary tree data structure is established according to the longitude coordinate and latitude coordinate it Before further include:
The first document is stored in advance, wherein the data format of every a line is all the same in first document, first text The data of every a line include longitude coordinate, latitude coordinate in shelves.
Further, the data of every a line further include geo-location service information in first document, describedly Managing location service information includes one of driving direction angle, speed limit velocity amplitude or camera types or a variety of.
Further, the quaternary tree data structure includes root node, non-leaf nodes and leaf node, described in one Leaf node is stored with data line in first document.
Further, described to be successively read every data line in second document, extract geographical location information and The step of child node of present node is combined into complex data, generates database specifically includes:
It is successively read every data line in second document, extracts geographical location information in every data line and current The child node of node, and detect in the child node of the geographical location information and present node in every data line whether at least one A subdata is not 0;
If so, combining the child node of the geographical location information and present node, obtain complex data, and mark is set Know position;
All complex datas that will be obtained, are built into database.
Further, the GPS coordinate for obtaining target position, by calling target position described in the database search The step of geographical location information on periphery, specifically includes:
The GPS coordinate for obtaining target position, obtains the longitude coordinate and latitude coordinate of the target position;
According to the longitude coordinate and latitude coordinate, search for and the longitude coordinate and latitude coordinate in the database Corresponding complex data, and export the geo-location service information in the complex data.
Second aspect, a kind of system for searching for geographical location information in embedded device provided by the invention, wherein packet The embedded device for including terminal and connecting with the terminal called, the terminal for first passing through quaternary tree computer data in advance Geographical location information is built into database by structure, and the database is imported into the embedded device;The insertion Formula equipment is used to obtain the GPS coordinate of target position, by the geography for calling target position periphery described in the database search Location service information.
Compared to the prior art, the present invention provides a kind of in embedded device search for geographical location information method and System, first terminal save as the second text after constructing quaternary tree database structure according to the latitude and longitude coordinates of the first document Shelves, and it is built into database after compressing the volume of second document, it is constructed after the volume due to compressing second document Database only stores effective information and marker, therefore database volume is very small, can imported into the database In the relatively small embedded device of memory space, the GPS coordinate of the available target position of embedded device, according to the mesh The latitude and longitude coordinates of cursor position search for the geo-location service information on the target position periphery in the database.
Detailed description of the invention
Fig. 1 is the flow chart of the method provided by the invention that geographical location information is searched in embedded device.
Fig. 2 is the first document middle part branch schematic diagram data in the specific embodiment of the invention.
Fig. 3 is the root node signal for establishing quaternary tree data structure in the specific embodiment of the invention in calculator memory Figure.
Fig. 4 is to store A coordinate points schematic diagram in the specific embodiment of the invention on root node.
Fig. 5 is to store A, B coordinate points schematic diagram in the specific embodiment of the invention on root node.
Fig. 6 is the second document middle part branch schematic diagram data in the specific embodiment of the invention.
Specific embodiment
The present invention provides a kind of in embedded device searches for the method and system of geographical location information, to make the present invention Purpose, technical solution and effect it is clearer, clear, the present invention is described in more detail below.It should be appreciated that this place The specific embodiment of description is only used to explain the present invention, is not intended to limit the present invention.
In a first aspect, a kind of method that geographical location information is searched in embedded device provided by the invention, referring to figure 1, comprising the following steps:
S10, first passing through quaternary tree computer data structure is built into database for geographical location information in advance;
Specifically, quaternary tree is a kind of tree data structure, has four sub-blocks, quaternary tree on each node It is commonly applied to the analysis and classification of two-dimensional space data, data separation is become four regions by it, and data area can be rectangular Or rectangle or other arbitrary shapes.
The characteristics of in view of quaternary tree data structure, can divide geographical location information according to longitude coordinate and latitude coordinate For four regions, geographical location information data library is so constructed.Believe with the geographical location constructed using relevant database Breath database is compared, in the case where storing the geographical location information of identical quantity, using the ground of quaternary tree data structure building The opposite meeting of volume for managing location information data library is small very more, and the speed scanned for according to latitude and longitude coordinates also can fastly very It is more.
Further, step S10 is specifically included:
S101, the first document is stored in advance, wherein the data format of every a line is all the same in first document, described The data of every a line include longitude coordinate, latitude coordinate in first document;
Further, the data of every a line further include geo-location service information in first document, describedly Managing location service information includes one of driving direction angle, speed limit velocity amplitude or camera types or a variety of.
Specifically, the first document is the file of .txt or .csv, can be converted by excel table, referring to fig. 2, the There are multirow data (being small part data in figure) in one document and the data format of every a line is all the same, every data line, that is, generation One geographical location information of table, such as wherein data line is 35.660472 37.76329872 234 20 102 3, from a left side It turns right and sees, the first two data are respectively that latitude sits side and longitude coordinate, and 234 be driving direction angle, and 20 be the speed limit speed of traveling The type (such as fixed speed camera) of angle value, most final two digits expression camera.
S102, it is successively read every data line in the first document, extracts the longitude of every data line in first document Coordinate and latitude coordinate, and quaternary tree data structure is established according to the longitude coordinate and latitude coordinate;
Further, the quaternary tree data structure includes root node, non-leaf nodes and leaf node, described in one Leaf node is stored with data line in first document.
Specifically, using quaternary tree data structure the characteristics of, establishes quaternary tree tree by longitude coordinate and latitude coordinate Data structure, for example, referring also to Fig. 3-5, sketches the foundation of quaternary tree data structure:
Referring to Fig. 3, the root node root of quaternary tree data structure is established in calculator memory first, if north latitude degree is used Positive number indicates that south latitude degree negative number representation, then latitude scope is (- 180,180), if east longitude degree is indicated with positive number, west longitude degree Indicated with negative sign, then longitude range is (- 90,90), therefore root node just represents entire map plane, represent coordinate range as (- 180, -90) to (180,90) this rectangular area.
Referring to fig. 4, then computer reads the first row data in the first document, if the longitude and latitude in the first row data is sat Be designated as (35.660472,37.76329872), remember this coordinate points be A, then A coordinate points in the rectangular area of root node, and Since root node stores data not yet at this time, A coordinate points can be stored in root node, i.e., the first of the first document Row data are all stored in root node.
Referring to Fig. 5, then computer reads the second row data in the first document, if the longitude and latitude in the second row data is sat Be designated as (35.6076454,22.201528), remember this coordinate points be B, although B coordinate points in the rectangular area of root node, Since root node has housed A coordinate points, B coordinate points cannot be stored again, it is therefore desirable to be extended, expand to root node 1,2,3,4 four child nodes are divided into 1,2,3,4 four sub- rectangular area to the rectangular area of root nodes stand, then weigh New storage A coordinate points, since A coordinate points are in the sub- rectangular area that number is 4, so A coordinate points can be stored in number In 4 sub- rectangular area, that is, to be stored in the child node that number is 4.
Then, continue to store B coordinate points, since B coordinate points are also being numbered in the sub- rectangular area for being 4, and due to number A coordinate points have been housed for 4 child node, it is therefore desirable to which the child node for being 4 to number is extended, and expands 5,6,7,8 four The rectangular area of a child node, i.e., the child node for being 4 to number is divided into 5,6,7,8 four sub- rectangular areas,
Then A coordinate points are stored again, since A coordinate points are in the sub- rectangular area that number is 5, so by A coordinate points It can be stored in the sub- rectangular area that number is 5, that is, be stored in the child node that number is 5.Then continue to storage B coordinate Point, but since B coordinate points are also in the sub- rectangular area that number is 5, it is therefore desirable to it is extended that (expansion process is no longer again Repeat), finally A coordinate points are stored in the child node that number is 11, B coordinate points are stored in the child node that number is 9.
Therefore, computer reads the first document data line on one side, on one side according to the longitude coordinate of this data line and latitude Degree coordinate establishes quaternary tree data structure, corresponding quaternary tree complete to the last line reading data the first document Data structure also constructs completion, in order not to waste storage resource, the quaternary tree data structure built can be stored temporarily in In memory.Finally, quaternary tree data structure just includes a root node root, and numerous non-leaf nodes and leaf node are (non- The quantity of leaf node and leaf node and how many row data of the first document are positively correlated), and a leaf node is stored with Data line in first document, for example referring to Fig. 5, leaf node 9 and 11 stores B and A respectively, i.e. leaf node 9 is stored with The data line of first document, leaf node 11 is stored with the another data line of the first document, it can also be seen that non-leaf nodes Data (such as non-leaf nodes marked as 5) is not stored.
Quaternary tree data structure (can be understood as preliminary geographical location information data library) so after building, if arbitrarily A coordinate (x, y) is given, wherein x is longitude coordinate, and y is latitude coordinate, can be searched for according to x and y in quaternary tree data structure The corresponding leaf node of this coordinate points out is searched this coordinate points in other words and is in which rectangular area, in turn Obtain the data of this leaf node storage.As can be seen that the mode searched in four fork number data structures, it can be understood as two dimension Binary search in plane, and the mode searched in relational data structure, be and then relationship search in layer Data (search that simple understanding is exactly various dimensions) is obtained, therefore, in contrast, the mode searched in four fork number data structures Faster, under the so low configuration (than product as stated in the background art) of embedded device, this way of search is more for search speed It is simple and efficient, therefore the occupancy of memory can be effectively reduced;And due to this way of search, can further compressed data, subtract The volume for the database that small subsequent builds go out.
As a kind of preferably embodiment, a function can be created, computer reads the first text when executing this function Then data line in shelves constructs corresponding quaternary tree data structure according to its latitude and longitude coordinates, but in function inside, when After the completion of constructing this quaternary tree data structure, this function is called again, i.e. recursive function calling (can contract using recursive function Subtract code and improve the readability of code), it can be successively read every data line in the first document, and construct quaternary tree data knot At the end of last function operation, quaternary tree data structure corresponding with the first document can be obtained, and be stored temporarily in meter in structure In calculation machine memory.
S103, it is successively read each of quaternary tree data structure node, and stored to the second document;Wherein, A node in the quaternary tree data structure corresponds to the data line in second document, each in second document Row data format is all the same, and every data line includes number, quaternary tree storage region, geographical location letter in second document The child node of breath and present node;
Specifically, the quaternary tree data structure that step S102 is obtained is stored temporarily in calculator memory, is needed it Each of store, therefore read this quaternary tree data structure node (including root node, non-leaf nodes and leaf section Point), and store into the second document, the second document can be the file of .txt or .csv.
Referring to Fig. 6, first read root node and saved in the second document again, for example, the first row data in the second document be 0 (- 180000000-90,000,000 180,000,000 90000000) (0 00000000 0) (0 00 1), from left past The right side sees that the 0 of foremost is number, indicates root node is stored in which row of the second document (line number is numbered from O);First Data in bracket are quaternary tree storage region, indicate the rectangular area that this node represents in quaternary tree data structure;Second Data in a bracket are geographical location information, indicate that the storage of this node is the longitude and latitude being noted above and geographical location clothes Information be engaged in (since root node does not store data, all for 0);Data in third bracket are the child node of present node, Indicate the number of child node under present node.
As can be seen that after having read the quaternary tree data structure that step S102 is obtained, quaternary tree data structure how many Node, with regard to how many row data in the second document, and the format of every data line is all the same.Furthermore it can also be seen that if reading Node be non-leaf nodes, since non-leaf nodes does not store data but has child node, so corresponding in the second document That data line in, data (i.e. geographical location information) in second bracket are just all 0, in third bracket (i.e. currently The child node of node) then storage have data;If the child node read is leaf node, since leaf node stores data but does not have Child node, so the data in second bracket (i.e. believe by geographical location in the second document in that corresponding data line Breath) then storage have data, in third bracket (i.e. the child node of present node) just all be 0.
S104, it is successively read every data line in second document, extracts geographical location information and present node Child node forms complex data, and constructs database according to the complex data.
Further, S104 step specifically includes:
S1041, it is successively read every data line in second document, extracts the geographical location information in every data line With the child node of present node, and whether extremely to detect in the child node of the geographical location information and present node in every data line A rare subdata is not 0;
Specifically, during step S102 constructs quaternary tree data structure, meeting can not be a large amount of to avoid generating Empty leaf node (leaf node i.e. without storing data), therefore the second document in step s 103, these sky leaf sections Point can all have that corresponding data line, this writes, and row data are not only useless to also take up memory space, has for embedded device For the memory space of limit, it is necessary to filter out these data, reduce the volume of the second document with this, and then reduce building The volume of database afterwards.
In S103 step, empty leaf node is not due to having to store data without child nodes yet, and not only second Data (i.e. geographical location information) in bracket are all 0, and the data (i.e. the child node of present node) in third bracket are all It is 0, therefore can detecte the child node of the geographical location information of every data line and present node in the second document, if this two At least one is not 0 to the data divided, i.e., expression the row data are not the data that empty leaf node storage comes, and is needed under preservation Come.
S1042, if so, by the child node of the geographical location information and present node combine, obtain complex data, and Marker is set;
S1043, all complex datas that will be obtained, are built into database.
Specifically, if step S1041 detects the row data effectively (being not empty leaf node), then it represents that need to save This data line, the All Datarows (represent empty leaf node) for being unsatisfactory for this condition do not save then, therefore can be with The second document volume after effectively reducing building, and then reduce the volume of the database after building.
But in actual products application, the geographical location information that speed limit is photographed in violation of rules and regulations, quantity up to 1,000,000 More than, so huge data volume, if not compressing the volume of the second document further, the volume of the database constructed is still It is so not small, for this one small stored memory of embedded device, the database of building can only give up a part speed limit and The geographical location information of photography in violation of rules and regulations, therefore, the volume for further compressing the second document seem and are highly desirable.
Referring to Fig. 6, what the second document after step S1041 retained is all valid data, at this time non-leaf nodes pair Certain data line answered such as is 0 (- 180000000-90,000,000 180,000,000 90000000) (0 000000 00 0) (0 00 1), certain corresponding data line of leaf node is 22 (450,000,000 53,437,500 50625000 56250000) (48,733,911 55,607,322 195-1-1-1-1 90 22 2) (0 00 0), number indicate this row The line number of data the second document hereof is non-essential data, can not save;For quaternary tree storage region (first Data in a bracket), it can dynamically go to calculate rectangular extent corresponding to each node, therefore four during search Fork tree storage region does not need to save yet;For the son section of geographical location information (data in third bracket) and present node Point (data in the 4th bracket) is the data being necessarily required in search process, needs to save and may be incorporated in and deposit together Storage, and due to the data in every data line, not being geographical location information be all the data of 0 child node for being exactly present node all For 0 (discussion that reason is shown in step S103), it is therefore desirable to a marker is set, it is excellent so as to the Distinguish in search process 1 is selected to indicate that non-leaf nodes, use 0 indicate leaf node.
After step S1042, the data of every a line just only have the son of geographical location information, present node in the second document Node and marker, the data of every a line are that a complex data finally by all obtained complex datas is built into geography Location information data library.
In one embodiment, there are 600,000 or so geographical location information in the first document, after S10 step process Obtained geographical location information data library (for the file of .edb format), volume can import embedded between 16-20MB Equipment uses.
S20, the database is imported into the embedded device;
Specifically, the geographical location information data library of step S10 building, since it is in the geographical position for storing identical quantity Volume is smaller in the case that confidence ceases, and since the memory capacity of embedded device is very small, is more suitable for embedded set It is standby.Geographical location information library importing embedded device is belonged into the prior art, details are not described herein again.
S30, the GPS coordinate for obtaining target position, by the ground for calling target position periphery described in the database search Manage location service information.
Further, step S30 is specifically included:
S301, the GPS coordinate for obtaining target position, obtain the longitude coordinate and latitude coordinate of the target position;
S302, according to the longitude coordinate and latitude coordinate, search and the longitude coordinate and latitude in the database The corresponding complex data of coordinate is spent, and exports the geo-location service information in the complex data.
Specifically, the GPS of the embedded device after step S20, the available target position of embedded device is sat Mark (can be obtained by GPS positioning or be obtained by input mode), and then obtain its longitude coordinate and latitude coordinate, target Position is denoted as C coordinate points.
When embedded device is searched in the database, according to the latitude and longitude coordinates of C coordinate points, complex data is dynamically calculated Rectangular extent corresponding to (can be understood as node), and judge whether this rectangular area includes C coordinate points, it is then multiple according to this The marker for closing data, judges the type of this complex data, if non-leaf nodes, then according to the child node of this non-leaf nodes Carry out the search of next stage (child node of this non-leaf nodes may be leaf node or non-leaf nodes);If leaf section Point, then stop search, and exports the (geography on the as described target position periphery of the geo-location service information in this complex data Location service information).
For example as shown in figure 5, first complex data (i.e. root node) is first searched for, it is clear that root section according to A coordinate point search The rectangular area that point represents includes A coordinate points, since the marker of first complex data indicates that first complex data is non- Leaf node, therefore the child node of first complex data is continued searching, and so on, the son section that final search to number is 11 The corresponding complex data of point finally exports this since the marker of this complex data indicates that this complex data is leaf node Geo-location service information in complex data, by this information by the geo-location service information institute in the first document Lai, because The information of this output includes one of driving direction angle, speed limit velocity amplitude or camera types or a variety of.
In addition, when the geographical location information data amount of speed limit and violation photography is very big (for example probably have on home products 1000000 or so), and the renewal frequency of GPS coordinate is substantially one second primary, that is to say, that embedded device is at most one In second relevant data are searched out in this 1,000,000 data.For the so low CPU frequency of embedded device, if in number CPU usage is excessive when searching for according to (data volume that database is included is very big) in library, then can reduce search speed, cause defeated Information out does not have real-time.Thus it will be appreciated that due to quaternary tree database data structure and search when use The mode of two-dimensional search can when the above-mentioned searching method of the present invention is scanned for according to the longitude coordinate and latitude coordinate of coordinate points To discharge this complex data after one complex data of every search in search, therefore when embedded device is searched in the database not When can occupy too big CPU, for example search for A coordinate points as shown in Figure 5, root node is discharged after first searching for root node, searches again for compiling Number be 4 node.In one embodiment, the geographical location information data library obtained after S10 step process has 600,000 Geographical location information, the CPU frequency of embedded device are 600MHz, when embedded device according to a coordinate points in this database When search, for CPU usage 2% or so, search speed is relatively fast.
Compared with prior art, a kind of method for searching for geographical location information in embedded device provided by the invention, Terminal saves as the second document after constructing quaternary tree database structure according to the latitude and longitude coordinates of the first document first, and It is built into database after compressing the volume of second document, the database constructed after the volume due to compressing second document Effective information and marker are only stored, therefore database volume is very small, it is empty that the database can be imported into storage Between in relatively small embedded device, the GPS coordinate of the available target position of embedded device, according to the target position Latitude and longitude coordinates, search for the geo-location service information on the target position periphery in the database.
Second aspect, a kind of system for searching for geographical location information in embedded device provided by the invention, wherein packet The embedded device for including terminal and connecting with the terminal called, the terminal for first passing through quaternary tree computer data in advance Geographical location information is built into database by structure, and the database is imported into the embedded device;The insertion Formula equipment is used to obtain the GPS coordinate of target position, by the geography for calling target position periphery described in the database search Location service information, as detailed above.
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can With improvement or transformation based on the above description, all these modifications and variations all should belong to the guarantor of appended claims of the present invention Protect range.

Claims (8)

1. a kind of method for searching for geographical location information in embedded device, which is characterized in that comprising steps of
First passing through quaternary tree computer data structure is built into database for geographical location information in advance;
The database is imported into the embedded device;
The GPS coordinate for obtaining target position, by calling the geographical location on target position periphery described in the database search to take Business information.
2. the method for geographical location information is searched in embedded device according to claim 1, which is characterized in that described logical The step of geographical location information is built into database by quaternary tree computer data structure is crossed to specifically include:
It is successively read every data line in the first document, extracts the longitude coordinate and latitude of every data line in first document Coordinate, and quaternary tree data structure is established according to the longitude coordinate and latitude coordinate;
It is successively read each of quaternary tree data structure node, and is stored to the second document;Wherein, the quaternary tree A node in data structure corresponds to the data line in second document, every data line format in second document All the same, every data line includes number, quaternary tree storage region, geographical location information and works as prosthomere in second document The child node of point;
It is successively read every data line in second document, extracts the child node of geographical location information and present node, group Database is constructed at complex data, and according to the complex data.
3. according to claim 2 in embedded device search for geographical location information method, which is characterized in that it is described according to Every data line in the first document of secondary reading extracts the longitude coordinate and latitude coordinate of every data line in first document, And before the step of establishing quaternary tree data structure according to the longitude coordinate and latitude coordinate further include:
The first document is stored in advance, wherein the data format of every a line is all the same in first document, in first document The data of every a line include longitude coordinate, latitude coordinate.
4. the method for geographical location information is searched in embedded device according to claim 3, which is characterized in that described the The data of every a line further include geo-location service information in one document, and the geo-location service information includes driving direction One of angle, speed limit velocity amplitude or camera types are a variety of.
5. the method for geographical location information is searched in embedded device according to claim 2, which is characterized in that described four Tree data structure includes root node, non-leaf nodes and leaf node, and a leaf node is stored with first text Data line in shelves.
6. according to claim 2 in embedded device search for geographical location information method, which is characterized in that it is described according to It is secondary to read every data line in second document, the child node of geographical location information and present node is extracted, is combined into multiple The step of closing data, generating database specifically includes:
It is successively read every data line in second document, extracts geographical location information and present node in every data line Child node, and detect in the child node of the geographical location information and present node in every data line whether at least one son Data are not 0;
If so, combining the child node of the geographical location information and present node, obtain complex data, and mark is set Position;
All complex datas that will be obtained, are built into database.
7. the method for geographical location information is searched in embedded device according to claim 2, which is characterized in that described to obtain The GPS coordinate for taking target position, the step of the geographical location information by calling target position periphery described in the database search Suddenly it specifically includes:
The GPS coordinate for obtaining target position, obtains the longitude coordinate and latitude coordinate of the target position;
According to the longitude coordinate and latitude coordinate, search in the database opposite with the longitude coordinate and latitude coordinate The complex data answered, and export the geo-location service information in the complex data.
8. it is a kind of in embedded device search for geographical location information system, which is characterized in that including terminal and with it is described The embedded device of terminal called connection, the terminal believe geographical location for first passing through quaternary tree computer data structure in advance Breath is built into database, and the database is imported into the embedded device;The embedded device is for obtaining mesh The GPS coordinate of cursor position, by the geo-location service information for calling target position periphery described in the database search.
CN201910721918.8A 2019-08-06 2019-08-06 Method and system for searching geographical location information in embedded equipment Active CN110427449B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910721918.8A CN110427449B (en) 2019-08-06 2019-08-06 Method and system for searching geographical location information in embedded equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910721918.8A CN110427449B (en) 2019-08-06 2019-08-06 Method and system for searching geographical location information in embedded equipment

Publications (2)

Publication Number Publication Date
CN110427449A true CN110427449A (en) 2019-11-08
CN110427449B CN110427449B (en) 2023-04-14

Family

ID=68412861

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910721918.8A Active CN110427449B (en) 2019-08-06 2019-08-06 Method and system for searching geographical location information in embedded equipment

Country Status (1)

Country Link
CN (1) CN110427449B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996199A (en) * 2009-08-20 2011-03-30 浙江省公众信息产业有限公司 System and method for realizing GIS (Geographic Information System) engine based on embedded environment
CN102945261A (en) * 2012-10-20 2013-02-27 江苏大学 One-button target search optimization method for intelligent vehicle-mounted information service terminal
US20180025028A1 (en) * 2016-07-22 2018-01-25 Adobe Systems Incorporated Facilitating Location-Aware Analysis
CN108628951A (en) * 2018-04-03 2018-10-09 苏州舆图数据科技有限公司 Spatial data massive texture storage based on document model and abbreviation compression method
US20190220453A1 (en) * 2016-08-31 2019-07-18 Pointerra Technologies Pty Ltd Method and system for storing and retrieving multi-dimensional data
CN111367913A (en) * 2020-03-03 2020-07-03 青岛大学 Modeling method of data model facing to full space

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101996199A (en) * 2009-08-20 2011-03-30 浙江省公众信息产业有限公司 System and method for realizing GIS (Geographic Information System) engine based on embedded environment
CN102945261A (en) * 2012-10-20 2013-02-27 江苏大学 One-button target search optimization method for intelligent vehicle-mounted information service terminal
US20180025028A1 (en) * 2016-07-22 2018-01-25 Adobe Systems Incorporated Facilitating Location-Aware Analysis
US20190220453A1 (en) * 2016-08-31 2019-07-18 Pointerra Technologies Pty Ltd Method and system for storing and retrieving multi-dimensional data
CN108628951A (en) * 2018-04-03 2018-10-09 苏州舆图数据科技有限公司 Spatial data massive texture storage based on document model and abbreviation compression method
CN111367913A (en) * 2020-03-03 2020-07-03 青岛大学 Modeling method of data model facing to full space

Also Published As

Publication number Publication date
CN110427449B (en) 2023-04-14

Similar Documents

Publication Publication Date Title
US11061985B2 (en) System and method for linking data records for parcels
CN111324679B (en) Method, device and system for processing address information
CN103412863A (en) Embedded-device-oriented method for achieving rapid visualization of high-capacity vector map
US11966424B2 (en) Method and apparatus for dividing region, storage medium, and electronic device
JP7407209B2 (en) Information push method and device
US20200193372A1 (en) Information processing method and apparatus
CN109492066B (en) Method, device, equipment and storage medium for determining branch names of points of interest
CN103473238B (en) Dispense address location system and method
CN107247791B (en) Parking lot map data generation method and device and machine-readable storage medium
CN110472797A (en) A kind of city bus complex network automatic generating method based on web
CN109859109A (en) A kind of Serial Scale PDF map seamless organization and display methods
CN113254559A (en) Equipment site selection method based on geographic information system
CN109684425A (en) Declaration form station address matching process and device
CN113360789A (en) Interest point data processing method and device, electronic equipment and storage medium
US9116917B1 (en) Augmenting a geographic information system
CN111859187A (en) POI query method, device, equipment and medium based on distributed graph database
CN110427449A (en) A kind of method and system for searching for geographical location information in embedded device
CN104156475B (en) Geography information read method and device
CN115203354B (en) Vehicle code track pre-association method and device, computer equipment and storage medium
CN109241207B (en) Method and device for displaying data on map
CN108132992B (en) Personnel information basic address coding method and system and electronic equipment
CN111382220A (en) POI data dividing method and device
CN206117732U (en) Cartographic data server system
CN115712667A (en) Graph data fusion analysis method and device and storage medium
CN111767295B (en) Map data processing method, device, computing equipment and medium

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
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method and system for searching geographic location information in embedded devices

Granted publication date: 20230414

Pledgee: Shenzhen small and medium sized small loan Co.,Ltd.

Pledgor: SHENZHEN APICAL TECHNOLOGY CO.,LTD.

Registration number: Y2024980016140