Map loading method, system and storage medium

By monitoring user map operations and generating a map using the query data from the most recent operation after the user stops, the problem of slow map loading is solved, improving loading efficiency and user experience.

CN115544394BActive Publication Date: 2026-05-01TIMES LINGYU (XIAMEN) INTELLIGENT INFORMATION CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TIMES LINGYU (XIAMEN) INTELLIGENT INFORMATION CO LTD
Filing Date
2022-11-07
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing map loading methods are slow when users frequently drag, zoom, or rotate the map, resulting in a poor user experience.

Method used

By monitoring user actions on the map display area, it determines whether to stop the operation. If the operation stops, it checks whether the update conditions are met after a preset time. The target map is then generated using the query data from the most recent operation, reducing the number of queries to the server and the number of rendering operations.

Benefits of technology

It improved map loading efficiency, reduced unnecessary operations, and enhanced the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115544394B_ABST
    Figure CN115544394B_ABST
Patent Text Reader

Abstract

The application provides a map loading method, system and storage medium. The method comprises the following steps: determining whether a user stops a dragging behavior according to a listening start variable in a listening variable; if it is determined that the user stops the dragging behavior, determining whether a preset update condition is met according to an update identifier after a preset time; if it is determined that the preset update condition is met, determining target query data according to the listening start variable, and generating a target map according to the target query data; wherein the target query data is obtained from a query array; and the query array is configured to store a plurality of query data. The map loading method provided by the embodiment of the application can reduce the number of queries to the server, reduce the number of map rendering times, and eliminate invalid feedback generated by the operation behavior of the user on the map display area, thereby greatly optimizing the map loading process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of map loading, and more specifically, to a map loading method, system, storage medium, and storage medium. Background Technology

[0002] More and more systems are using maps and need to render and load data on maps; such as marking business locations and marking relevant civil defense facilities on maps.

[0003] Currently, there are generally two ways to render map points: one is to query all the points and load them all at once; the other is to load them in segments, loading only the points within the visible area of ​​the map.

[0004] However, both the method of querying all marker points and the method of loading in segments, which only loads the markers within the visible range of the map, suffer from slow map loading when users frequently drag, zoom, or rotate the map, resulting in a poor user experience. Summary of the Invention

[0005] The purpose of this application is to provide a map loading method, system, and storage medium. After a user's single operation on a map display area ends, the system continuously determines whether the user will perform another operation within a preset time. If another operation is performed, the query results of the previous operation are discarded; if no further operation is performed, the current operation is used for querying, and the target map is loaded based on the query results. Using the map loading method provided in this application reduces the number of queries to the server, reduces map rendering, eliminates invalid operations, and greatly optimizes the map loading process.

[0006] In a first aspect, embodiments of this application provide a map loading method, which includes: determining whether a user has stopped operating on a map display area based on a listening start variable in a listening variable. If it is determined that the user has stopped operating on the map display area, then after a preset time, determining whether a preset update condition is met based on an update identifier. If it is determined that the preset update condition is met, then determining target query data based on the listening start variable, and generating a target map based on the target query data; wherein, the target query data is taken from a query array; the query array is configured to store several query data sets.

[0007] In the above implementation process, the map loading method provided in this application embodiment detects user operations on the map display area by listening to variables, such as dragging, zooming, or rotating the map. After detecting dragging, zooming, or rotating, if the user does not drag, zoom, or rotate again within a preset time, the query data corresponding to the most recent dragging, zooming, or rotating behavior is used to query and generate the corresponding target map. This can eliminate invalid dragging, zooming, or rotating behaviors of the user. In other words, a query is not performed every time there is a dragging, zooming, or rotating; loading is only performed when it is determined that the user will not continue to drag, zoom, or rotate the map. This greatly improves the efficiency of map loading and enhances the user experience.

[0008] Optionally, in this embodiment, the monitoring variable further includes a monitoring end variable; the update flag includes the absence of a monitoring end variable detected within a preset time; the monitoring end variable represents the start of the user's operation on the map display area, and the monitoring start variable represents the cessation of the user's operation on the map display area. Determining whether the preset update condition is met based on the update flag includes: determining whether a monitoring end variable was detected within a preset time, and whether the monitoring variable is now a monitoring start variable after the preset time. If it is determined that no monitoring end variable was detected within the preset time, and the monitoring variable is now a monitoring start variable after the preset time, then the update flag is determined to meet the preset update condition.

[0009] In the above implementation process, this application embodiment determines whether a new listening end variable exists within a preset time period after the listening end variable has been detected. If no listening end variable is detected within the preset time period, and the state of the listening variable is the listening start variable, then the update flag is determined to meet the preset update conditions. The map loading method provided by this application embodiment can avoid map loading for each operation on the map display area after an operation on the map display area has ended and another operation on the map display area has been performed within a preset time period, thereby reducing the number of requests to the server and thus reducing the number of map loading operations.

