Priority-based autonomous GIS scheduling method, electronic equipment and storage medium
By decomposing GIS data into tile and prioritizing using message queues and hash indexes, the problem of inefficiency of display latency and cache loading strategies in traditional GIS data scheduling methods is solved, and more efficient data scheduling and index management are achieved.
Patent Information
- Application Number
- CN202411799577.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-03-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional GIS data scheduling methods lack flexibility and controllability, resulting in inefficiency in display latency and cache loading strategies.
Adopting the autonomous GIS scheduling method based on priority, the map data in the screen display area is decomposed into tile, and data scheduling and management is achieved using message queues and hash indexes to effectively process message priority and data indexes.
Improves the controllability and flexibility of data scheduling, reduces display delay, and effectively reduces the amount of indexed data.
Smart Images

Figure CN119646111A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of GIS data scheduling, and in particular relates to an autonomous GIS scheduling method based on priority, electronic equipment and storage medium. Background Art
[0002] With the development trend of computer miniaturization, applicability and popularization of geographic information services, the demand for real-time display of electronic maps in various GIS products is getting higher and higher. Traditional data scheduling methods mostly use the map data in the entire screen area as the scheduling unit. When executing map operations continuously, the system needs to wait for the previous processing process to be completed before processing the next operation, resulting in display delay. The scheduling method lacks flexibility and controllability. Summary of the invention
[0003] The problem to be solved by the present invention is the technical problem of scheduling delay and cache loading strategy existing in the prior art, and an autonomous GIS scheduling method, electronic device and storage medium based on priority are proposed.
[0004] To achieve the above object, the present invention is implemented through the following technical solutions:
[0005] A priority-based autonomous GIS scheduling method includes the following steps:
[0006] S1. Decompose the map data to be processed in the screen display area into several tiles, and perform data scheduling with each tile as a sub-unit;
[0007] S2. Performing data normalization processing on the map display message to be processed based on the tiles obtained in step S1 to obtain a normalized sub-message;
[0008] S3. The normalized sub-messages obtained in step S2 are composed of message sequences and distributed to the constructed message queue;
[0009] S4. For the tile corresponding to the message sequence obtained in step S3, a hash index is constructed for the tile based on the hash function mapping mechanism, and the tile data is obtained through the tile data address pointed to by the hash index;
[0010] S5. Establish a tile data linked list and a tile free linked list, manage the tile data obtained in step S4, and obtain the tile data storage address;
[0011] S6. Send the tile data storage address obtained in step S5 to the autonomous GIS engine to display the map data.
[0012] Furthermore, in step S1, the number of tile rows included in the map data to be processed is set to n. r , the number of tile columns is nc , then the calculation formula for the number of tiles m for the map data to be processed is:
[0013] m=n r *n c .
[0014] Furthermore, in step S2, according to the number m of tiles included in the current screen display area, the map display message is split into m sub-messages with tiles as display units, and the data structure is normalized at the message receiving end and the message sending end, including setting the message identifier id, message priority pri, message parameter para, destination handle dhandle, and source handle shandle.
[0015] Furthermore, the specific implementation method of step S3 includes the following steps:
[0016] S3.1. Build the message queue as a FIFO message queue;
[0017] S3.2. The standardized sub-messages obtained in step S2 are composed into a message sequence and distributed to the message queue. Finally, a message indicating the completion of processing is sent to the end of the message queue. After the above message sequence is sent, the map display task takes out the above message sequence from the message queue in sequence and processes them one by one.
[0018] Furthermore, the specific implementation method of step S4 includes the following steps: mapping the four parameters of the tile data layer IDL, complementary data level CDG, row number, and column number into keyword parameter k, and mapping the tile data of the keyword parameter k to the hash index with bucket number f(k) in the hash table through a hash function f, and obtaining the tile data through the tile data address pointed to by the hash index.
[0019] Furthermore, in step S5, the node pData pointer of the hash index is retrieved and finally the tile data storage address is located.
[0020] An electronic device includes a memory and a processor. The memory stores a computer program. When the processor executes the computer program, the steps of the priority-based autonomous GIS scheduling method are implemented.
[0021] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the priority-based autonomous GIS scheduling method.
[0022] Beneficial effects of the present invention:
[0023] The priority-based autonomous GIS scheduling method described in the present invention uses a serialized message-driven strategy to decompose messages and send them to a FIFO message queue, thereby enhancing the controllability and flexibility of data scheduling.
[0024] The priority-based autonomous GIS scheduling method described in the present invention provides a data scheduling method based on message priority, which reduces the amount of data to be processed, thereby reducing display delay.
[0025] The priority-based autonomous GIS scheduling method described in the present invention proposes a GIS data index construction method based on hash mapping, which effectively reduces the amount of index data. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A flowchart of a priority-based autonomous GIS scheduling method according to the present invention;
[0027] Figure 2 This is a multi-task tile processing flow chart of the present invention;
[0028] Figure 3 This is a flow chart of GIS data traversal of the present invention. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present invention more clear, the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention, that is, the specific embodiments described are only part of the embodiments of the present invention, rather than all of the specific embodiments. The components of the specific embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations, and the present invention can also have other embodiments.
[0030] Therefore, the following detailed description of the specific embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents the selected specific embodiments of the present invention. Based on the specific embodiments of the present invention, all other specific embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present invention.
[0031] In order to further understand the content, features and effects of the present invention, the following specific implementation methods are given as examples, and the attached Figure 1 -Attached Figure 3 The detailed instructions are as follows:
[0032] Embodiment 1:
[0033] A priority-based autonomous GIS scheduling method includes the following steps:
[0034] S1. Decompose the map data to be processed in the screen display area into several tiles, and perform data scheduling with each tile as a sub-unit;
[0035] Furthermore, in step S1, the number of tile rows included in the map data to be processed is set to n. r , the number of tile columns is n c , then the calculation formula for the number of tiles m for the map data to be processed is:
[0036] m=n r *n c .
[0037] S2. Performing data normalization processing on the map display message to be processed based on the tiles obtained in step S1 to obtain a normalized sub-message;
[0038] Further, in step S2, according to the number of tiles m included in the current screen display area, the map display message is split into m sub-messages with tiles as display units, and the data structure is normalized at the message receiving end and the message sending end, including setting the message identifier id, the message priority pri, the message parameter para, the destination handle dhandle, and the source handle shandle;
[0039] S3. The normalized sub-messages obtained in step S2 are composed of message sequences and distributed to the constructed message queue;
[0040] Furthermore, the specific implementation method of step S3 includes the following steps:
[0041] S3.1. Build the message queue as a FIFO message queue;
[0042] S3.2. The standardized sub-messages obtained in step S2 are composed into a message sequence and distributed to the message queue. Finally, a message indicating the completion of processing is sent to the end of the message queue. After the above message sequence is sent, the map display task takes out the above message sequence from the message queue in sequence and processes them one by one.
[0043] Furthermore, assuming that the user performs two consecutive map zoom operations, the map display processes the jth (1≤j≤m) tile data of the i-th (1≤i≤n) operation. After the jth tile data is processed, all sub-messages with a priority pri attribute value of p in its message queue are immediately deleted;
[0044] Furthermore, the map display serializes the display task corresponding to the i+1th operation, sends the converted sub-message to its queue, and initializes its priority attribute to p+1;
[0045] Set the number of tiles to be processed in the i-th operation to m i , and the actual number of tiles processed is k i (1≤i≤m), then m i The following relationship is satisfied:
[0046] m i =m s (idl i =idl s ,i,s∈[1,4])
[0047] Among them, idl i is the data layer of the tile corresponding to the i-th operation, idl s The data layer of the tile corresponding to the s-th operation;
[0048] Defined at display level l (1≤l≤16), the row and column numbers of the current cache center tile O are r o 、c o , the keyword corresponding to tile O is K O , taking O as the reference, the set of all tiles in the corresponding range near O is R l , the set R is the keyword tile space, where U is the cache space and satisfies
[0049] S4. For the tile corresponding to the message sequence obtained in step S3, a hash index is constructed for the tile based on the hash function mapping mechanism, and the tile data is obtained through the tile data address pointed to by the hash index;
[0050] Further, the specific implementation method of step S4 includes the following steps: mapping the four parameters of the tile data layer IDL, complementary data level CDG, row number, and column number to a keyword parameter k, and mapping the tile data of the keyword parameter k to a hash index with a bucket number of f(k) in the hash table through a hash function f, and obtaining the tile data through the tile data address pointed to by the hash index;
[0051] Furthermore, after the tile P(i,j,r,c) is mapped by g, the four parameters of IDL, CDG, row number, and column number that uniquely represent the tile are mapped to a keyword k(i,j,r,c), then the mapping relationship g(i,j,r,c) is expressed as:
[0052] g(i,j,r,c)=K O (i,j)+(rr A )×n ij +(cc A )
[0053] Among them, r AThe row number of tile A, c A The column number of tile A, n ij Representation IDL i Layer, CDG j The number of tiles in the level.
[0054] The keyword parameter k corresponding to the tile is calculated through the mapping relationship g, and the modulo division method is used, that is, the remainder of k divided by M is taken as the hash address, the hash function f(k), the expression is:
[0055] f(k)=kmodM
[0056] Where M is a prime number that is not too close to the integer power of 2;
[0057] Furthermore, it is determined whether the head pointer in the index header element HTP[f(k)] is empty. If it is empty, it means that there is no hash index node with bucket number f(k) and corresponding tile data in the cache.
[0058] S5. Establish a tile data linked list and a tile free linked list, manage the tile data obtained in step S4, and obtain the tile data storage address;
[0059] Furthermore, in step S5, the node pData pointer of the hash index is retrieved and finally the tile data storage address is located;
[0060] Furthermore, the hash table index chain pointed to by HTP[f(k)] is searched in a loop. During the traversal process, k is compared with the keyword stored in the current index node to see if it matches. If it matches, it means that the index node is the target index to be found. Then the pData pointer of the index node is taken out and the storage address of the tile data is finally located.
[0061] S6. Send the tile data storage address obtained in step S5 to the autonomous GIS engine to display the map data.
[0062] Furthermore, the tile storage address is sent to the autonomous GIS engine to complete the real-time rendering of GIS data.
[0063] Embodiment 2:
[0064] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of a priority-based autonomous GIS scheduling method described in Example 1 when executing the computer program.
[0065] The computer device of the present invention may be a device including a processor and a memory, such as a single chip microcomputer including a central processing unit, etc. Moreover, the processor is used to implement the steps of the above-mentioned priority-based autonomous GIS scheduling method when executing the computer program stored in the memory.
[0066] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0067] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0068] Embodiment 3:
[0069] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a priority-based autonomous GIS scheduling method described in Example 1.
[0070] The computer-readable storage medium of the present invention can be any form of storage medium that can be read by a processor of a computer device, including but not limited to non-volatile memory, volatile memory, ferroelectric memory, etc. A computer program is stored on the computer-readable storage medium. When the processor of the computer device reads and executes the computer program stored in the memory, the steps of the above-mentioned priority-based autonomous GIS scheduling method can be implemented.
[0071] The computer program includes computer program code, which may be in source code form, object code form, executable file or some intermediate form, etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0072] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0073] Although the present application has been described above with reference to specific embodiments, various modifications may be made thereto and parts thereof may be replaced with equivalents without departing from the scope of the present application. In particular, as long as there is no structural conflict, the various features in the specific embodiments disclosed in the present application may be used in combination with each other in any manner, and the fact that these combinations are not exhaustively described in this specification is only for the sake of omitting space and saving resources. Therefore, the present application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A priority-based autonomous GIS scheduling method, characterized in that: The steps include: S1. Decompose the map data to be processed in the screen display area into several tiles, and perform data scheduling with each tile as a sub-unit; S2. The map display message to be processed is subjected to data normalization processing based on the tiles obtained in step S1 to obtain a normalized sub-message; S3. The normalized sub-messages obtained in step S2 are composed of message sequences and distributed to the constructed message queue; S4. For the tile corresponding to the message sequence obtained in step S3, a hash index is constructed for the tile based on the hash function mapping mechanism, and the tile data is obtained through the tile data address pointed to by the hash index; S5. Establish a tile data linked list and a tile free linked list, manage the tile data obtained in step S4, and obtain the tile data storage address; S6. Send the tile data storage address obtained in step S5 to the autonomous GIS engine to display the map data.
2. The priority-based autonomous GIS scheduling method according to claim 1, characterized in that: In step S1, the number of tile rows included in the map data to be processed is set to n. r , the number of tile columns is n c , then the calculation formula for the number of tiles m for the map data to be processed is: m=n r *n c 。 3. The priority-based autonomous GIS scheduling method according to claim 2, characterized in that: In step S2, according to the number m of tiles included in the current screen display area, the map display message is split into m sub-messages with tiles as display units, and the data structure is normalized at the message receiving end and the message sending end, including setting the message identifier id, message priority pri, message parameter para, destination handle dhandle, and source handle shandle.
4. The priority-based autonomous GIS scheduling method according to claim 3, characterized in that: The specific implementation method of step S3 includes the following steps: S3.
1. Build the message queue as a FIFO message queue; S3.
2. The standardized sub-messages obtained in step S2 are composed into a message sequence and distributed to the message queue. Finally, a message indicating the completion of processing is sent to the end of the message queue. After the above message sequence is sent, the map display task takes out the above message sequence from the message queue in sequence and processes them one by one.
5. The priority-based autonomous GIS scheduling method according to claim 4, characterized in that: The specific implementation method of step S4 includes the following steps: mapping the four parameters of the tile data layer IDL, complementary data level CDG, row number, and column number into keyword parameter k, and mapping the tile data of the keyword parameter k to the hash index with bucket number f(k) in the hash table through the hash function f, and obtaining the tile data through the tile data address pointed to by the hash index.
6. The priority-based autonomous GIS scheduling method according to claim 5, characterized in that: In step S5, the node pData pointer of the hash index is retrieved and finally the tile data storage address is located.
7. An electronic device, characterized in that: It comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of a priority-based autonomous GIS scheduling method as described in any one of claims 1-6 when executing the computer program.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the priority-based autonomous GIS scheduling method described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Video file storing and managing system and method based on Hash grid index
CN106682110A
Map tile processing method and device, electronic equipment and computer storage medium
CN114625816A