CN118349750A - Method and device for acquiring regional data, storage medium and electronic equipment - Google Patents

Method and device for acquiring regional data, storage medium and electronic equipment Download PDF

Info

Publication number
CN118349750A
CN118349750A CN202310084436.2A CN202310084436A CN118349750A CN 118349750 A CN118349750 A CN 118349750A CN 202310084436 A CN202310084436 A CN 202310084436A CN 118349750 A CN118349750 A CN 118349750A
Authority
CN
China
Prior art keywords
tile
target
area information
downstream service
tiles
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310084436.2A
Other languages
Chinese (zh)
Inventor
胡宇
王磊
张玉杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202310084436.2A priority Critical patent/CN118349750A/en
Publication of CN118349750A publication Critical patent/CN118349750A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a method and a device for acquiring regional data, a storage medium and electronic equipment. Wherein the method comprises the following steps: acquiring an area data request, wherein the area data request is used for requesting to acquire area information associated with a target geographic position; responding to the regional data request, and determining target tiles with matched target geographic positions from a tile cache list, wherein the tile cache list comprises a plurality of tiles, each tile in the plurality of tiles is used for caching regional information associated with each geographic position in a target geographic region, the plurality of tiles comprise target tiles, and the target geographic region comprises the target geographic position; acquiring target area information of target tile cache, and determining the target area information as area information associated with a target geographic position; the method can be applied to the fields of maps, traffic and the like, and can relate to the technologies of intelligent traffic, image processing and the like. The application solves the technical problem of lower acquisition efficiency of regional data in the related technology.

Description