[0010] Optionally, in this embodiment, the target query data includes query data corresponding to the most recent operation on the map display area; determining the target query data based on the listener start variable and generating the target map based on the target query data includes: triggering a query start variable by the listener start variable; retrieving the target query data from the query array based on the query start variable and setting the query array to a pending update state; querying the target map using the target query data based on the listener start variable to obtain query results and triggering a query end variable; and rendering the target map based on the query results using the query end variable.

[0011] In the above implementation process, in this embodiment, the query is performed by querying a start variable, and if no new end variable is found during the query, the query is performed based on the query data corresponding to the most recent operation on the map display area; the query result is only rendered when the end variable is detected. The map loading method provided by this embodiment can avoid invalid rendering behavior caused by the user dragging, scaling, or rotating the map during the query, thereby improving the efficiency of map rendering.

[0012] Optionally, in this embodiment, the state to be updated includes clearing the query array; after querying the target map using the target query data based on the listening start variable, the method further includes: determining whether the query array is empty; if the query array is not empty, then discarding the query result.

[0013] In the above implementation, the system determines whether a new operation on the map display area exists during the query period by checking if the query array is empty. If a new operation on the map display area exists, the query is considered invalid, and the corresponding query results are discarded. Therefore, this embodiment avoids rendering the query results of the previous operation on the map display area even after the user has performed an operation on the map display area, thus avoiding meaningless rendering.

[0014] Optionally, in this embodiment, the query data includes the latitude and longitude information corresponding to the diagonal points of the user's visible screen; querying the target map using the target query data based on the monitoring start variable includes: determining that the monitoring variable is at the monitoring start variable; obtaining the maximum and minimum latitude and longitude information of the diagonal points based on the latitude and longitude information corresponding to the diagonal points of the user's visible screen corresponding to the target query data; and querying the target map based on the maximum and minimum latitude and longitude information.

[0015] In the above implementation process, the embodiments of this application use the latitude and longitude information corresponding to the diagonal points of the user's visible screen to obtain the maximum and minimum latitude and longitude, and then perform a query for the target map, so as to accurately query the target map that the user wants to query.

[0016] Optionally, in this embodiment of the application, determining the target query data based on the listening start variable and generating the target map based on the target query data further includes: obtaining the timestamp of the most recent operation on the map display area and the query data corresponding to the most recent operation on the map display area based on the listening start variable; and querying the target map based on the timestamp of the most recent operation on the map display area and the query data corresponding to the most recent operation on the map display area.

[0017] In the above implementation process, this application embodiment provides a second method for generating a target map based on target query data. The query behavior is limited to the most recent operation on the map display area by using a timestamp. This avoids performing a query operation every time the map display area is accessed, thus saving a lot of system resources.

[0018] Optionally, in this embodiment of the application, querying the target map based on the timestamp of the most recent operation on the map display area and the query data corresponding to the most recent operation on the map display area includes: obtaining the current timestamp returned by the queried party; determining whether the current timestamp returned by the queried party is consistent with the timestamp of the most recent operation on the map display area; if the current timestamp returned by the queried party is consistent with the timestamp of the most recent operation on the map display area, then querying the target map based on the query data corresponding to the most recent operation on the map display area.

[0019] In the above implementation process, this application embodiment also provides a method for querying target maps, and a solution: During the query, the query conditions are not placed in an array, and no query variables are set. Instead, the current timestamp is added to the query conditions, and the current query timestamp is recorded. The server response data includes the timestamp uploaded during the query. The timestamp is used to determine whether the current data is the latest data. If the two match, the map data is rendered; otherwise, it is not rendered. This effectively reduces unnecessary map rendering behavior and saves system resource consumption.

[0020] Optionally, in this embodiment of the application, before determining whether the user has stopped operating on the map display area based on the listening start variable, the method further includes: repeatedly determining whether the user has issued an operation on the map display area based on the listening start variable; if it is determined that the user has issued an operation on the map display area, generating corresponding query data based on the operation on the map display area; and storing the query data in a query array.

[0021] In the above implementation process, in this embodiment of the application, each user's operation on the map display area corresponds to a set of query arrays, and the corresponding query data is stored in the query arrays. By combining the array with a preset time, it is possible to accurately determine whether the user has stopped dragging, zooming, or rotating, and whether there has been any operation on the map display area during the query period; thereby effectively reducing invalid queries and invalid rendering.

