Summary of the invention
The present invention solve problem be, due to generate map time Reusability block map data, need repeat release with read in internal memory decompress(ion), and increase electronic chart software according to user's request and produce map and display time.
For solving the problem, the invention provides a kind of electronic map data management system, comprising:
Figure money database, for the block map data that memory partitioning also compresses, each block map data has had the map sheet number of mark action;
Memory buffer, for storing the block map data after decompress(ion);
Image-drawing unit, transfer instruction, and according to the block map data map making transferred, described instruction comprises the map sheet number of the block map data that needs are transferred for producing block map data according to user's operation information;
Administrative unit, for transfer instruction described in receiving and according to described in transfer map sheet number in instruction, judge whether to exist in said buffer memory to should block map data after the decompress(ion) of map sheet number, if so, then transfer the block map data after this decompress(ion) from described memory buffer; If not, then provide database from described figure the block map data transferring compression.
Optionally, described map sheet number has classification key word, framing key word, hierarchical key word.
Optionally, described figure provides the piecemeal of the block map data in database is irregular piecemeal.
Optionally, the block map data after the decompress(ion) in described memory buffer derives from described image-drawing unit or described administrative unit.
Optionally, described administrative unit comprises: judging unit, extraction unit, transmitting element; Described judging unit be used for according to described in transfer instruction and judge whether to exist in said buffer memory to should block map data after the decompress(ion) of map sheet number, if, described extraction unit extracts the block map data after described decompress(ion) from described memory buffer, if not, described extraction unit provides database from described figure the block map data extracting described compression; Described transmitting element is used for the block map data that described extraction unit extracts to send to described image-drawing unit.
Optionally, described image-drawing unit comprises decompression units, graphics generation unit; Described decompression units is used for the block map data of the compression transferred being carried out decompress(ion) and sending to described memory buffer; Described graphics generation unit is used for according to the block map data map making after decompress(ion).
Optionally, described administrative unit comprises: judging unit, extraction unit, decompression units, transmitting element; Described judging unit is used for transferring instruction described in foundation, judge whether to exist in said buffer memory to should block map data after the decompress(ion) of map sheet number, if, described extraction unit extracts the block map data after described decompress(ion) from described memory buffer, if not, described extraction unit provides database from described figure the block map data extracting described compression; Described decompression units is used for the block map data decompress(ion) of described compression and sends to described memory buffer; Described transmitting element is used for the block map data after described decompress(ion) to send to described image-drawing unit.
Optionally, described administrative unit comprises upper limit number judging unit and delete cells; Whether the block map data number after described upper limit number judging unit judges the decompress(ion) in described memory buffer exceeds upper limit number, if so, then described delete cells with the block map data after the decompress(ion) deleted number and delete in described memory buffer.
Optionally, described upper limit number is 100-500, and described deletion number is 5-50.
Optionally, described administrative unit comprises hash units, whether the map sheet in described instruction number is converted into cryptographic hash by described hash units, and adopt hash algorithm to judge to exist in said buffer memory to should block map data after the decompress(ion) of map sheet number according to described cryptographic hash.
The present invention also provides a kind of electronic map data management method, comprising:
Produce block map data according to user's operation information and transfer instruction, described in transfer the map sheet number that instruction comprises the block map data that needs are transferred;
The map sheet number in instruction is transferred described in foundation, judge whether to exist in memory buffer to should block map data after the decompress(ion) of schematic symbol, if, then from described memory buffer, transfer the block map data after decompress(ion), if not, then search from figure money database to should map sheet number compression block map data and be stored in described memory buffer after decompress(ion);
Transfer the block map data after decompress(ion), and draw corresponding map.
Optionally, described map sheet number has classification key word, framing key word, hierarchical key word.
Optionally, describedly judge whether to exist in memory buffer to should block map data after the decompress(ion) of schematic symbol, whether concrete steps are: the described map sheet number transferred in instruction is converted into cryptographic hash, and adopt hash algorithm to judge to exist in said buffer memory to should block map data after the decompress(ion) of map sheet number according to described cryptographic hash.
Optionally, also comprise step: judge whether the block map data number after the decompress(ion) in described memory buffer exceeds upper limit number, if so, then to delete the block map data after decompress(ion) that number deletes in described memory buffer;
Optionally, describedly non-using priciple is at most adopted with the block map data after deleting decompress(ion) that number deletes in described memory buffer.
Optionally, described non-using priciple at most specifically comprises the steps: the block map data after memory buffer often stores a decompress(ion), then map sheet corresponding for this block map data number is stored in the gauge outfit of list, when deleting the block map data after decompress(ion), this list of reverse traversal, draw and delete several untapped map sheet at most number and delete this map sheet number from this list, and by the map datum block delete after this map sheet number corresponding decompress(ion).
Compared with prior art, adopt electronic map data management system of the present invention and method, have the following advantages:
1. read and the block map data of decompress(ion) for from figure money database, be stored in memory buffer, only when it exceeds the upper limit number of memory buffer storage, delete the block map data after this decompress(ion) to delete number.Therefore, when again extracting block map data identical in memory buffer, the block map data after decompress(ion) directly can be extracted from memory buffer, thus need not decompress(ion) again, decrease the rise time of map.
2. adopt non-using priciple at most to delete the block map data after decompress(ion) in memory buffer, make the block map data after the decompress(ion) retained be the data block be more likely extracted, thus more reasonable, be conducive to the rise time reducing map.
Embodiment
Just as described in the background section, the block map data of prior art Reusability when generating map, needs repeat release and read in internal memory decompress(ion), and increases the rise time of electronic chart.
For enabling above-mentioned purpose of the present invention, feature and advantage become apparent more, are namely described in detail the specific embodiment of the present invention in conjunction with the accompanying drawings and embodiments below.
Set forth a lot of detail in the following description so that fully understand the present invention, but the present invention can also adopt other to be different from alternate manner described here to implement, therefore the present invention is not by the restriction of following public specific embodiment.
Refer to Fig. 1, Fig. 1 is electronic map data management system block diagram of the present invention.For solving the problem, the invention provides a kind of electronic map data management system, comprising:
Figure money database 10, for the block map data that memory partitioning also compresses, each block map data has had the map sheet number of mark action;
Memory buffer 20, for storing the block map data after decompress(ion);
Image-drawing unit 30, database 10 is provided and described memory buffer 20 is connected with described figure, transfer instruction for producing block map data according to user's operation information, and according to the block map data map making transferred, described instruction comprises the map sheet number of the block map data that needs are transferred;
Administrative unit 40, be connected with described image-drawing unit 30, for transfer instruction described in receiving and according to described in transfer map sheet number in instruction, judge whether to exist in described memory buffer 20 to should block map data after the decompress(ion) of map sheet number, if so, then the block map data after this decompress(ion) is transferred from described memory buffer 20; If not, then provide from described figure the block map data transferring compression database 10.
For the block map data needing to extract, if when there is the block map data after the decompress(ion) of corresponding map sheet number in described memory buffer 20, directly can extract the block map data after decompress(ion) from memory buffer 20, thus need not decompress(ion) again, decrease the rise time of map.
Herein, the block map data after the decompress(ion) in described memory buffer 20 derives from described image-drawing unit 30 or described administrative unit 40.
Herein, described map sheet number can for having classification key word, framing key word, hierarchical key word.Described classification key word is in order to distinguish described block map data location map file, described framing key word in order to distinguish the map sheet at described block map data place, described hierarchical key word in order to distinguish road or the face at described block map data place.
Herein, described figure provides the piecemeal of the block map data in database 10 is irregular piecemeal.Certainly, the piecemeal of described block map data also can be regular piecemeal.
Herein, described administrative unit 40 specifically comprises upper limit number judging unit and delete cells; Whether the block map data number after described upper limit number judging unit judges the decompress(ion) in described memory buffer exceeds upper limit number, if so, then described delete cells with the block map data after the decompress(ion) deleted number and delete in described memory buffer.
Herein, described upper limit number is 100-500, is preferably 200.
Herein, described deletion number is 5-50, is preferably 10.
Herein, described administrative unit 40 comprises hash units 47, whether the map sheet in described instruction number is converted into cryptographic hash by described hash units 47, and adopt hash algorithm to judge to exist in described memory buffer 20 to should block map data after the decompress(ion) of map sheet number according to described cryptographic hash.
Referring again to the block diagram that Fig. 2, Fig. 2 are electronic map data management system first embodiment of the present invention.
In this first embodiment, except having in Fig. 1 except each interconnective module.Described administrative unit 40 specifically comprises: judging unit 41, extraction unit 42, transmitting element 43; Described image-drawing unit 30 specifically comprises decompression units 31, graphics generation unit 32.
Whether described judging unit 41 judges to exist in described memory buffer 20 to should block map data after the decompress(ion) of map sheet number for transferring instruction described in foundation, if, described extraction unit 42 extracts the block map data after described decompress(ion) from described memory buffer 20, if not, described extraction unit 42 provides from described figure the block map data extracting described compression database 20; Described transmitting element 43 sends to described image-drawing unit 30 for the block map data extracted by described extraction unit 42.
Described decompression units 31 is for carrying out decompress(ion) by the block map data of the compression transferred and sending to described memory buffer 20; Described graphics generation unit 32 is for the block map data map making after foundation decompress(ion).
Visible, described extraction unit 42 provides after the block map data extracting described compression database 20 from described figure, can carry out decompress(ion) by the decompression units 31 in described image-drawing unit 30.
Referring again to the block diagram that Fig. 3, Fig. 3 are electronic map data management system second embodiment of the present invention.
In this second embodiment, except having in Fig. 1 except each interconnective module.Described administrative unit 40 specifically comprises: judging unit 41, extraction unit 42, transmitting element 43, decompression units 44.
Whether described judging unit 41 judges to exist in described memory buffer 20 to should block map data after the decompress(ion) of map sheet number for transferring instruction described in foundation, if, described extraction unit 42 extracts the block map data after described decompress(ion) from described memory buffer 20, if not, described extraction unit 42 provides from described figure the block map data extracting described compression database 20; Described decompression units 44 is for sending to described memory buffer 20 by the block map data decompress(ion) of described compression; Described transmitting element 43 sends to described image-drawing unit 30 for the block map data extracted by described extraction unit 42.
Visible, described extraction unit 42 provides after the block map data extracting described compression database 20 from described figure, can carry out decompress(ion) by the decompression units 44 in described image-drawing unit 40.
Refer to Fig. 4, Fig. 4 is the process flow diagram of electronic map data management method of the present invention.The present invention also provides a kind of electronic map data management method, comprising:
Step S1: produce block map data according to user's operation information and transfer instruction, described in transfer the map sheet number that instruction comprises the block map data that needs are transferred;
Step S2: transfer the map sheet number in instruction described in foundation, judge whether to exist in memory buffer to should block map data after the decompress(ion) of schematic symbol, if, then perform step S3: from described memory buffer, transfer the block map data after decompress(ion), if not, then perform step S4: search from figure money database to should map sheet number compression block map data and be stored in described memory buffer after decompress(ion);
Step S5: transfer the block map data after decompress(ion), and draw corresponding map.
Herein, described map sheet number has classification key word, framing key word, hierarchical key word.
Herein, described map sheet number can for having classification key word, framing key word, hierarchical key word.Described classification key word is in order to distinguish described block map data location map file, described framing key word in order to distinguish the map sheet at described block map data place, described hierarchical key word in order to distinguish road or the face at described block map data place.
Herein, described step S2, whether concrete steps are: the described map sheet number transferred in instruction is converted into cryptographic hash, and adopt hash algorithm to judge to exist in said buffer memory to should block map data after the decompress(ion) of map sheet number according to described cryptographic hash.Certainly, alternate manner also can be adopted to judge.
Herein, the method also comprises step: judge whether the block map data number after the decompress(ion) in described memory buffer exceeds upper limit number, if so, then to delete the block map data after decompress(ion) that number deletes in described memory buffer.Thus solve after the block map data number after the decompress(ion) stored in memory buffer exceeds upper limit number, need the problem continuing to carry out storing.
Herein, describedly non-using priciple is at most adopted with the block map data after deleting decompress(ion) that number deletes in described memory buffer.Adopt non-using priciple at most to delete the block map data after decompress(ion) in memory buffer, make the block map data after the decompress(ion) retained be the data block be more likely extracted, thus more reasonable, be conducive to the rise time reducing map.Certainly, Else Rule also can be adopted to delete.
Specifically, described non-using priciple at most can for comprising the steps: when memory buffer often stores the block map data after a decompress(ion), then map sheet corresponding for this block map data number is stored in the gauge outfit of list, when deleting the block map data after decompress(ion), this list of reverse traversal, draw and delete several untapped map sheet at most number and delete this map sheet number from this list, and by the map datum block delete after this map sheet number corresponding decompress(ion).
Although the present invention with preferred embodiment openly as above; but it is not for limiting the present invention; any those skilled in the art without departing from the spirit and scope of the present invention; can make possible variation and amendment, the scope that therefore protection scope of the present invention should define with the claims in the present invention is as the criterion.