Method and device for acquiring regional data, storage medium and electronic equipment
Technical Field
The present application relates to the field of computers, and in particular, to a method and apparatus for acquiring area data, a storage medium, and an electronic device.
Background
For obtaining the area information, a request for obtaining the area information is generally directly sent to a downstream service interface in the related art, and the downstream service interface responds and returns the corresponding area information.
However, the number of the requests for the user access is limited in this way, for example, when a large number of users initiate requests for acquiring the area information to access the service and the bearing capacity of the downstream server is insufficient, the downstream server cannot normally return the corresponding area information, and long waiting time is required until the downstream service interface is recovered to be normal, so that the area information returned by the downstream service interface can be successfully acquired, and further, the problem of low acquisition efficiency of the area data occurs. That is, the related art has a technical problem that the acquisition efficiency of area data is low.
In view of the above problems, no effective solution has been proposed at present.
Disclosure of Invention
The embodiment of the application provides a method and a device for acquiring regional data, a storage medium and electronic equipment, and aims to solve the technical problem that the acquiring efficiency of the regional data is low in at least related technology.
According to an aspect of an embodiment of the present application, there is provided a method for acquiring area data, including: acquiring an area data request, wherein the area data request is used for requesting to acquire area information associated with a target geographic position; determining target tiles with the matched target geographic positions from a tile cache list in response to the regional data request, wherein the tile cache list comprises a plurality of tiles, each tile in the plurality of tiles is used for caching regional information associated with each geographic position in a target geographic region, the plurality of tiles comprise the target tiles, and the target geographic region comprises the target geographic positions; and acquiring target area information of the target tile cache, and determining the target area information as area information associated with the target geographic position.
According to another aspect of the embodiment of the present application, there is also provided an apparatus for acquiring area data, including: a first obtaining unit, configured to obtain an area data request, where the area data request is used to request to obtain area information associated with a target geographic location; a determining unit, configured to determine, in response to the area data request, a target tile with a matching target geographic location from a tile cache list, where the tile cache list includes a plurality of tiles, each tile in the plurality of tiles is used to cache area information associated with each geographic location in a target geographic area, the plurality of tiles includes the target tile, and the target geographic area includes the target geographic location; and the second acquisition unit is used for acquiring the target area information of the target tile cache and determining the target area information as the area information related to the target geographic position.
As an alternative, the apparatus further includes: the first sending module is used for sending the regional data request to a downstream service interface after the regional data request is acquired, wherein the downstream service interface is used for calling regional information associated with each geographic position in the target geographic region; and the first receiving module is used for receiving the downstream service area information which is returned by the downstream service interface and is associated with the target geographic position after the request for acquiring the area data, and determining the downstream service area information as the area information which is associated with the target geographic position.
As an alternative, the first sending module includes: a first sending submodule, configured to send the area data request to the downstream service interface when the tile matching the target geographic location is not determined in the tile cache list; the device further comprises: and the first creation module is used for creating a new tile matched with the target geographic position in the tile cache list after receiving the downstream service area information which is returned by the downstream service interface and is associated with the target geographic position, and caching the downstream service area information to the new tile.
As an alternative, the first sending module includes: a second sending submodule, configured to send the area data request to the downstream service interface when it is determined in the tile cache list that the tile with the target geographic location matches, but the area information of the tile cache with the target geographic location matches does not meet the target condition, where the target area information meets the target condition; the device further comprises: and the first updating module is used for updating the area information of the tile cache matched with the target geographic position by using the downstream service area information after receiving the downstream service area information which is returned by the downstream service interface and is associated with the target geographic position.
As an alternative, the first sending module includes: a third sending sub-module, configured to send the area data request to the downstream service interface when the current bearer state of the downstream service interface belongs to a normal state; the above-mentioned determination unit includes: and the first determining module is used for responding to the regional data request under the condition that the current bearing state belongs to an overload state, and determining the target tile from a tile cache list through the target geographic position.
As an alternative, the determining unit includes: the first searching module is used for searching a first tile matched with the target geographic position from the tile cache list, wherein the first tile is used for caching first area information associated with the target geographic position; a second searching module, configured to search, when the first tile does not meet an area output condition, for a second tile that matches the target geographic location from the tile cache list, where the second tile is used to cache second area information associated with at least two geographic locations, and the at least two geographic locations include the target geographic location; and a second determining module, configured to determine the second tile as the target tile when the second tile meets the region output condition, where the target region information includes the second region information.
As an alternative, the apparatus further includes: the second sending module is configured to send the area data request to the downstream service interface after the first tile that matches the target geographic location is searched for from the tile cache list, where the first tile does not meet the area output condition; a second updating module, configured to update, after the first tile matching the target geographic location is searched for from the tile cache list, a cache of the target geographic location by the tile cache list using the downstream service area information when the downstream service area information is received; a third determining module, configured to, after searching the first tile matching the target geographic location from the tile cache list, search the second tile from the tile cache list if failure information returned by the downstream service interface is received; and determining the second tile as the target tile when the first tile satisfies the region output condition.
As an alternative, the apparatus further includes: a third sending module, configured to send, in the case that the area data request meets a random update condition, the area data request to the downstream service interface during or after the process of determining, from a tile cache list, that the target geographic location matches the target tile in response to the area data request; the second receiving module is used for receiving the downstream service area information in the process of or after the target tiles with the matched target geographic positions are determined from the tile cache list in response to the area data request; the device further comprises: and a third updating module, configured to update the target area information with the downstream service area information after acquiring the target area information of the target tile cache and determining the target area information as the area information associated with the target geographic location.
As an alternative, the apparatus further includes: the second creation module is used for creating a third tile and caching the third tile into the tile cache list; the device further comprises: the setting module is configured to set a third tile to be in an invalid state when a current time reaches a preset expiration time of the third tile after the third tile is created and cached in the tile cache list; a fourth sending module, configured to, after the creating a third tile and caching the third tile in the tile cache list, send, when a data request associated with a geographic location for requesting to obtain the third tile match is obtained, the data request associated with the geographic location for obtaining the third tile match to the downstream service interface; and the third receiving module is used for receiving the target downstream service area information which is returned by the downstream service interface and is associated with the target geographic position after the third tile is created and cached in the tile cache list, and determining the target downstream service area information as the area information which is associated with the geographic position and is matched with the third tile.
As an alternative, the apparatus further includes: a fourth determining module, configured to determine, based on each geographic location in the target geographic area, a character string number corresponding to each of the plurality of tiles before determining, from the tile cache list, a target tile with the target geographic location matching, where the character string number is used to record an arrangement location of each of the plurality of tiles in the tile cache list; the above-mentioned determination unit includes: a fifth determining module, configured to determine a target string number corresponding to the target geographic location; the acquisition module is used for acquiring the target arrangement position corresponding to the target character string number; and a sixth determining module, configured to determine, as the target tile, a tile in the tile cache list at the target arrangement location.
According to yet another aspect of embodiments of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device performs the acquisition method of the area data as above.
According to still another aspect of the embodiment of the present application, there is further provided an electronic device including a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the above-mentioned method for acquiring area data by using the computer program.
In the embodiment of the application, a regional data request is acquired, wherein the regional data request is used for requesting to acquire regional information associated with a target geographic position; determining target tiles with the matched target geographic positions from a tile cache list in response to the regional data request, wherein the tile cache list comprises a plurality of tiles, each tile in the plurality of tiles is used for caching regional information associated with each geographic position in a target geographic region, the plurality of tiles comprise the target tiles, and the target geographic region comprises the target geographic positions; acquiring target area information of the target tile cache, and determining the target area information as area information associated with the target geographic position;
The method has the advantages that the regional information is decoupled from the downstream service interface, different tile caches are utilized to cache different regional information, accurate regional information is provided for users, so that whether the regional information is obtained and the downstream service interface is normal or not has small relevance, even if a large number of users initiate requests for obtaining the regional information to access services and the downstream service bearing capacity is insufficient, the corresponding regional information can be normally returned by utilizing the tile cache regional data, the purpose of overcoming the limitation on the number of requests for user access in the regional information obtaining process is achieved, the technical effect of improving the regional data obtaining efficiency is achieved, and the technical problem that the regional data obtaining efficiency is low in the related technology is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a schematic illustration of an application environment of an alternative method for acquiring region data according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a flow of an alternative method for acquiring region data according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an alternative method of acquiring region data according to an embodiment of the present application;
FIG. 4 is a schematic diagram of another alternative method of acquiring region data according to an embodiment of the present application;
FIG. 5 is a schematic diagram of another alternative method of acquiring region data according to an embodiment of the present application;
FIG. 6 is a schematic diagram of another alternative method of acquiring region data according to an embodiment of the present application;
FIG. 7 is a schematic diagram of another alternative method of acquiring region data according to an embodiment of the present application;
FIG. 8 is a schematic diagram of another alternative method of acquiring region data according to an embodiment of the present application;
FIG. 9 is a schematic diagram of another alternative method of acquiring region data according to an embodiment of the present application;
FIG. 10 is a schematic diagram of another alternative method of acquiring region data according to an embodiment of the present application;
FIG. 11 is a schematic diagram of another alternative method of acquiring region data according to an embodiment of the present application;
FIG. 12 is a schematic diagram of another alternative method of acquiring region data according to an embodiment of the present application;
FIG. 13 is a schematic diagram of another alternative method of acquiring region data according to an embodiment of the present application;
FIG. 14 is a schematic diagram of another alternative method of acquiring region data according to an embodiment of the application;
FIG. 15 is a schematic diagram of another alternative method of acquiring region data according to an embodiment of the present application;
FIG. 16 is a schematic diagram of an alternative region data acquisition device according to an embodiment of the present application;
Fig. 17 is a schematic structural view of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order that those skilled in the art will better understand the present application, a technical solution in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The intelligent transportation system (INTELLIGENT TRAFFIC SYSTEM, ITS) is also called an intelligent transportation system (INTELLIGENT TRANSPORTATION SYSTEM), which is a comprehensive transportation system for effectively and comprehensively applying advanced scientific technologies (information technology, computer technology, data communication technology, sensor technology, electronic control technology, automatic control theory, operation research, artificial intelligence and the like) to transportation, service control and vehicle manufacturing, and enhancing the connection among vehicles, roads and users, thereby forming a comprehensive transportation system for guaranteeing safety, improving efficiency, improving environment and saving energy. Or alternatively;
The intelligent vehicle-road cooperative system (INTELLIGENT VEHICLE Infrastructure Cooperative Systems, IVICS), which is called vehicle-road cooperative system for short, is one development direction of Intelligent Transportation Systems (ITS). The vehicle-road cooperative system adopts advanced wireless communication, new generation internet and other technologies, carries out vehicle-vehicle and vehicle-road dynamic real-time information interaction in all directions, develops vehicle active safety control and road cooperative management on the basis of full-time idle dynamic traffic information acquisition and fusion, fully realizes effective cooperation of people and vehicles and roads, ensures traffic safety, improves traffic efficiency, and forms a safe, efficient and environment-friendly road traffic system.
According to an aspect of the embodiment of the present application, there is provided a method for acquiring area data, optionally, as an optional implementation manner, the method for acquiring area data may be applied, but is not limited to, in an environment as shown in fig. 1. Which may include, but is not limited to, a user device 102 and a server 112, which may include, but is not limited to, a display 104, a processor 106, and a memory 108, the server 112 including a database 114 and a processing engine 116.
The specific process comprises the following steps:
step S102, the user equipment 102 obtains a trigger instruction for sending an area data request;
step S104-S106, the regional data request is sent to the server 112 through the network 110;
Step S108, the server 112 responds to the area data request and determines target tiles with matched target geographic positions from a tile cache list through a processing engine, wherein the tile cache list comprises a plurality of tiles, each tile in the plurality of tiles is used for caching area information associated with each geographic position in a target geographic area, the plurality of tiles comprise target tiles, and the target geographic area comprises target geographic positions;
step S110, the server 112 obtains target area information of the target tile cache through the processing engine, and determines the target area information as area information associated with the target geographic position;
Steps S112-S114, the area information associated with the target geographic location is sent to the user equipment 102 through the network 110, the user equipment 102 uses the area information to perform the acquisition of the area data through the processor 106, and the acquired area data is displayed on the display 108, and the acquired area data is stored in the memory 104.
In addition to the example shown in fig. 1, the above steps may be performed by the client or the server separately, or by a combination of the client and the server, such as by the user device 102 performing the above steps of determining a target tile from a tile cache list that matches a target geographic location, thereby relieving the processing pressure of the server 112. The user device 102 includes, but is not limited to, a handheld device (e.g., a mobile phone), a notebook computer, a desktop computer, a vehicle-mounted device, etc., and the application is not limited to a particular implementation of the user device 102.
Optionally, as an optional implementation manner, as shown in fig. 2, the method for acquiring the area data includes:
S202, acquiring an area data request, wherein the area data request is used for requesting to acquire area information associated with a target geographic position;
S204, responding to the area data request, and determining target tiles with matched target geographic positions from a tile cache list, wherein the tile cache list comprises a plurality of tiles, each tile in the plurality of tiles is used for caching area information associated with each geographic position in a target geographic area, the plurality of tiles comprise target tiles, and the target geographic area comprises target geographic positions;
s206, acquiring target area information of the target tile cache, and determining the target area information as area information associated with the target geographic position.
Alternatively, in this embodiment, the above-mentioned method for acquiring regional data may be applied, but not limited to, in a context of caching recommended content, where the recommended content may include, but is not limited to, data content for recommending services to a user, for example, recommending restaurant services in a certain range to an automobile user, recommending medical services in a certain range to a resident user, recommending a movie and television play in a current time slot to a chasing user, and so on.
Optionally, when the user initiates the request for acquiring the recommended content, in order to improve the timeliness of the feedback of the recommended content, a caching technical scheme of the recommended content may be adopted, but is not limited to the method. And receiving a request for acquiring the recommended content by using a downstream service interface based on the position parameter, responding, determining the recommended content corresponding to the request from the cache of the recommended content, and returning.
Optionally, the caching of the recommended content is implemented using a downstream service interface based on the location parameters, including: a caching mode based on a fixed preset value and a caching mode based on a user identifier.
It should be noted that, based on the caching manner of the fixed preset value, when the downstream service interface is not available, there is a defect that the returned recommended content is inconsistent with the recommended content acquisition request initiated by the user. For example, when a user initiates a request for recommending restaurants to the whole country, the downstream service interface cannot normally return a list of restaurant recommendation to the whole country, but can return a list of restaurant recommendation to Beijing, which is already preset, if the downstream service interface is not available.
It should be noted that, based on the caching manner of the user identifier, the effect of returning the corresponding recommended content can be achieved for the recommended content acquisition request sent by the existing online user when the downstream service interface is unavailable. But in case the downstream service interface is not available, it is still unusable for the newly accessed user. And, based on the caching mode of the user identifier, a larger caching space is needed, and the load pressure on the whole service is larger. And, in the case where the downstream service interface is available but the request traffic that the downstream service interface can carry is small, the improvement of the quality of service of the recommended content by the caching of the recommended content is not obvious, and the adjustability of the request traffic to the downstream service interface is poor.
It can be understood that, for acquiring the recommended content, the acquiring request of the recommended content is directly sent to the downstream service interface based on the position parameter, then the downstream service interface responds, and returns the corresponding recommended content, so that the corresponding recommended content cannot be normally returned when a large number of users access the service and the downstream service has insufficient bearing capacity, and a long time is required to wait until the downstream service interface returns to be normal, and then the recommended content returned by the downstream service interface can be successfully acquired, thereby causing the problem that the acquiring efficiency of the recommended content is lower to occur.
Optionally, the method for acquiring the area data includes: acquiring a recommended content request, responding to the recommended content request, determining a matched target tile from a tile cache list, acquiring and determining target recommended content information cached by the target tile as recommended content information corresponding to the recommended content request.
It should be noted that, the above method for acquiring the region data may be, but not limited to, a tile-based cache technical scheme.
Optionally, the first geographical location area is divided into a plurality of tiles with the same length and width in advance, and coordinates of the respective tiles are specified. Each tile corresponds to one or more caches that are associated with geographic location content within the range. When a large number of users access the service and the downstream service has insufficient bearing capacity, corresponding tiles are calculated through the geographic positions of the users. And randomly selecting a certain cache corresponding to the tile. The tiles can be divided into multiple stages, and the length and width of each stage are different, so the coverage is different. The higher the tile level, the wider the coverage, and the highest level may cover the largest range of geographic location areas. So if when a tile does not find a cache, it can be searched in the previous level until a suitable cache is found. And finally, returning the cache to the user.
By using the method for acquiring the regional data, a plurality of users related to the positions can share the same cache, and the method is equivalent to the existing online users and newly accessed users. This enables the pressure on downstream services to be quickly reduced in a short time after the buffering of a plurality of user-dense areas is set by automatic updating. The applicable area of the cache is increased, and the required cache space can be reduced. Because the recommended data taken by the user has a strong correlation with the user's current location, there is little perception by the user in the event of such service degradation. In addition, by setting the number of levels of tiles, the flow rate to downstream services can be adjusted. The more the number of levels of the tile layer, the greater the tile cache hit rate and the fewer the number of times that downstream services need to be accessed.
It can be understood that by using the above method for acquiring the area data, not only is the decoupling of the area information and the downstream service interface realized, but also a manner of caching different area information by using different tiles is realized, and accurate area information is provided for the user, so that whether the area information acquisition and the downstream service interface are normally associated is smaller, even if a large number of users initiate requests for acquiring the area information to access the service and the downstream service bearing capacity is insufficient, the corresponding area information can be normally returned, and further, the purpose of overcoming the limitation of the area information acquisition process on the number of requests for the user access is achieved, and the technical effect of improving the area data acquisition efficiency is realized.
The method for acquiring the regional data can be applied to the scene of acquiring the recommended content, can realize decoupling of the recommended content and a downstream service interface, and can improve the acquiring efficiency of the recommended content by caching different recommended content by using different tiles, and solves the problem of lower acquiring efficiency of the recommended content.
Optionally, in this embodiment, the area data request is used to request to obtain area information associated with a target geographic location, where the target geographic location may be, but is not limited to, a geographic location currently located by a user initiating the area data request, and may be, but is not limited to, a geographic location preset by the user initiating the area data request.
By way of further illustration, as shown in fig. 3 (a), a first button 302 is displayed in the nearby food viewing interface 3002, wherein the first button 302 is used to indicate that the user initiated a nearby food viewing request corresponding to the target location, and a second button 304 is used to indicate the target geographic location, and to indicate the current geographic location (a location) at which the user entered the nearby food viewing interface 3002.
Optionally, the target geographic location is optional, as shown in (a) in fig. 3, and is used to enter the location operation interface 3004 by clicking the second button 304, where the user may actively input geographic location information corresponding to the target location, and may also select geographic location information (such as B location, C location, D location) that is input historically or has passed over a period of time.
Alternatively, in the case where the user changes the target geographical position from the a position to the B position through the position operation interface 3004 shown in (a) in fig. 3, as shown in (B) in fig. 3, a third button 306 for instructing the user to initiate a nearby food viewing request corresponding to the target position, and a fourth button 308 for instructing the target geographical position (B position) are included in the nearby food viewing interface 3006.
Optionally, in this embodiment, the tile cache list may be used, but is not limited to, for storing a plurality of tiles, wherein each tile in the plurality of tiles may be used, but is not limited to, for caching area information associated with each geographic location within a target geographic location area, the target geographic location area including a secured geographic location.
Alternatively, in this embodiment, the tiles may be, but are not limited to, square grid pictures cut into rows and columns of a map in a scale or scale according to a certain size and format.
Alternatively, in the present embodiment, before the region data request is acquired, the target geographic location region may be divided into a plurality of tiles with the same length and width in advance, geographic location coordinates associated with each tile are specified, and the plurality of tiles are stored in the tile cache list.
Optionally, in this embodiment, after the area data request is acquired, a tile with a preset size may be generated based on, but not limited to, the geographic location information carried in the area data request, and the tile is stored in the tile cache list.
Optionally, in this embodiment, the area information associated with the geographic location stored in the tile may, but is not limited to, include a plurality of cache records, where the plurality of cache records may, but is not limited to, be stored by way of a cache record list.
Optionally, in this embodiment, after the target tile matching the target geographic location is acquired, target area information of the target tile cache is acquired, and the target area information is determined as the area information associated with the target geographic location. Wherein the target area information may be, but is not limited to, a target cache record in a cache record list in the target tile.
Optionally, in this embodiment, the target cache record may be, but is not limited to, the latest cache record in the cache record list, where the plurality of cache records in the cache record list may be, but is not limited to, ordered based on time information associated with the cache records.
Optionally, in this embodiment, the target cache record may be, but is not limited to being, the largest cache record in the cache record list, where the plurality of cache records in the cache record list may be, but is not limited to, ordered based on the content associated with the cache record.
Alternatively, in this embodiment, the target cache record may be, but is not limited to being, a random cache record in a cache record list, where a plurality of cache records in the cache record list are randomly ordered.
By way of further example, as shown in fig. 4, an alternative region data acquisition method includes:
step S402, obtaining an area data request, wherein the area data request is used for requesting to obtain area information associated with a target geographic position, such as the area information of 'looking over food near the B position' displayed by the area data request interface 402;
Step S404, in response to the area data request, determining a target tile from a tile cache list, wherein the tile cache list comprises a plurality of tiles, each tile in the plurality of tiles is used for caching area information associated with each geographic position in a target geographic area, the plurality of tiles comprises a target tile, and the target geographic position area comprises a target geographic position, such as a plurality of tiles, including a tile A, a tile B, a tile C, a tile D, and the like, displayed in the tile cache list interface 404;
Step S406, in the case of determining the target tile, obtaining target area information of the target tile cache, e.g. after determining that "tile a" is the target tile in the tile cache list interface 404, further displaying a plurality of cache records stored in "tile a" in the cache record list interface 406, including a plurality of cache records such as "cache record a", "cache record b", "cache record c", "cache record d", etc.;
in step S408, the target area information of the target tile cache is determined as the area information (the area information corresponding to the area data request) associated with the target geographic location.
It should be noted that, in this embodiment, the acquiring and responding modes of the area data request are not limited, the display modes of the interfaces are not limited, and the tile ordering mode in the tile cache list and the cache record ordering mode in the cache record list are not limited.
According to the embodiment of the application, the regional data request is used for requesting to acquire the regional information associated with the target geographic position; determining target tiles with the matched target geographic positions from a tile cache list in response to the regional data request, wherein the tile cache list comprises a plurality of tiles, each tile in the plurality of tiles is used for caching regional information associated with each geographic position in a target geographic region, the plurality of tiles comprise the target tiles, and the target geographic region comprises the target geographic positions; acquiring target area information of the target tile cache, and determining the target area information as area information associated with the target geographic position;
The method for caching the area data by using the tiles can normally return the corresponding area information, thereby achieving the purpose of overcoming the limitation on the number of requests accessed by the user in the area information acquisition process, and further achieving the technical effect of improving the area data acquisition efficiency.
As an alternative, after obtaining the area data request, the method further includes:
S1, sending a region data request to a downstream service interface, wherein the downstream service interface is used for calling region information associated with each geographic position in a target geographic region;
S2, receiving downstream service area information which is returned by the downstream service interface and is associated with the target geographic position, and determining the downstream service area information as the area information which is associated with the target geographic position.
It should be noted that, after the area data request is acquired, the target tile and the target area information of the target tile cache may be determined from the tile cache list, and the target area information of the target tile cache may be determined as the area information associated with the target geographic location requested to be acquired by the area data request, which is not limited to the area data request.
After the area data request is acquired, the area data request may be, but is not limited to, sent to a downstream service interface, and the downstream service interface may retrieve the area information associated with each geographic location in the target geographic location area, and receive and determine the downstream service area information associated with the target geographic location returned by the downstream server as the area information associated with the target geographic location requested to be acquired by the area data request.
According to the embodiment provided by the application, the regional data request is sent to a downstream service interface, wherein the downstream service interface is used for calling regional information associated with each geographic position in the target geographic region; and receiving downstream service area information which is returned by the downstream service interface and is associated with the target geographic position, and determining the downstream service area information as the area information associated with the target geographic position. After the regional data request is acquired, at least two feasible regional information acquisition modes exist, so that the problem that regional information cannot be acquired due to the fact that a certain regional information acquisition mode cannot be performed is solved, the purpose of improving the flexibility of regional information acquisition is further achieved, and the technical effect of improving the regional data acquisition efficiency overall is achieved.
As an alternative, sending the region data request to the downstream service interface includes:
S1, sending an area data request to a downstream service interface under the condition that tiles matched with a target geographic position are not determined in a tile cache list;
after receiving the downstream service area information associated with the target geographic position returned by the downstream service interface, the method further comprises:
S2, creating new tiles with matched target geographic positions in the tile cache list, and caching downstream service area information to the new tiles.
Optionally, in this embodiment, in response to the area data request, if the acquisition of the target tile result that matches the target geographic location from the tile cache list indicates failure, it is confirmed that there is no tile that matches the target geographic location in the tile cache list, and the area data request is sent to the downstream service interface.
Optionally, in the present embodiment, the downstream service interface invokes the region information associated with each geographic location within the target geographic region and returns the downstream service region information associated with the target geographic location.
Optionally, in this embodiment, after receiving the downstream service area information associated with the target geographic location returned by the downstream service interface, a new tile with the target geographic location matching is created in the tile cache list, and the downstream service area information is cached to the new tile.
When the target tile cannot be determined from the tile cache list, the region data request is forwarded to the downstream service interface, the downstream service interface obtains the corresponding region information and returns the region information, and then the region information is updated to the tile cache list.
It should be noted that, in the case where the tile cache list is set to initially divide the target geographic area and create all initial tiles corresponding to the divided area, the above area information is directly stored in the initial tiles whose target geographic positions are matched in the form of cache records.
It should be noted that, in the case that the tile cache list is not initially created with all initial tiles, after receiving the downstream service area information associated with the target geographic position returned by the downstream service interface, a new initialization tile matching the target geographic position is created in the tile cache list in real time, and the area information is stored in the initial tile in the form of cache records.
By way of further example, as shown in fig. 5, an alternative method for acquiring region data includes:
Step S502, obtaining an area data request, wherein the area data request is used for requesting to obtain area information associated with a target geographic position;
Step S504, responding to the area data request, determining target tiles with matched target geographic positions from a tile cache list, wherein the tile cache list comprises a plurality of tiles, each tile in the plurality of tiles is used for caching area information associated with each geographic position in a target geographic area, the plurality of tiles comprise target tiles, and the target geographic area comprises target geographic positions;
step S506, judging whether a target tile exists in the tile cache list;
Step S508, under the condition that the target tile exists in the tile cache list, acquiring target area information of the target tile cache, and determining the target area information as area information associated with the target geographic position;
Step S510, sending a region data request to a downstream service interface in the case that no target tile exists in the tile cache list;
step S512, receiving downstream service area information which is returned by the downstream service interface and is associated with the target geographic position, and determining the downstream service area information as area information which is associated with the target geographic position;
step S514, the downstream service area information ring is cached to the tile cache list.
By the embodiment provided by the application, the method for sending the regional data request to the downstream service interface comprises the following steps: transmitting an area data request to a downstream service interface under the condition that tiles matched with the target geographic position are not determined in the tile cache list; after receiving the downstream service area information associated with the target geographic position returned by the downstream service interface, the method further comprises: creating a new tile in the tile cache list with a target geographic location match, and caching downstream service area information to the new tile. Under the condition that the target tile cannot be determined in the tile cache list, the area data request is timely sent to the downstream service interface, the tile cache list does not need to cache all the area data in advance, the downstream service interface can also return a request result under the condition that a request corresponding to new area data appears, and the returned request result is updated to the tile cache list, so that the purposes of reducing the creation cost of the tile cache list and guaranteeing the timeliness of the acquisition of the area data are achieved, and the technical effect of improving the acquisition efficiency of the area data is achieved.
As an alternative, sending the region data request to the downstream service interface includes:
S1, under the condition that tiles with matched target geographic positions are determined in a tile cache list and area information of a tile cache with matched target geographic positions does not meet target conditions, sending an area data request to a downstream service interface, wherein the target area information meets the target conditions;
after receiving the downstream service area information associated with the target geographic position returned by the downstream service interface, the method further comprises:
And S2, updating the area information of the tile cache matched with the target geographic position by using the downstream service area information.
Optionally, in this embodiment, the area information of the tile cache does not meet the target condition, which may, but is not limited to, be used to indicate that the number of cache records stored in the tile is less than a preset number threshold; the tile cached region information satisfies a target condition, which may be, but is not limited to, a threshold value indicating that the number of cached records stored in the tile is greater than or equal to a preset number.
When it is determined that the target geographical position matched tile is in the tile cache list and the area information of the target geographical position matched tile cache meets the target condition, determining the target geographical position matched tile as the target tile and determining the area information of the target geographical position matched tile cache as the target area information, wherein the target area information meets the target condition.
Optionally, in this embodiment, when it is determined in the tile cache list that the tile with the target geographic location matches, but the area information of the tile cache with the target geographic location matches does not meet the target condition, the area data request is sent to the downstream service interface, and the downstream service area information associated with the target geographic location returned by the downstream service interface is received, and the area information of the tile cache with the target geographic location is updated by using the downstream service area information.
It should be noted that, updating the area information of the tile cache matched with the target geographic location by using the downstream service area information may include, but is not limited to: under the condition that a tile cache list is set as an initial partition target geographic area and all initial tiles corresponding to the partitioned area are created, the area information is directly stored in the initial tiles with target geographic positions matched in a cache record mode;
And if the tile cache list is not initially created with all initial tiles, after receiving the downstream service area information which is returned by the downstream service interface and is associated with the target geographic position, creating a new initialization tile which is matched with the target geographic position in the tile cache list in real time, and storing the area information in the initial tiles in the form of cache records.
It should be noted that, updating the area information of the tile cache matched with the target geographic location using the downstream service area information may be, but is not limited to, used to increase the number of cache records stored in the tile. For the tile which does not initially meet the target condition, under the condition that the cache area information is updated by using the downstream service area information for N times, the number of records stored in the tile is greater than or equal to a preset number threshold corresponding to the target condition, so that the cache area information of the tile meets the target condition, and after receiving an area data request corresponding to the geographic position of the tile, the cache record information stored in the tile can be directly used for returning the corresponding area data.
By way of further example, as shown in fig. 6, an alternative method for obtaining regional data specifically includes the following steps:
step S602, acquiring an area data request, wherein the area data request is used for requesting to acquire area information associated with a target geographic position;
Step S604, in response to the area data request, searching a target tile with a matched target geographic position from the tile cache list;
Step S606, judging whether a target tile exists in the tile cache list;
Step S608, when there is no target tile in the tile cache list or the region information does not meet the target condition, transmitting the region data request to the downstream service interface, determining the region information corresponding to the region data by the downstream service interface, and caching (updating) to the tile cache list;
Step S610, when a target tile exists in the tile cache list, obtaining the area information of the target tile cache;
step S612, judging whether the area information meets the target condition;
s614, when the area information meets the target condition, the target area information of the target tile cache is acquired, and the area information corresponding to the area data request is determined.
According to the embodiment provided by the application, when the tile with the matched target geographic position is determined in the tile cache list and the area information of the tile cache with the matched target geographic position does not meet the target condition, the area data request is sent to the downstream service interface, wherein the target area information meets the target condition; and updating the area information of the tile cache matched with the target geographic position by using the downstream service area information. After determining the target tile in the tile cache list, further judging whether the area information of the target tile cache meets the target condition, wherein the corresponding area information is returned by using a tile cache mode under the condition that the target condition is met, so that the purpose of considering the efficiency and the accuracy of area data acquisition is achieved; under the condition that the target condition is not met, the corresponding area information is returned by using a downstream service interface mode, and the area information of the tile cache is updated, so that the area information of the tile cache is promoted to meet the target condition, the purposes of ensuring timeliness and flexibility of area data acquisition and automatically updating the area information of the tile cache to reduce labor cost are achieved, and the technical effect of improving the acquisition efficiency of the area data is achieved.
As an alternative, sending the region data request to the downstream service interface includes:
S1, sending an area data request to a downstream service interface under the condition that the current bearing state of the downstream service interface belongs to a normal state;
determining a target tile with a matched target geographic position from a tile cache list, wherein the target tile comprises:
s2, under the condition that the current bearing state belongs to an overload state, responding to the regional data request, and determining a target tile from the tile cache list through the target geographic position.
Optionally, in this embodiment, the current bearer state of the downstream service interface may include, but is not limited to, a normal state, and an overload state, where the normal state may be, but is not limited to, used to indicate that the number of accesses of the area data requests corresponding to the downstream service interface in the current time period is less than or equal to the preset request number threshold, and the overload state may be, but is not limited to, used to indicate that the number of accesses of the area data requests corresponding to the downstream service interface in the current time period is greater than the preset request number threshold.
Optionally, in this embodiment, when the current bearer state of the downstream service interface belongs to the normal state, the area data request is sent to the downstream service interface, and the response to the area data request and the return of the corresponding area data are implemented by the downstream service interface.
Optionally, in this embodiment, in case that the current bearer state belongs to the overload state, the target tile is determined from the tile cache list through the target geographic location in response to the area data request, and the corresponding area data is determined based on the target area information of the target tile cache and returned.
It should be noted that, the area data stored in the downstream service interface has smaller association with time factors and higher accuracy, but has larger association with the number of requests sent by the user, and is easily affected and limited by external load pressure and self-bearing capacity.
It should be noted that, through the overall combination of the two types of area data acquisition modes of the downstream service interface and the tile cache list, the downstream service interface returns the corresponding area data when the downstream service interface has a normal bearing state, and the tile cache list returns the corresponding area data when the downstream service interface has an abnormal bearing state. Therefore, under the condition that high load pressure does not exist in the whole service, the accuracy of regional data acquisition is guaranteed through a downstream service interface mode, and under the condition that high load pressure exists in the whole service, the efficiency of regional data acquisition is guaranteed through a tile cache list mode.
According to the embodiment provided by the application, the regional data request is sent to the downstream service interface under the condition that the current bearing state of the downstream service interface belongs to the normal state; and under the condition that the current bearing state belongs to an overload state, responding to the regional data request, and determining a target tile from the tile cache list through the target geographic position. Through the integral combination of the downstream service interface and the two region data acquisition modes of the tile cache list, the purpose of selecting the corresponding region data acquisition mode based on the service access condition is achieved, the flexibility of data acquisition is improved, the accuracy of data acquisition is guaranteed, and therefore the technical effects of considering the accuracy and the efficiency of data acquisition are achieved.
As an alternative, determining a target tile with a target geographic location match from the tile cache list includes:
S1, searching a first tile matched with a target geographic position from a tile cache list, wherein the first tile is used for caching first area information associated with the target geographic position;
S2, searching a second tile matched with the target geographic position from a tile cache list under the condition that the first tile does not meet the regional output condition, wherein the second tile is used for caching second regional information associated with at least two geographic positions, and the at least two geographic positions comprise the target geographic position;
And S3, determining the second tile as a target tile when the second tile meets the area output condition, wherein the target area information comprises second area information.
Optionally, in this embodiment, the tile cache list may include, but is not limited to, a plurality of tiles, where each tile in the plurality of tiles may include, but is not limited to, a tile level, and the tile level may include, but is not limited to, area range information indicating that the tile corresponds to. The higher the tile level, the smaller the area range to which the tile corresponds, and the fewer the number of corresponding geographic locations.
Optionally, in this embodiment, the first tile does not meet the area output condition, which may, but is not limited to, include that the area information of the first tile cache does not meet the target condition, that the time information corresponding to the area information of the first tile cache does not meet the area time condition, that the habit information corresponding to the area information of the first tile cache does not meet the user habit condition, and the like, where the area information of the first tile cache does not meet the target condition may, but is not limited to, indicate that the number of cache records stored in the first tile is less than the preset number threshold, that the time information corresponding to the area information of the first tile cache does not meet the area time condition may, but is not limited to, indicate that the time information corresponding to the cache records stored in the first tile cache does not meet the user habit condition, and that the content information corresponding to the cache records stored in the first tile cache does not meet the content information preset by the user.
It should be noted that, when the first tile does not meet the area output condition, a second tile matching the target geographic position is searched from the tile cache list, where the first tile is used to cache the first area information associated with the target geographic position, and the second tile is used to cache the second area information associated with at least two geographic positions including the target geographic position.
By way of further example, as shown in FIG. 7, a first tile 702 having a rank of 14 is determined based on the target geographic location carried in the user request, and it is determined that the first tile does not satisfy the area output condition;
Further, determining a second tile 704 with a grade of 13 based on the target geographic position carried in the user request, and confirming that the second tile does not meet the regional output condition, wherein the geographic position corresponding to the second tile 704 comprises the target geographic position;
Further, based on the target geographic location carried by the user request, determining a third tile 706 with a level of 12, confirming that the third tile meets the area output condition, and confirming that the third tile is the target tile, wherein the geographic location corresponding to the third tile 706 comprises the target geographic location.
It should be noted that, the cache records in the plurality of tiles including the first tile 702 may, but are not limited to, update the obtained new cache records to the corresponding tiles in the process of obtaining the area data by using the downstream service interface.
It should be noted that, the geographic location corresponding to the third tile 706 may be, but is not limited to, a geographic location including the second tile 704, as shown in fig. 7, and the grade value corresponding to the third tile 706 is smaller than the grade value corresponding to the second tile 704. It will be appreciated that in determining tiles that meet the area output condition, the geographic location corresponding to the next tile includes the geographic location corresponding to the previous tile, and the rank value corresponding to the next tile is less than the rank value corresponding to the previous tile.
It should be noted that, the geographic location corresponding to the third tile 706 may also include, but is not limited to, a target geographic location corresponding to the first tile 702, and a target geographic location having an intersection with the second tile 704, and the grade value corresponding to the third tile 706 is equal to the grade value corresponding to the second tile 704. It will be appreciated that in determining tiles that meet the area output condition, the geographic location corresponding to the next tile and the geographic location corresponding to the previous tile have at least an intersection portion of the target geographic location, and the rank value corresponding to the next tile is equal to the rank value corresponding to the previous tile.
It should be noted that, each tile may, but is not limited to, correspond to a tile level, and the tile level may, but is not limited to, be used to indicate the region range information corresponding to the tile. The higher the tile level, the smaller the area range to which the tile corresponds, and the fewer the number of corresponding geographic locations.
According to the embodiment provided by the application, the first tile matched with the target geographic position is searched from the tile cache list, wherein the first tile is used for caching the first area information associated with the target geographic position; searching a second tile matched with the target geographic position from a tile cache list under the condition that the first tile does not meet the regional output condition, wherein the second tile is used for caching second regional information associated with at least two geographic positions, and the at least two geographic positions comprise the target geographic position; and determining the second tile as a target tile in the case that the second tile meets the region output condition, wherein the target region information comprises second region information. By setting tiles with different area ranges and using a hierarchical progressive tile searching mode, the target tiles meeting the area output conditions are obtained, and the purpose of improving the obtaining efficiency of the target tiles is achieved, so that the technical effect of improving the obtaining efficiency of area data is achieved.
As an alternative, after searching for the first tile matching the target geographic location from the tile cache list, the method further includes:
s1, sending a region data request to a downstream service interface under the condition that a first tile does not meet a region output condition;
S2, under the condition that the downstream service area information is received, updating the cache of the tile cache list to the target geographic position by utilizing the downstream service area information;
s3, under the condition that failure information returned by the downstream service interface is received, searching a second tile from the tile cache list; in the event that the first tile satisfies the region output condition, the second tile is determined to be the target tile.
Optionally, in this embodiment, in a case where the first tile does not meet the area output condition, an attempt is made to call the downstream service interface to acquire the downstream service area information.
Optionally, in this embodiment, in the case of calling the downstream service interface and receiving the downstream service area information, area information associated with the target geographic location corresponding to the area acquisition request is determined based on the downstream service area information, and the downstream service area information is updated into the corresponding tile in the tile cache list in the form of a new cache record.
Optionally, in this embodiment, in the case of calling the downstream service interface and returning the failure information, a second tile is searched from the tile cache list, where a geographic location corresponding to the second tile includes a target geographic location corresponding to the first tile.
It should be noted that, in the case where the second tile does not meet the area output condition, the second tile may, but is not limited to, attempt to call the downstream service interface again to obtain the downstream service area information.
It should be noted that, the number of user access requests corresponding to the downstream service interface is time-efficient, and the call results corresponding to the downstream service interface are different in different time periods.
It should be noted that, in the case that the second tile does not meet the area output condition, the third tile may be searched from the tile cache list, until the target tile that meets the area output condition is searched, where the geographic location corresponding to the third tile includes the target geographic location corresponding to the first tile, and the third tile may be in an inclusion state with the second tile, or may be in an intersection state with the second tile.
By way of further example, as shown in fig. 8, an alternative method for acquiring region data includes the steps of:
Step S802, under the condition that target tiles with matched target geographic positions exist in a tile cache list, acquiring target tiles and area information of target tile caches;
Step S804, judging whether the region information meets the region output condition;
Step S806, returning the region information of the target tile when the region information meets the region output condition;
step S808, sending the area data request to a downstream service interface when the area information does not meet the area output condition;
Step S810, obtaining and judging a return result of the downstream service interface response;
Step S812, receiving downstream service area information which is returned by the downstream service interface and is associated with the target geographic position, determining the downstream service area information as the area information which is associated with the target geographic position, and updating the tile list as a return result when the return result indicates success;
Step S814, in case the returned result indicates failure, searching for a new target tile with a matched target geographic position from the tile cache list, wherein the new target tile is used for caching area information associated with at least two geographic positions including the target geographic position; returning to step S802, the above steps are repeatedly executed until the request result is returned.
According to the embodiment provided by the application, under the condition that the first tile does not meet the regional output condition, a regional data request is sent to a downstream service interface; under the condition that the downstream service area information is received, updating the cache of the tile cache list to the target geographic position by utilizing the downstream service area information; under the condition that failure information returned by a downstream service interface is received, searching a second tile from a tile cache list; in the event that the first tile satisfies the region output condition, the second tile is determined to be the target tile. Under the condition that the first tile does not meet the regional output condition, the corresponding regional information is tried to be determined based on the downstream service interface, and the defect that the target tile cannot be determined by the clock due to multiple hierarchical degradation is avoided in a downstream service auxiliary mode, so that the purpose of improving the regional information acquisition efficiency is achieved, and the technical effect of improving the regional data acquisition efficiency is achieved.
As an alternative, during or after determining, from the tile cache list, a target tile whose target geographic location matches in response to the region data request, the method further includes:
s1, sending an area data request to a downstream service interface under the condition that the area data request meets a random update condition;
s2, receiving downstream service area information;
After acquiring the target area information of the target tile cache and determining the target area information as the area information associated with the target geographic position, the method further comprises:
And S3, updating the target area information by using the downstream service area information.
Alternatively, in the present embodiment, the region data request has a probability of triggering a random update condition, the probability including a real number of 0 to 1.
Optionally, in this embodiment, in a case where the area data request does not have a corresponding target tile, the probability of acknowledging that the area data request triggers a random update condition is 0.
Optionally, in a case where the area data request satisfies that a corresponding target tile exists, and in a case where the area data request triggers a random update condition, sending the area data request to a downstream service interface, receiving downstream service area information, and after determining the target area information as area information associated with the target geographic location, updating the target area information with the downstream service area information.
It should be noted that, a random silence update mechanism is adopted, so that the cache can be refreshed relatively timely. After the user's request hits the cache, there is a probability that asynchronous refreshing of the cache is triggered. And under the asynchronous refreshing condition of triggering the cache, calling a downstream service interface based on the background silence request, and refreshing the cache record or random one cache record of the tile corresponding to the user request in the tile cache record list by using the acquired data.
According to the embodiment provided by the application, the regional data request is sent to the downstream service interface under the condition that the regional data request meets the random updating condition; receiving downstream service area information; the target area information is updated with the downstream service area information. By means of an asynchronous random silent updating mechanism, the purpose of updating the tile cache list is achieved, accuracy of obtaining the area data is improved, extra obtaining operation of the area data caused by failure of tile cache records is reduced, and therefore the technical effect of improving obtaining efficiency of the area data is achieved.
As an alternative, the method further comprises:
s1, creating a third tile, and caching the third tile into a tile cache list;
After creating the third tile and caching the third tile into the tile cache list, the method further comprises:
S2, setting the third tile to be in an invalid state under the condition that the current time reaches the preset expiration time of the third tile;
s3, under the condition that the data request associated with the geographic position matched with the third tile is acquired, the data request associated with the geographic position matched with the third tile is sent to a downstream service interface;
And S4, receiving target downstream service area information which is returned by the downstream service interface and is associated with the target geographic position, and determining the target downstream service area information as the geographic position associated area information matched with the third tile.
Alternatively, in the present embodiment, the creation of the third tile may, but is not limited to, indicate that the tile cache list is set to initially partition the target geographic area and create all initial tiles corresponding to the partitioned areas.
Optionally, in this embodiment, the creation of the third tile may also, but not limited to, indicate that, in a case where the tile cache list is not initially created with all the initial tiles, a new initialization tile matching the target geographic location is created in the tile cache list in real time, for example, after receiving the downstream service area information associated with the target geographic location returned by the downstream service interface, the third tile is created, and the area information is stored in the third tile in the form of a cache record.
Optionally, in this embodiment, each newly created tile is set to an expected expiration time, where the tile is set to be in an invalid state if the current time reaches a preset expiration time of the tile.
In addition, when a data request associated with a geographic position for requesting to acquire the third tile matching in an invalid state is acquired, the data request associated with the geographic position for acquiring the third tile matching is sent to a downstream service interface; and receiving target downstream service area information which is returned by the downstream service interface and is associated with the target geographic position, and determining the target downstream service area information as the geographic position associated area information matched with the third tile.
By the embodiment provided by the application, a third tile is created and cached in the tile cache list; setting the third tile to be in an invalid state under the condition that the current time reaches the preset expiration time of the third tile; under the condition that a data request associated with the geographic position for requesting to acquire the third tile matching is acquired, transmitting the data request associated with the geographic position for acquiring the third tile matching to a downstream service interface; and receiving target downstream service area information which is returned by the downstream service interface and is associated with the target geographic position, and determining the target downstream service area information as the geographic position associated area information matched with the third tile. On one hand, the expiration time is set for each newly-built tile, so that the aim of guaranteeing the timeliness of the area data cached in the tile is fulfilled, and the aim of improving the acquisition accuracy of the area data is fulfilled; on the other hand, for the outdated tiles, the corresponding area data is acquired through the downstream service interface, so that the flexible purpose of improving the acquisition of the area data is achieved, and the technical effect of improving the acquisition efficiency of the area data is achieved.
As an alternative, before determining the target tile with the matching target geographic location from the tile cache list, the method further includes:
S1, determining character string numbers corresponding to all tiles in a plurality of tiles based on all geographic positions in a target geographic area, wherein the character string numbers are used for recording arrangement positions of all tiles in a tile cache list;
determining a target tile with a matched target geographic position from a tile cache list, wherein the target tile comprises:
S2, determining a target character string number corresponding to the target geographic position;
S3, obtaining a target arrangement position corresponding to the target character string number;
s4, determining the tiles in the target arrangement position in the tile cache list as target tiles.
Optionally, in this embodiment, the target string number may be used, but not limited to, a tile level and a geographic location corresponding to the target tile, and may be used, but not limited to, to indicate an arrangement position of the target tile in the tile cache list.
Optionally, in this embodiment, longitude and latitude corresponding to the user position are converted into x-y integer coordinates based on Java language, so that a conversion from longitude and latitude coordinates to rectangular coordinates is established, and mapping from the user position to tile coordinates is achieved.
Optionally, in this embodiment, each tile in the tile cache list corresponds to a tile level, where the tile level may be, but is not limited to, area range information indicating that the tile corresponds to. The higher the tile level, the smaller the area range corresponding to the tile, and the smaller the corresponding area range.
Further by way of example, as shown in fig. 9, the user location 902 is used to indicate longitude and latitude coordinate information "23.45224, 119.5653" of the user, and the mapped corresponding tile coordinates 904 are used to indicate coordinate location information of the tile "(453, 124)" and corresponding area location information "(2.44 km )".
It should be noted that the location of the user is specific to which tile corresponds, and is related to both the location of the user and the rank of the tile. If an upper accuracy limit of 0.153km is specified, then the tile level may range from level 18 to level 0, with smaller numbers mapping larger latitude and longitude ranges. And, defining a level up, the tile number is reduced by 1. So that the side length of the tile is doubled for each stage upwards, and the covered area is doubled for 4 times. Wherein the class 0 tiles can cover the entire earth.
Further by way of example, as shown in FIG. 10, a first tile 1002 corresponds to a 14-level tile, corresponds to a geographic area range of 2.44km side, a second tile 1004 corresponds to a 13-level tile, corresponds to a geographic area range of 4.88km side, and a third tile 1006 corresponds to a 12-level tile, corresponds to a geographic area range of 9.76km side. Wherein the geographic area range corresponding to the third tile 1006 includes the geographic area range corresponding to the second tile 1004, and the geographic area range corresponding to the second tile 1004 includes the geographic area range corresponding to the first tile 1002.
Alternatively, in this embodiment, the string number of the tile may be, but is not limited to, determined by the latitude and longitude position of the user and the level of the tile, and the string number has uniqueness.
Optionally, in this embodiment, tile coordinate information of the tile is determined based on the input longitude and latitude information, and the character string code is obtained by conversion based on the tile coordinates and the tile level.
Further by way of example, as shown in fig. 11, based on the input latitude and longitude information, the tile coordinates corresponding to the first tile 1102 are determined to be "(1342, 4354)", the rank information "14" of the tile is appended after the coordinates are generated, the string codes "14-1342-4354" are generated, and the string codes "14-1342-4354" are buffered in the tile buffer list by means of hash arrangement.
It should be noted that, the character string coding form is convenient for reading and hash arrangement, which is beneficial to improving the speed of searching tiles and reducing the size of the space occupied by tile storage.
Based on the above arrangement, the tile number may be used as a key of redis, and the value may be a cache list, but not limited to a cache key storage scheme using redis. After the user requests, the tile numbers can be calculated by obtaining the coordinates of the user, and then the tiles are quickly positioned to the cache by using the redis by using the numbering mechanism. Wherein the search time complexity of the tile cache does not increase with an increasing number of tiles.
Optionally, when requested by the user, the location of the corresponding tile in the cache is calculated based on the user location. And if the corresponding tile exists in the cache, the content corresponding to the tile key is fetched from the cache. If there is no corresponding tile, the downstream service interface is requested, a new tile is created, and the content returned by the downstream service interface is added to the tile. Wherein each newly created tile is provided with an expiration time.
It should be noted that, for tile storage, a method of simultaneous storage and multi-level search in all levels is adopted to increase the cache hit rate. A level range may be, but is not limited to, specified prior to establishing the tile cache, such as a tile level range of 10 to 14. When the current user coordinate is used for requesting the downstream service interface and successfully returning, the returned value is used as a cache record and is simultaneously stored in a 10, 12, 13 and 14-level tile cache record list corresponding to the coordinate. At the next search by the user, if the level 14 tile search is not completed, go to the level 13 tile search until the range maximum is searched or reached. Based on the arrangement mode, multiple levels of tile caches can be stored simultaneously and mutually complemented in the same redis database instance without mutual influence. By adjusting the grade range, the hit rate can be adjusted, the flow of the downstream interface is controlled, and the pressure of the downstream interface is effectively relieved, so that the waste is avoided.
Alternatively, the content of the tile cache may take the form of a list, multiple cache records may be stored, and for a list of cache records for a tile, the number of best cache records it stores may be set, but is not limited to. As shown in fig. 12, when there are cache records in the list and the optimal number is reached, step S1212 may be performed, but not limited to, to randomly fetch a cache record, and return after some processing according to the specific service. If there are cache records, but the number of cache records is less than the optimal number requirement, step S1216 may be performed, but is not limited to, attempting to request the downstream service interface, adding the data corresponding to the request to the list of cache records if successful, and returning to the user. If the request fails, an existing cache record is selected randomly and returned. Thus, the diversity of the cache contents is guaranteed to a certain extent. If no cache record exists, step S1220 may be performed, but is not limited to, attempting to request a downstream service interface and creating a tile cache.
According to the embodiment provided by the application, the character string numbers corresponding to the tiles in the plurality of tiles are determined based on the geographic positions in the target geographic area, wherein the character string numbers are used for recording the arrangement positions of the tiles in the tile cache list; determining a target character string number corresponding to the target geographic position; acquiring a target arrangement position corresponding to a target character string number; the tile in the tile cache list at the target placement location is determined to be the target tile. Based on the establishment of the character string numbers, the reading and the Hash arrangement are convenient, the tile searching speed is improved, the space occupied by tile storage is reduced, the purposes of improving the acquisition speed of the regional data and the storage space utilization rate of the regional data are further achieved, and therefore the technical effect of improving the acquisition efficiency of the regional data is achieved.
Optionally, the above method for acquiring area data is applied to a scenario where the tile cache reduces the background server pressure, as shown in fig. 13, and specifically includes the following steps:
step S1302, obtaining an area data request, wherein the area data request is used for requesting to obtain area information associated with a target geographic position;
Step S1304, judging that the bearing state of the downstream service interface is a normal state or an overload state;
step S1306, when the bearing state of the downstream service interface is a normal state, sending a region data request to the downstream service interface;
Step S1308, when the bearing state of the downstream service interface is an overload state, sending an area data request to a tile caching module;
Step S1310, judging whether a target tile with a matched target geographic position exists in a tile cache list in a tile cache module, wherein the tile cache list comprises a plurality of tiles, each tile in the plurality of tiles is used for caching area information associated with each geographic position in a target geographic area, the plurality of tiles comprise target tiles, and the target geographic area comprises the target geographic position;
step S1312, in the case that there is no target tile whose target geographic position matches in the tile cache list, sending a region data request to the downstream service interface;
step S1314, receiving the downstream service area information which is returned by the downstream service interface and is associated with the target geographic position, determining the downstream service area information as the area information which is associated with the target geographic position, and updating the tile list as a return result;
Step S1316, obtaining the area information of the target tile cache under the condition that the target tile with the matched target geographic position exists in the tile cache list;
step S1318, judging whether the region information meets the region output condition;
step S1320, determining the region information as the region information associated with the target geographic position as a return result when the region information meets the region output condition;
step S1322, when the area information does not meet the area output condition, sending an area data request to a downstream service interface;
step S1324, obtaining and judging a return result of the downstream service interface response;
Step S1326, receiving the downstream service area information which is returned by the downstream service interface and is associated with the target geographic position, determining the downstream service area information as the area information which is associated with the target geographic position, and updating the tile list as a return result when the return result indicates success;
Step S1328, in the case that the returned result indicates failure, searching a new target tile with the matched target geographic position from the tile cache list, wherein the new target tile is used for caching the area information associated with at least two geographic positions including the target geographic position; returning to step S1316, the above steps are repeatedly performed until the request result is returned.
As an alternative scheme, the method for acquiring the regional data is applied to the scene of recommending restaurant services for automobile users, the recommended services are accessed uniformly and the user data is issued, the current flow is larger along with the service growth, but the flow which can be borne by an interface which is required to be called by the recommended services to acquire the restaurants from a third party service provider is very small. The service is not available for a period of time and it is also difficult for third party service providers to extend the interface bearer capability.
In order to solve the problems, by using the tile caching scheme and setting multi-level caching, the access flow to the downstream interface is greatly reduced (99% of the flow is reduced), and the restaurant recommendation service can finally work normally (the total hit rate of the three-level tile caching reaches 99%). Through testing and parameter verification, the cache can be refreshed in time by fully utilizing the limited bearing capacity of the downstream interface, and the restaurant (within 500-1000 meters) near the current position of the user is recommended for the user.
For example, as shown in FIG. 14, the number of misses in the cache drops very quickly after the level 3 tile cache is used. Since the downstream service interface is not required to be accessed after the hit, the downstream service can be better protected. The tile cache has an expiration time and does not go to access the downstream service pull data until after the cache expires.
Further by way of example, as shown in fig. 15, the interface call data of the downstream service can be found to greatly reduce the traffic, and greatly improve the situation of high anomaly rate caused by insufficient interface bearing capacity.
It will be appreciated that in the specific embodiments of the present application, related data such as user information is involved, and when the above embodiments of the present application are applied to specific products or technologies, user permissions or consents need to be obtained, and the collection, use and processing of related data need to comply with related laws and regulations and standards of related countries and regions.
It should be noted that, for simplicity of description, the foregoing method embodiments are all described as a series of acts, but it should be understood by those skilled in the art that the present application is not limited by the order of acts described, as some steps may be performed in other orders or concurrently in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required for the present application.
According to another aspect of the embodiment of the present application, there is also provided an area data acquisition apparatus for implementing the above-mentioned area data acquisition method. As shown in fig. 16, the apparatus includes:
A first obtaining unit 1602, configured to obtain an area data request, where the area data request is used to request to obtain area information associated with a target geographic location;
a determining unit 1604, configured to determine, in response to a region data request, a target tile with a target geographic location that matches from a tile cache list, where the tile cache list includes a plurality of tiles, each tile in the plurality of tiles is configured to cache region information associated with each geographic location in a target geographic region, the plurality of tiles includes a target tile, and the target geographic region includes a target geographic location;
a second obtaining unit 1606 is configured to obtain target area information of the target tile cache, and determine the target area information as area information associated with the target geographic location.
The specific embodiments may refer to the examples shown in the above-mentioned area data acquiring apparatus, and this example will not be described herein.
As an alternative, the apparatus further includes:
The first sending module is used for sending the regional data request to a downstream service interface after the regional data request is acquired, wherein the downstream service interface is used for calling regional information associated with each geographic position in the target geographic region;
And the first receiving module is used for receiving the downstream service area information which is returned by the downstream service interface and is associated with the target geographic position after the area data request is acquired, and determining the downstream service area information as the area information which is associated with the target geographic position.
Specific embodiments may refer to examples shown in the above-mentioned method for acquiring area data, which are not described herein.
As an alternative, the first sending module includes:
the first sending submodule is used for sending the regional data request to the downstream service interface under the condition that the tiles matched with the target geographic positions are not determined in the tile cache list;
The device further comprises:
and the first creation module is used for creating new tiles with matched target geographic positions in the tile cache list after receiving the downstream service area information which is returned by the downstream service interface and is associated with the target geographic positions, and caching the downstream service area information to the new tiles.
Specific embodiments may refer to examples shown in the above-mentioned method for acquiring area data, which are not described herein.
As an alternative, the first sending module includes:
The second sending submodule is used for sending the area data request to the downstream service interface when the tile cache list determines that the target geographic position matched tiles but the area information of the tile cache matched with the target geographic position does not meet the target condition, wherein the target area information meets the target condition;
The device further comprises: and the first updating module is used for updating the area information of the tile cache matched with the target geographic position by utilizing the downstream service area information after receiving the downstream service area information which is returned by the downstream service interface and is associated with the target geographic position.
Specific embodiments may refer to examples shown in the above-mentioned method for acquiring area data, which are not described herein.
As an alternative, the first sending module includes:
The third sending submodule is used for sending the regional data request to the downstream service interface under the condition that the current bearing state of the downstream service interface belongs to a normal state;
the determining unit 1604 includes:
The first determining module is used for responding to the regional data request under the condition that the current bearing state belongs to the overload state, and determining a target tile from the tile cache list through the target geographic position.
Specific embodiments may refer to examples shown in the above-mentioned method for acquiring area data, which are not described herein.
As an alternative, the determining unit 1604 includes:
the first searching module is used for searching a first tile matched with the target geographic position from the tile cache list, wherein the first tile is used for caching first area information associated with the target geographic position;
The second searching module is used for searching a second tile matched with the target geographic position from the tile cache list under the condition that the first tile does not meet the regional output condition, wherein the second tile is used for caching second regional information associated with at least two geographic positions, and the at least two geographic positions comprise the target geographic position;
And a second determining module, configured to determine the second tile as a target tile if the second tile satisfies the region output condition, where the target region information includes second region information.
Specific embodiments may refer to examples shown in the above-mentioned method for acquiring area data, which are not described herein.
As an alternative, the apparatus further includes:
The second sending module is used for sending the regional data request to the downstream service interface under the condition that the first tile does not meet the regional output condition after searching the first tile with the matched target geographic position from the tile cache list;
The second updating module is used for updating the cache of the tile cache list to the target geographic position by using the downstream service area information under the condition that the downstream service area information is received after the first tile matched with the target geographic position is searched from the tile cache list;
A third determining module, configured to, after searching for a first tile matching the target geographic location from the tile cache list, search for a second tile from the tile cache list if failure information returned by the downstream service interface is received; in the event that the first tile satisfies the region output condition, the second tile is determined to be the target tile.
Specific embodiments may refer to examples shown in the above-mentioned method for acquiring area data, which are not described herein.
As an alternative, the apparatus further includes:
The third sending module is used for sending the regional data request to the downstream service interface when the regional data request meets the random updating condition in the process of responding to the regional data request and determining the target tiles with the matched target geographic positions from the tile cache list or after the regional data request;
the second receiving module is used for receiving downstream service area information in the process of or after determining target tiles with matched target geographic positions from the tile cache list in response to the area data request;
The device further comprises:
And the third updating module is used for updating the target area information by utilizing the downstream service area information after acquiring the target area information of the target tile cache and determining the target area information as the area information related to the target geographic position.
Specific embodiments may refer to examples shown in the above-mentioned method for acquiring area data, which are not described herein.
As an alternative, the apparatus further includes:
the second creating module is used for creating a third tile and caching the third tile into the tile cache list;
The device further comprises:
The setting module is used for setting the third tile to be in an invalid state under the condition that the current moment reaches the preset expiration moment of the third tile after the third tile is created and cached in the tile cache list;
a fourth sending module, configured to, after creating the third tile and caching the third tile in the tile cache list, send, to the downstream service interface, a data request associated with a geographic location matched by the third tile when the data request associated with the geographic location matched by the third tile is acquired;
And the third receiving module is used for receiving the target downstream service area information which is returned by the downstream service interface and is associated with the target geographic position after the third tile is created and cached in the tile cache list, and determining the target downstream service area information as the area information which is associated with the geographic position and matched with the third tile.
Specific embodiments may refer to examples shown in the above-mentioned method for acquiring area data, which are not described herein.
As an alternative, the apparatus further includes:
A fourth determining module, configured to determine, based on each geographic location in the target geographic area, a character string number corresponding to each of the plurality of tiles before determining, from the tile cache list, a target tile with a target geographic location match, where the character string number is used to record an arrangement location of each of the plurality of tiles in the tile cache list;
the determining unit 1604 includes:
a fifth determining module, configured to determine a target character string number corresponding to the target geographic location;
The acquisition module is used for acquiring a target arrangement position corresponding to the target character string number;
and a sixth determining module, configured to determine a tile in the tile cache list at the target arrangement location as a target tile.
Specific embodiments may refer to examples shown in the above-mentioned method for acquiring area data, which are not described herein.
According to still another aspect of the embodiment of the present application, there is also provided an electronic device for implementing the above-described region data acquisition method, as shown in fig. 17, the electronic device including a memory 1702 and a processor 1704, the memory 1702 storing a computer program therein, the processor 1704 being configured to execute the steps of any of the above-described method embodiments by the computer program.
Alternatively, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of the computer network.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
S1, acquiring an area data request, wherein the area data request is used for requesting to acquire area information associated with a target geographic position;
S2, responding to the area data request, and determining target tiles with matched target geographic positions from a tile cache list, wherein the tile cache list comprises a plurality of tiles, each tile in the plurality of tiles is used for caching area information associated with each geographic position in a target geographic area, the plurality of tiles comprise target tiles, and the target geographic area comprises target geographic positions;
s3, acquiring target area information of target tile cache, and determining the target area information as area information associated with a target geographic position.
Alternatively, it will be understood by those skilled in the art that the structure shown in fig. 17 is only schematic, and the electronic device may also be a terminal device such as a smart phone (e.g. an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, and a Mobile internet device (Mobile INTERNET DEVICES, MID), a PAD, etc. Fig. 17 is not limited to the structure of the above-described electronic device. For example, the electronic device may also include more or fewer components (e.g., network interfaces, etc.) than shown in FIG. 17, or have a different configuration than shown in FIG. 17.
The memory 1702 may be used to store software programs and modules, such as program instructions/modules corresponding to the method and apparatus for acquiring area data in the embodiment of the present application, and the processor 1704 executes the software programs and modules stored in the memory 1702 to perform various functional applications and data processing, that is, implement the method for acquiring area data. Memory 1702 may include high-speed random access memory, but may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 1702 may further include memory located remotely from processor 1704, which may be connected to the terminal through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof. The memory 1702 may be used for storing information such as a region data request and target region information. As an example, as shown in fig. 17, the memory 1702 may include, but is not limited to, a first acquiring unit 1602, a determining unit 1604, and a second acquiring unit 1604 in the acquiring device including the area data. In addition, other module units in the above-mentioned area data acquisition device may be included, but are not limited to, and are not described in detail in this example.
Optionally, the transmission device 1706 described above is used to receive or transmit data via a network. Specific examples of the network described above may include wired networks and wireless networks. In one example, the transmission apparatus 1706 includes a network adapter (Network Interface Controller, NIC) that can connect to other network devices and routers via a network cable to communicate with the internet or a local area network. In one example, the transmission device 1706 is a Radio Frequency (RF) module that is configured to communicate wirelessly with the internet.
In addition, the electronic device further includes: a display 1708 for displaying information such as the area data request and the target area information; and a connection bus 1710 for connecting the respective module parts in the above-described electronic device.
In other embodiments, the terminal device or the server may be a node in a distributed system, where the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the plurality of nodes through a network communication. Among them, the nodes may form a Peer-To-Peer (P2P) network, and any type of computing device, such as a server, a terminal, etc., may become a node in the blockchain system by joining the Peer-To-Peer network.
According to one aspect of the present application, there is provided a computer program product comprising a computer program/instruction containing program code for executing the method shown in the flow chart. In such embodiments, the computer program may be downloaded and installed from a network via a communication portion, and/or installed from a removable medium. When executed by a central processing unit, performs various functions provided by embodiments of the present application.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
It should be noted that the computer system of the electronic device is only an example, and should not impose any limitation on the functions and the application scope of the embodiments of the present application.
The computer system includes a central processing unit (Central Processing Unit, CPU) that can perform various appropriate actions and processes according to a program stored in a Read-Only Memory (ROM) or a program loaded from a storage section into a random access Memory (Random Access Memory, RAM). In the random access memory, various programs and data required for the system operation are also stored. The CPU, the ROM and the RAM are connected to each other by bus. An Input/Output interface (i.e., I/O interface) is also connected to the bus.
The following components are connected to the input/output interface: an input section including a keyboard, a mouse, etc.; an output section including a Cathode Ray Tube (CRT), a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), and a speaker; a storage section including a hard disk or the like; and a communication section including a network interface card such as a local area network card, a modem, and the like. The communication section performs communication processing via a network such as the internet. The drive is also connected to the input/output interface as needed. Removable media such as magnetic disks, optical disks, magneto-optical disks, semiconductor memories, and the like are mounted on the drive as needed so that a computer program read therefrom is mounted into the storage section as needed.
In particular, the processes described in the various method flowcharts may be implemented as computer software programs according to embodiments of the application. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such embodiments, the computer program may be downloaded and installed from a network via a communication portion, and/or installed from a removable medium. The computer program, when executed by a central processing unit, performs the various functions defined in the system of the application.
According to one aspect of the present application, there is provided a computer-readable storage medium, from which a processor of a computer device reads the computer instructions, the processor executing the computer instructions, causing the computer device to perform the methods provided in the various alternative implementations described above.
Alternatively, in the present embodiment, the above-described computer-readable storage medium may be configured to store a computer program for executing the steps of:
S1, acquiring an area data request, wherein the area data request is used for requesting to acquire area information associated with a target geographic position;
S2, responding to the area data request, and determining target tiles with matched target geographic positions from a tile cache list, wherein the tile cache list comprises a plurality of tiles, each tile in the plurality of tiles is used for caching area information associated with each geographic position in a target geographic area, the plurality of tiles comprise target tiles, and the target geographic area comprises target geographic positions;
s3, acquiring target area information of target tile cache, and determining the target area information as area information associated with a target geographic position.
Alternatively, in this embodiment, it will be understood by those skilled in the art that all or part of the steps in the methods of the above embodiments may be performed by a program for instructing a terminal device to execute the steps, where the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic disk or optical disk, etc.
The foregoing embodiment numbers of the present application are merely for the purpose of description, and do not represent the advantages or disadvantages of the embodiments.
The integrated units in the above embodiments may be stored in the above-described computer-readable storage medium if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing one or more computer devices (which may be personal computers, servers or network devices, etc.) to perform all or part of the steps of the method described in the embodiments of the present application.
In the foregoing embodiments of the present application, the descriptions of the embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In several embodiments provided by the present application, it should be understood that the disclosed client may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, such as the division of the units, is merely a logical function division, and may be implemented in another manner, for example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The foregoing is merely a preferred embodiment of the present application and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present application, which are intended to be comprehended within the scope of the present application.