[0022] Secondly, embodiments of this application provide a map loading system, characterized in that the system includes: an operation behavior judgment module for a map display area, an update judgment module, and a target map generation module. The operation behavior judgment module for a map display area is used to determine whether the user has stopped operating on the map display area based on a listening end start variable in a listening variable. The update judgment module is used to, when it is determined that the user has stopped operating on the map display area, determine whether a preset update condition is met based on an update identifier after a preset time. The target map generation module is used to, when it is determined that the preset update condition is met, determine target query data based on a listening start variable, and generate a target map based on the target query data; wherein, the target query data is taken from a query array; the query array is configured to store several query data sets.

[0023] Thirdly, embodiments of this application provide an electronic device, which includes a memory and a processor. The memory stores program instructions, and when the processor reads and runs the program instructions, it executes the steps in any of the above implementation methods.

[0024] Fourthly, embodiments of this application also provide a computer-readable storage medium storing computer program instructions, which, when read and executed by a processor, perform the steps in any of the above implementations. Attached Figure Description

[0025] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 A flowchart of a map loading method provided in an embodiment of this application;

[0027] Figure 2 A flowchart for determining the status of the update identifier provided in this application embodiment;

[0028] Figure 3 A first flowchart for generating a target map provided in an embodiment of this application;

[0029] Figure 4 This is a first flowchart of target map query provided in an embodiment of this application;

[0030] Figure 5 This is a second flowchart for target map query provided in an embodiment of this application;

[0031] Figure 6 A second flowchart for generating the target map provided in the embodiments of this application;

[0032] Figure 7 A flowchart for querying a map based on a timestamp provided in this application embodiment;

[0033] Figure 8 This is a flowchart illustrating how data is stored in a query array for a specific implementation example.

[0034] Figure 9 This is a schematic diagram of the modules of the map loading system provided in the embodiments of this application;

[0035] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0036] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. For example, the flowcharts and block diagrams in the drawings illustrate the architecture, functions, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, program segment, or part of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions. In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0037] During the research process, the applicant discovered that more and more systems are using maps and need to render and load data from the system on the maps; such as marking business locations on the map, marking relevant civil defense facilities, etc. Currently, there are generally two ways to render map locations: one is to query all the marked locations and then load them all at once; the other is to load them in segments, loading only the marked locations within the visible range of the map.

[0038] The method of retrieving all the markers on the map at once results in slow map rendering when the data volume is large; the segmented loading method, when the map is frequently dragged, rotated or zoomed, will cause slow loading due to the continuous updating of the map markers.

[0039] Based on this, since users often need to drag, rotate, or zoom multiple times to reach the desired location when viewing a map, the user's last drag, rotation, or zoom can be considered a valid drag, rotation, or zoom action. This application provides a map loading method that listens to the user's drag, rotation, or zoom actions using a monitoring variable. Within a preset time after a single drag, rotation, or zoom action, the method continuously checks whether the user will drag, rotate, or zoom again. If they do, the query results from the previous drag, rotation, or zoom are discarded; if no further drag, rotation, or zoom is performed, the query is performed based on the current drag, rotation, or zoom action, and the target map is loaded according to the query results. Using the map loading method provided in this application reduces the number of queries to the server, reduces the number of map rendering operations, eliminates invalid operations on the map display area, and greatly optimizes the map loading process.

[0040] Please refer to Figure 1 , Figure 1 A flowchart of a map loading method provided in this application embodiment; the method includes:

[0041] Step S100: Determine whether the user has stopped operating on the map display area based on the listening start variable in the listening variables.

[0042] In step S100 above, it is determined whether the user has stopped operating on the map display area based on the listening start variable. It should be noted that, in this embodiment, the operating behavior on the map display area mainly includes the user dragging, rotating, or zooming the map. This embodiment has two listening variables: a listening start variable and a listening end variable. The listening start variable indicates the end of the user's dragging, rotating, or zooming; the listening end variable indicates the start of the user's dragging, rotating, or zooming behavior. When the user's dragging, rotating, or zooming ends, the listening variable changes from the listening end variable back to the listening start variable.

[0043] Those skilled in the art will understand that in the embodiments of this application, the monitoring variables are divided into monitoring start variables and monitoring end variables; and in some embodiments, the state can be determined by the value of the monitoring variable; for example, if the monitoring variable is 1, then dragging, rotating, or scaling behavior is detected to have started; if the monitoring variable is 0, then dragging, rotating, or scaling behavior is detected to have ended. Therefore, the division of monitoring variables into monitoring start variables and monitoring end variables in the embodiments of this application should not be a limitation on the monitoring variables provided in the embodiments of this application.

[0044] Step S101: If it is determined that the user has stopped operating on the map display area, then after a preset time, determine whether the preset update conditions are met based on the update indicator.

[0045] Step S102: If the preset update conditions are met, the target query data is determined based on the listening start variable, and the target map is generated based on the target query data.

[0046] In steps S101-S102 above, if it is determined that the user has stopped dragging, rotating, or zooming, that is, the listening variable is at the listening start variable, then it is further determined whether the update flag meets the preset update conditions. If it is determined that the update flag meets the preset conditions, then the target query data is determined based on the listening start variable, and the target map is generated from the target query data.

[0047] It should be noted that the target query data is taken from the query array; each drag, rotation, or zoom action of the user corresponds to specific query data; the query data generated by each drag, rotation, or zoom is put into the query array, which can store a number of query data; when a query is needed, the query data can be retrieved from the query array.

[0048] It is worth noting that the map loading method provided in this application is applicable to both mobile and computer terminals; the operation on the map display area can be a user dragging, rotating, or zooming operation on the map display area in the mobile APP; or it can be a user dragging, zooming, or rotating operation on the map display area on the computer terminal using other input devices such as a mouse and keyboard. Maps displayed as web pages or applications displayed as executable programs on the computer terminal are both within the scope of this invention.

[0049] pass Figure 1As can be seen, the map loading method provided in this application detects user actions on the map display area (e.g., dragging, rotating, or zooming) by listening to variables. After detecting such actions, if the user does not perform any further actions within a preset time, the method uses the query data corresponding to the most recent action to generate the target map. This eliminates invalid user actions on the map display area; that is, it does not query every time an action is detected, but only loads the map after determining that the user will not continue to perform actions on the map display area. This greatly improves map loading efficiency and enhances the user experience.

[0050] Please refer to Figure 2 , Figure 2 A flowchart for determining the status of an update flag is provided in this application embodiment; the update flag in this application embodiment includes a variable indicating that no end of monitoring has been detected within a preset time. The method includes:

[0051] Step S200: Determine whether the listening end variable is detected within a preset time, and whether the listening variable is at the listening start variable after the preset time.

[0052] In step S200 above, this embodiment of the application mainly determines the status of the update identifier from two aspects: First, whether the listening end variable is detected within a preset time. If the listening end variable is detected, it indicates that the user has performed an operation on the map display area within the preset time. Second, whether the listening variable is currently in the listening start variable state, that is, the current state is that the operation on the map display area has ended.

[0053] Step S201: If it is determined that no listening end variable is detected within the preset time, and the listening variable is at the listening start variable after the preset time, then it is determined that the update flag meets the preset update conditions.

[0054] In step S201 above, if no listening end variable is detected within a preset time and the listening variable is at the listening start variable, then it is determined that the update flag meets the preset update conditions.

[0055] For example, the monitoring variable S1 includes a monitoring start variable P(S1) and a monitoring end variable V(S1). When a user performs an operation on the map display area, the monitoring variable S1 changes from the monitoring start variable P(S1) to the monitoring end variable V(S1), and then back to the monitoring start variable P(S1). If the current state of the monitoring variable S1 is detected as the monitoring start variable P(S1), a delay event is triggered to determine whether the monitoring variable is in the monitoring start variable P(S1) within a preset time. For example, this preset time can be 400 milliseconds. If the monitoring end variable V(S1) is not detected within 400 milliseconds, and the current state of the monitoring variable S1 is again determined to be the monitoring start variable P(S1), then it can be determined that the preset update condition is met. Those skilled in the art will understand that the preset duration can be adaptively adjusted according to needs. The 400 milliseconds provided in this application embodiment is only exemplary and does not represent a limitation on the preset time in this application embodiment.

[0056] pass Figure 2 As can be seen, this application embodiment determines whether a new listening end variable exists within a preset time period after the listening end variable has been detected; if no listening end variable is detected within the preset time period, and the state of the listening variable is the listening start variable, then the update flag is determined to meet the preset update conditions. The map loading method provided by this application embodiment can avoid map loading for each operation on the map display area after an operation on the map display area has ended, reducing the number of requests to the server and thus effectively reducing the number of invalid map loads.

[0057] Please refer to Figure 3 , Figure 3 The first flowchart for generating the target map provided in this application embodiment; as described above, each operation on the map display area corresponds to specific query data, and the target query data is the query data corresponding to the most recent operation on the map display area.

[0058] The method includes:

[0059] Step S300: Trigger query start variable by listening to start variable.

[0060] In step S300 above, if the end of the listening is not detected within a preset time, the start of the listening is triggered by the start of the listening variable to query the start variable.

[0061] It should be noted that the query variables in this application embodiment include query start variables and query end variables; wherein, the query start variable corresponds to the start of the query; and the query end variable corresponds to the end of the query.

[0062] Step S301: Based on the query start variable, retrieve the target query data from the query array and set the query array to a pending update state.