Claims (14)

1. The method for acquiring the regional data is characterized by comprising the following steps:
acquiring an area data request, wherein the area data request is used for requesting to acquire area information associated with a target geographic position;
Determining target tiles matched with the target geographic positions from a tile cache list in response to the regional data request, wherein the tile cache list comprises a plurality of tiles, each tile in the plurality of tiles is used for caching regional information associated with each geographic position in a target geographic region, the plurality of tiles comprise the target tiles, and the target geographic region comprises the target geographic positions;
and acquiring target area information of the target tile cache, and determining the target area information as area information associated with the target geographic position.
2. The method of claim 1, wherein after the acquiring the region data request, the method further comprises:
The regional data request is sent to a downstream service interface, wherein the downstream service interface is used for calling regional information associated with each geographic position in the target geographic region;
And receiving downstream service area information which is returned by the downstream service interface and is associated with the target geographic position, and determining the downstream service area information as the area information associated with the target geographic position.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
The sending the regional data request to a downstream service interface includes: transmitting the regional data request to the downstream service interface under the condition that the tiles matched with the target geographic position are not determined in the tile cache list;
After receiving the downstream service area information associated with the target geographic location returned by the downstream service interface, the method further includes: creating a new tile in the tile cache list, wherein the new tile matches the target geographic position, and caching the downstream service area information to the new tile.
4. The method of claim 2, wherein the step of determining the position of the substrate comprises,
The sending the regional data request to a downstream service interface includes: if the tile cache list determines that the target geographic position matched tiles but the area information of the target geographic position matched tile caches does not meet the target condition, sending the area data request to the downstream service interface, wherein the target area information meets the target condition;
After receiving the downstream service area information associated with the target geographic location returned by the downstream service interface, the method further includes: and updating the area information of the tile cache matched with the target geographic position by utilizing the downstream service area information.
5. The method of claim 2, wherein the step of determining the position of the substrate comprises,
The sending the regional data request to a downstream service interface includes: transmitting the regional data request to the downstream service interface under the condition that the current bearing state of the downstream service interface belongs to a normal state;
And determining a target tile from a tile cache list according to the target geographic position in response to the area data request, wherein the determining comprises the following steps: and under the condition that the current bearing state belongs to an overload state, responding to the regional data request, and determining the target tile from a tile cache list through the target geographic position.
6. The method of claim 2, wherein determining the target tile from the list of tile caches for which the target geographic location matches comprises:
Searching a first tile matched with the target geographic position from the tile cache list, wherein the first tile is used for caching first area information associated with the target geographic position;
Searching a second tile matched with the target geographic position from the tile cache list under the condition that the first tile does not meet the regional output condition, wherein the second tile is used for caching second regional information associated with at least two geographic positions, and the at least two geographic positions comprise the target geographic position;
And determining the second tile as the target tile if the second tile meets the region output condition, wherein the target region information comprises the second region information.
7. The method of claim 6, wherein after the searching for the first tile from the tile cache list that matches the target geographic location, the method further comprises:
sending the region data request to the downstream service interface if the first tile does not meet the region output condition;
Under the condition that the downstream service area information is received, updating the cache of the tile cache list to the target geographic position by utilizing the downstream service area information;
Under the condition that failure information returned by the downstream service interface is received, searching the second tile from the tile cache list; the second tile is determined to be the target tile if the first tile satisfies the region output condition.
8. The method of claim 2, wherein the step of determining the position of the substrate comprises,
During or after the determining, in response to the region data request, the target tile that matches the target geographic location from a tile cache list, the method further includes:
Transmitting the regional data request to the downstream service interface under the condition that the regional data request meets a random update condition;
Receiving the downstream service area information;
after the target area information of the target tile cache is acquired and the target area information is determined to be the area information associated with the target geographic position, the method further includes: and updating the target area information by using the downstream service area information.
9. The method of claim 2, wherein the step of determining the position of the substrate comprises,
The method further comprises the steps of: creating a third tile, and caching the third tile into the tile cache list;
After the creating the third tile and caching the third tile into the tile cache list, the method further comprises: setting the third tile to be in an invalid state under the condition that the current time reaches the preset expiration time of the third tile;
Transmitting a data request associated with the geographic location matched with the third tile to the downstream service interface under the condition that the data request associated with the geographic location matched with the third tile is acquired;
And receiving target downstream service area information which is returned by the downstream service interface and is associated with the target geographic position, and determining the target downstream service area information as the geographic position associated area information matched with the third tile.
10. The method according to any one of claims 1 to 9, wherein,
Before the determining the target tile with the matched target geographic position from the tile cache list, the method further comprises: determining character string numbers corresponding to the tiles in the plurality of tiles based on the geographic positions in the target geographic area, wherein the character string numbers are used for recording arrangement positions of the tiles in the tile cache list;
the determining the target tile matched with the target geographic position from the tile cache list comprises the following steps:
determining a target character string number corresponding to the target geographic position;
acquiring a target arrangement position corresponding to the target character string number;
And determining the tiles in the tile cache list at the target arrangement positions as the target tiles.
11. An area data acquisition apparatus, comprising:
The first acquisition unit is used for acquiring an area data request, wherein the area data request is used for requesting to acquire area information associated with a target geographic position;
The determining unit is used for responding to the area data request and determining target tiles matched with the target geographic positions from a tile cache list, wherein the tile cache list comprises a plurality of tiles, each tile in the plurality of tiles is used for caching area information associated with each geographic position in a target geographic area, the plurality of tiles comprise the target tiles, and the target geographic area comprises the target geographic positions;
And the second acquisition unit is used for acquiring the target area information of the target tile cache and determining the target area information as the area information associated with the target geographic position.
12. A computer-readable storage medium, characterized in that the computer-readable storage medium comprises a stored program, wherein the program is executable by a terminal device or a computer to perform the method of any one of claims 1 to 10.
13. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the method as claimed in any one of claims 1 to 10.
14. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to execute the method according to any of the claims 1 to 10 by means of the computer program.
CN202310084436.2A 2023-01-16 2023-01-16 Method and device for acquiring regional data, storage medium and electronic equipment Pending CN118349750A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310084436.2A CN118349750A (en) 2023-01-16 2023-01-16 Method and device for acquiring regional data, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310084436.2A CN118349750A (en) 2023-01-16 2023-01-16 Method and device for acquiring regional data, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN118349750A true CN118349750A (en) 2024-07-16