[0063] In step S301 above, when the query start variable is triggered, the target query data is further retrieved from the array, and the array after retrieving the target query data is set to a pending update state. That is, the last set of query data in the query array is retrieved, and the last set of query data corresponds to the user's most recent operation on the map display area, and then the query array is set to a pending update state.

[0064] Step S302: Use the target query data to query the target map based on the listener start variable to obtain the query results and trigger the query end variable.

[0065] Step S303: Render the target map based on the query end variable and the query results.

[0066] In steps S302-S303 above, while the listening variable is in the state of listening start variable, the target map is queried using the target query data. After obtaining the query result, the query end variable is triggered. Further, while the query variable is in the state of query end variable, the target map is rendered based on the query result and displayed to the user.

[0067] For example, the listening variable S1 includes a listening start variable P(S1) and a listening end variable V(S1); the query variable S2 includes a query start variable P(S2) and a query end variable V(S2). If the listening end variable V(S1) is not detected within a preset time, and the listening variable S1 is at the listening start variable P(S1), then the listening start variable P(S1) triggers the query start variable P(S2), queries the query data corresponding to the most recent operation on the map display area, obtains the query result, and triggers the query end variable V(S2); furthermore, if the query variable S2 is at the query end variable V(S2), the map is rendered based on the query result, thereby displaying the target map to the user.

[0068] pass Figure 3 As can be seen, in this embodiment, the query is performed by querying a start variable, and if no new end variable is found during the query, the query is performed based on the query data corresponding to the most recent operation on the map display area; the query result is only rendered when the end variable is detected. The map loading method provided by this embodiment can avoid further invalid rendering behavior caused by the user's operation on the map display area during the query, thereby improving the efficiency of map rendering.

[0069] Please refer to Figure 4 , Figure 4 A first flowchart for target map query provided in this application embodiment; the method includes:

[0070] In this application embodiment, the pending update state includes clearing the query array.

[0071] In one possible implementation, the pending update state can also be the state where new query data has been added. When the current query operation ends, if the user performs another operation on the map display area, the query data corresponding to that operation on the map display area will directly overwrite the original query group.

[0072] Step S400: Determine if the query array is empty.

[0073] Step S401: If the query array is not empty, discard the query result.

[0074] In steps S400-S401 above, if the query array is not empty, it indicates that the user performed a new operation on the map display area during the query period, and new query data was added to the query array. Therefore, this query should be considered invalid, and the query result should be discarded.

[0075] pass Figure 4 It can be seen that the system determines whether a new operation on the map display area exists during the query period by checking if the query array is empty. If a new operation on the map display area exists, the query is considered invalid, and the corresponding query results are discarded. Therefore, this embodiment avoids rendering the query results corresponding to the previous operation on the map display area after the user performs an operation on the map display area, thus avoiding meaningless rendering. Furthermore, using the method of clearing the query array to indicate the pending update status simplifies the operation and effectively avoids setting too many variables during the query process.

[0076] Please refer to Figure 5 , Figure 5 This application provides a second flowchart for target map querying in an embodiment; the query data includes latitude and longitude information corresponding to diagonal points on the user's visible screen; querying the target map using the target query data based on the listening start variable includes:

[0077] Step S500: Determine that the listening variable is the starting variable for listening.

[0078] In step S500 above, when querying the target map using the target query data based on the listening start variable, the state of the listening variable is first determined to be the listening start variable.

[0079] Step S501: Obtain the maximum and minimum latitude and longitude information of the diagonal points based on the latitude and longitude information of the diagonal points corresponding to the user's visual screen corresponding to the target query data.

[0080] In step S501 above, the maximum and minimum latitude and longitude information are obtained based on the latitude and longitude information corresponding to the diagonal points of the user's visible screen corresponding to the target query data. For example, the latitude and longitude information corresponding to the diagonal points (southwest corner and northeast corner) of the user's screen is obtained, and the maximum and minimum latitude and longitude are obtained based on the diagonal points.

[0081] Step S502: Query the target map based on the maximum and minimum latitude and longitude information.

[0082] pass Figure 5 As can be seen, the embodiments of this application use the latitude and longitude information corresponding to the diagonal points of the user's visible screen to obtain the maximum and minimum latitude and longitude, and then perform a query for the target map, so as to accurately query the target map that the user wants to query.

[0083] Please refer to Figure 6 , Figure 6 The second flowchart for generating the target map provided in the embodiments of this application; determining target query data based on the listening start variable, and generating the target map based on the target query data, further includes:

[0084] Step S600: Obtain the timestamp of the most recent operation on the map display area and the corresponding query data based on the listening start variable.

[0085] Step S601: Query the target map based on the timestamp of the most recent operation on the map display area and the query data corresponding to the most recent operation on the map display area.

[0086] In steps S600-S601 above, the timestamp of the most recent operation on the map display area and the query data corresponding to the most recent operation on the map display area are obtained according to the listening start variable; the target map is queried according to the timestamp of the most recent operation on the map display area and the query data corresponding to the most recent operation on the map display area.

[0087] pass Figure 6 As can be seen, the embodiments of this application provide a second method for generating a target map based on target query data. By using timestamps to limit the query behavior to the query operation caused by the most recent operation on the map display area, it is possible to avoid performing a query operation every time the map display area is accessed, thus saving a lot of system resources.

[0088] Please refer to Figure 7 , Figure 7 This application provides a flowchart for querying a map based on a timestamp; querying the target map based on the timestamp of the most recent operation on the map display area and the query data corresponding to the most recent operation on the map display area includes:

[0089] Step S700: Obtain the current timestamp returned by the queried party;

[0090] Step S701: Determine whether the current timestamp returned by the queried party is consistent with the timestamp of the most recent operation on the map display area.

[0091] In the above steps S700-S701, the current timestamp returned by the queried party is first obtained, and the obtained timestamp is compared with the timestamp corresponding to the most recent operation on the map display area to determine whether the timestamp of the queried party is consistent with the timestamp of the most recent operation on the map display area.

[0092] Step S702: If the current timestamp returned by the queried party is consistent with the timestamp of the most recent operation on the map display area, then query the target map based on the query data corresponding to the most recent operation on the map display area.

[0093] In step S702 above, the timestamp of the queried party is consistent with the timestamp of the most recent operation on the map display area; then the target map is queried based on the query data corresponding to the most recent operation on the map display area.

[0094] pass Figure 7 As can be seen, this application also provides a method and a solution for querying target maps. During the query, the query conditions are not placed in an array, and no query variables are set. Instead, the current timestamp is added to the query conditions, and the current query timestamp is recorded. The server response data includes the timestamp uploaded during the query. The timestamp is used to determine whether the current data is the latest data. If the two match, the map data is rendered; otherwise, it is not rendered. This effectively reduces unnecessary map rendering and saves system resources. Using a timestamp comparison method to indicate the update status is simple to operate (only a simple comparison is needed to form a judgment) and effectively avoids setting too many variables during the query process.

[0095] Please refer to Figure 8 , Figure 8 The flowchart for storing query data into a query array in this embodiment; before determining whether the user has stopped operating on the map display area based on the listening start variable, the method further includes:

[0096] Step S800: Based on the repeated determination of the listening start variable, determine whether the user has issued an operation behavior on the map display area.

[0097] In step S800 above, the listener variable is set to the "listening start variable" at the beginning of the method. This "listening start variable" determines whether the user has initiated an operation on the map display area. If the user has performed an operation, specifically, the listener variable changes from the "listening start variable" to the "listening end variable" when the operation begins. A change in the "listening start variable" indicates that an operation on the map display area has occurred.

[0098] Step S808: If it is determined that the user has performed an operation on the map display area, then generate corresponding query data based on the operation on the map display area.

[0099] Step S802: Store the query data into the query array.

[0100] In steps S801-S802 above, if it is determined that the user has performed an operation on the map display area, that is, the listening start variable becomes the listening end variable, then the corresponding query data will be generated based on the operation on the map display area, and the corresponding query data will be put into the query array.

[0101] pass Figure 8 As can be seen, in this embodiment of the application, each user's operation on the map display area corresponds to a set of query arrays, and the corresponding query data is stored in the query arrays. By combining the preset time with the arrays, it is possible to accurately determine whether the user has stopped operating on the map display area, and whether there has been any operation on the map display area during the query period; thereby effectively reducing invalid queries and invalid rendering.

[0102] Please refer to Figure 9 , Figure 9 This is a schematic diagram of the modules of the map loading system provided in the embodiments of this application; the map loading system 100 includes: an operation behavior judgment module 110 for the map display area, an update judgment module 120, and a target map generation module 130.

[0103] The operation behavior judgment module 110 for the map display area is used to determine whether the user has stopped operating on the map display area based on the listening end start variable in the listening variables.

[0104] The update judgment module 120 is used to determine whether the preset update conditions are met after a preset time based on the update identifier when it is determined that the user has stopped operating on the map display area.

[0105] The target map generation module 130 is used to determine the target query data based on the listening start variable when the preset update conditions are met, and to generate the target map based on the target query data; wherein, the target query data is taken from the query array; the query array is configured to store several query data.

[0106] In an optional embodiment, the monitoring variable further includes a monitoring end variable; the update identifier includes the absence of a monitoring end variable detected within a preset time; the monitoring end variable represents the start of a user's operation on the map display area, and the monitoring start variable represents the cessation of the user's operation on the map display area. The update judgment module 120 determines whether the preset update conditions are met based on the update identifier by: determining whether a monitoring end variable is detected within the preset time, and whether the monitoring variable is at the monitoring start variable after the preset time. If the update judgment module 120 determines that no monitoring end variable is detected within the preset time, and that the monitoring variable is at the monitoring start variable after the preset time, then the update judgment module 120 determines that the update identifier meets the preset update conditions.

[0107] In an optional embodiment, the target query data includes query data corresponding to the most recent operation on the map display area; the target map generation module 130 determines the target query data based on the listening start variable, and generates a target map based on the target query data, including: the target map generation module 130 triggers a query start variable based on the listening start variable; the target map generation module 130 retrieves the target query data from the query array based on the query start variable, and sets the query array to a pending update state; the target map generation module 130 uses the target query data to query the target map based on the listening start variable to obtain query results, and triggers a query end variable; the target map generation module 130 renders the target map based on the query results according to the query end variable.

[0108] In an optional embodiment, the state to be updated includes clearing the query array; after the target map generation module 130 queries the target map using the target query data based on the listening start variable, the method further includes: the update judgment module 120 judging whether the query array is empty; if the query array is not empty, the target map generation module 130 discards the query result.

[0109] In an optional embodiment, the query data includes the latitude and longitude information corresponding to the diagonal points of the user's visible screen; the target map generation module 130 queries the target map using the target query data based on the listening start variable, including: the target map generation module 130 determines that the listening variable is at the listening start variable; the target map generation module 130 obtains the maximum and minimum latitude and longitude information of the diagonal points based on the latitude and longitude information corresponding to the diagonal points of the user's visible screen corresponding to the target query data; the target map generation module 130 queries the target map based on the maximum and minimum latitude and longitude information.

[0110] In an optional embodiment, the target map generation module 130 determines the target query data based on the listening start variable and generates the target map based on the target query data, which further includes: the target map generation module 130 obtaining the timestamp of the most recent operation on the map display area and the query data corresponding to the most recent operation on the map display area based on the listening start variable; the target map generation module 130 queries the target map based on the timestamp of the most recent operation on the map display area and the query data corresponding to the most recent operation on the map display area.

[0111] In an optional embodiment, the target map generation module 130 queries the target map based on the timestamp of the most recent operation on the map display area and the query data corresponding to the most recent operation on the map display area, including: obtaining the current timestamp returned by the queried party; determining whether the current timestamp returned by the queried party is consistent with the timestamp of the most recent operation on the map display area; if the current timestamp returned by the queried party is consistent with the timestamp of the most recent operation on the map display area, the target map generation module 130 queries the target map based on the query data corresponding to the most recent operation on the map display area.

[0112] In an optional embodiment, before determining whether the user has stopped operating on the map display area based on the listening start variable, the method further includes: the map display area operation behavior determination module 110 repeatedly determining whether the user has issued an operation behavior on the map display area based on the listening start variable; if it is determined that the user has issued an operation behavior on the map display area, the map display area operation behavior determination module 110 generates corresponding query data based on the operation behavior on the map display area; and stores the query data in a query array.

[0113] Please see Figure 10 , Figure 10This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. An electronic device 300 provided in this application includes: a processor 301 and a memory 302. The memory 302 stores machine-readable instructions executable by the processor 301. When the machine-readable instructions are executed by the processor 301, the method described above is performed.

[0114] Based on the same inventive concept, embodiments of this application also provide a computer-readable storage medium storing computer program instructions, which, when read and executed by a processor, perform the steps in any of the above implementations.

[0115] The computer-readable storage medium can be any medium capable of storing program code, such as Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM). The storage medium stores the program, and the processor executes the program after receiving an execution instruction. The method executed by the electronic terminal as defined in any embodiment of this invention can be applied to the processor or implemented by the processor.

[0116] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0117] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0118] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0119] It can be replaced and can be implemented, wholly or partially, through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented, wholly or partially, in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated.

[0120] The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0121] In this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0122] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A map loading method, characterized in that, The method includes: Determine whether the user has stopped interacting with the map display area based on the listener start variable in the listener variables; If it is determined that the user has stopped operating on the map display area, then after a preset time, it is determined whether the preset update conditions are met based on the update identifier. If the preset update conditions are met, the target query data is determined based on the monitoring start variable, and a target map is generated based on the target query data; wherein, the target query data is taken from a query array; the query array is configured to store several query data. The monitoring variables include monitoring end variables; the update identifier includes the absence of monitoring end variables within the preset time period; the monitoring end variable represents the start of the user's operation on the map display area, and the monitoring start variable represents the cessation of the user's operation on the map display area. The step of determining whether the preset update conditions are met based on the update identifier includes: Determine whether the listening end variable is detected within the preset time period, and whether the listening variable is at the listening start variable after the preset time period; If it is determined that the listening end variable is not detected within the preset time, and the listening variable is at the listening start variable after the preset time, then it is determined that the update flag meets the preset update conditions; The target query data includes query data corresponding to the most recent operation on the map display area; the step of determining the target query data based on the monitoring start variable and generating the target map based on the target query data includes: The query start variable is triggered by the monitored start variable; Based on the query start variable, the target query data is retrieved from the query array, and the query array is set to a pending update state; Based on the listening start variable, the target query data is used to query the target map to obtain query results, and the query end variable is triggered; Based on the query termination variable, render the target map according to the query results; The query data includes latitude and longitude information corresponding to diagonal points in the user's view; the step of querying the target map using the target query data based on the monitoring start variable includes: Determine that the monitored variable is located in the monitored start variable; Based on the latitude and longitude information corresponding to the diagonal points in the user's visible screen corresponding to the target query data, obtain the maximum and minimum latitude and longitude information of the diagonal points; The target map is queried based on the maximum and minimum latitude and longitude information.

2. The method according to claim 1, characterized in that, in, The pending update status includes clearing the query array; After querying the target map using the target query data based on the listening start variable, the method further includes: Determine whether the query array is empty; If the query array is not empty, then the query result is discarded.

3. The method according to claim 1, characterized in that, in, The step of determining the target query data based on the listening start variable and generating the target map based on the target query data further includes: Based on the monitoring start variable, obtain the timestamp of the most recent operation on the map display area and the query data corresponding to the most recent operation on the map display area; The target map is queried based on the timestamp of the most recent operation on the map display area and the query data corresponding to the most recent operation on the map display area.

4. The method according to claim 3, characterized in that, The step of querying the target map based on the timestamp of the most recent operation on the map display area and the query data corresponding to the most recent operation on the map display area includes: Get the current timestamp returned by the queried party; Determine whether the current timestamp returned by the queried party is consistent with the timestamp of the most recent operation on the map display area; If the current timestamp returned by the queried party is consistent with the timestamp of the most recent operation on the map display area, then the target map is queried based on the query data corresponding to the most recent operation on the map display area.

5. The method according to claim 1, characterized in that, Before determining whether the user has stopped interacting with the map display area based on the listening start variable, the method further includes: Based on the listening start variable, it is repeatedly determined whether the user has issued the operation behavior on the map display area; If it is determined that the user has performed the operation on the map display area, then corresponding query data is generated based on the operation on the map display area. The query data is stored in the query array.

6. A map loading system, characterized in that, The system includes: a module for judging operational behavior in the map display area, a module for judging updates, and a module for generating target maps; The module for judging the operation behavior of the map display area is used to determine whether the user stops the operation behavior of the map display area based on the listening start variable in the listening variables. The update judgment module is used to determine whether the preset update conditions are met based on the update identifier after a preset time when it is determined that the user has stopped operating on the map display area. The target map generation module is used to determine target query data based on the listening start variable when it is determined that the preset update conditions are met, and to generate a target map based on the target query data; wherein, the target query data is taken from a query array; the query array is configured to store several query data; The monitoring variables include monitoring end variables; the update identifier includes the absence of monitoring end variables within the preset time period; the monitoring end variable represents the start of the user's operation on the map display area, and the monitoring start variable represents the cessation of the user's operation on the map display area. The update judgment module is specifically used for: Determine whether the listening end variable is detected within the preset time period, and whether the listening variable is at the listening start variable after the preset time period; If it is determined that the listening end variable is not detected within the preset time, and the listening variable is at the listening start variable after the preset time, then it is determined that the update flag meets the preset update conditions; The target query data includes query data corresponding to the most recent operation on the map display area; the target map generation module is specifically used for: The query start variable is triggered by the monitored start variable; Based on the query start variable, the target query data is retrieved from the query array, and the query array is set to a pending update state; Based on the listening start variable, the target query data is used to query the target map to obtain query results, and the query end variable is triggered; Based on the query termination variable, render the target map according to the query results; The query data includes the latitude and longitude information corresponding to the diagonal points on the user's visible screen; the target map generation module is specifically used for: Determine that the monitored variable is located in the monitored start variable; Based on the latitude and longitude information corresponding to the diagonal points in the user's visible screen corresponding to the target query data, obtain the maximum and minimum latitude and longitude information of the diagonal points; The target map is queried based on the maximum and minimum latitude and longitude information.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, perform the steps of the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Map resource loading system and method

    CN110134748A