Family

ID=91817529

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310084436.2A Pending CN118349750A (en) 2023-01-16 2023-01-16 Method and device for acquiring regional data, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN118349750A (en)

Similar Documents

Publication Publication Date Title
KR102196401B1 (en) Electronic map interface
AU2017203814B2 (en) Determining location information using a location data point provided by a computing device
US9712457B2 (en) Server directed client originated search aggregator
US9241240B2 (en) Techniques for server-controlled tiling of location-based information
US9883334B2 (en) Method and system for location-based communication
CN110336843A (en) A kind of content distribution method, central node and fringe node for crowdsourcing
WO2017124621A1 (en) Method and device for obtaining access information of shared wireless access point
CN103187003A (en) Access method, device and system of electronic map
US20120054295A1 (en) Method and apparatus for providing or acquiring the contents of a network resource for a mobile device
US20120191773A1 (en) Caching resources
CN104598503A (en) Geographic information data inquiry method, device and system
EP4376360A2 (en) Enhanced online privacy
CN105069669A (en) Flow transaction method and system based on WiFi
US11818622B1 (en) System and method of using spatial and temporal signals to identify and prevent attacks
Stenneth et al. Mobile systems location privacy:“MobiPriv” a robust k anonymous system
CN107992489A (en) A kind of data processing method and server
CN101247312B (en) Context perception information processing system and method in peer-to-peer mode
CN118349750A (en) Method and device for acquiring regional data, storage medium and electronic equipment
WO2022179455A1 (en) Cell data transmission method and apparatus, and electronic device
CN110807040B (en) Method, device, equipment and storage medium for managing data
CN115221443B (en) Information transmission method, device, system, electronic equipment and storage medium
KR20020015797A (en) Method for using on line digital map information
CN113497813B (en) Content refreshing method and device for content distribution network and electronic equipment
EP2849408A1 (en) Method for defining a geographic validity area for received data, a cache proxy, and a terminal for implementing this method
Doumiati et al. D2D Network-Assisted Discovery through Keyword Matching for Offering Cloud Services

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication