Store query processing method, apparatus and device, and storage medium

By using Redis Geo components and caching technology in the store query interface, the burden on the database of large-scale data query is solved and the efficiency of store query is improved.

CN119397075APending Publication Date: 2025-02-07CHINA CONSTRUCTION BANK +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411490833.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

The existing geographical location-based store query solution will burden the database when facing large-scale data queries, resulting in reduced query efficiency.

Method used

The store query interface obtains the target latitude and longitude and target distance entered by the user, and calls the query interface provided by the Redis Geo open source component to read the store number in the target area from the Redis Geo data structure, and reads the store details from the Redis cache to display In the store query interface.

Benefits of technology

It avoids the inefficiency of query caused by traditional database query methods and improves the efficiency of store query based on geographical location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119397075A_ABST
    Figure CN119397075A_ABST
Patent Text Reader

Abstract

The invention provides a store query processing method and device, equipment and a storage medium. Relates to the technical field of data processing. The method comprises the following steps: obtaining a target latitude and longitude and a target distance input by a user through a store query interface, determining a target area according to the target latitude and longitude and the target distance, calling a query interface provided by a Redis Geo open source component, reading at least one first store number in the target area from a Redis Geo data structure, and storing the at least one first store number in the target area in a database; and reading at least one first store number from the Redis cache, reading at least one first store detail corresponding to the at least one first store number from the Redis cache, and displaying the at least one first store detail in the store display area in the store query interface, so that the problems of low query efficiency and low query efficiency caused by the use of a traditional database query mode during large-scale data query are avoided. And the store query efficiency based on the geographic position is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a store query processing method, device, equipment and storage medium. Background Art

[0002] With the popularization of mobile Internet and the widespread use of smart terminal devices, location-based services have become an indispensable part of many Internet applications. Users' demand for location-based information, such as navigation and surrounding service inquiries, is growing.

[0003] Existing store query solutions based on geographic location usually use traditional database query methods, that is, directly querying the target data in the preset database. However, when faced with large-scale data queries, it will cause a burden on the database, resulting in reduced query efficiency. Summary of the invention

[0004] The present application provides a store query processing method, device, equipment and storage medium to solve the problem that the prior art imposes a burden on the database when facing large-scale data queries, thereby reducing query efficiency.

[0005] In a first aspect, the present application provides a store query processing method, comprising: displaying a store query interface, wherein the store query interface includes a latitude and longitude input control, a distance input control, and a store display area;

[0006] receiving the target longitude and latitude input by the user in the longitude and latitude input control, and the target distance input in the distance input control;

[0007] Calling a query interface provided by the Redis Geo open source component to read at least one first store number in a target area from the Redis Geo data structure, wherein the target area is an area with the target longitude and latitude as the center and the target distance as the radius;

[0008] Read at least one first store detail corresponding to the at least one first store number from the Redis cache;

[0009] The at least one first store details are displayed in the store display area.

[0010] In a possible design, reading at least one first store number in the target area from the Redis Geo data structure includes:

[0011] Read at least one first candidate store ID in the target area from multiple Redis Geo data structures in the memory as the first store ID;

[0012] If the number of the first candidate store numbers is less than or equal to the preset number, the second candidate store numbers different from the first candidate store numbers in the target area are read from the multiple RedisGeo data structures in the hard disk as the first store numbers, and the second candidate store numbers include at least one of the following: the store number closest to the target longitude and latitude, and the store number with the largest number of reviews.

[0013] In a possible design, the store query interface further includes: a display strategy input control, and the displaying of the at least one first store details in the store display area includes:

[0014] Obtaining a store display strategy input by a user in the display strategy input control, wherein the store display strategy includes at least one of the following: map display, list display, and card display, wherein the map display is used to display the first store details on a map, the list display is used to display the at least one first store details in the form of a list, and the card display is used to display the at least one first store details in the form of a card, and each of the cards corresponds to one first store detail;

[0015] The at least one first store detail is displayed in the store display area according to the store display strategy.

[0016] In a possible design, when the store display strategy includes map display and card display, displaying the at least one first store detail in the store display area according to the store display strategy includes:

[0017] Extracting the longitude and latitude of each store from the details of each of the first stores as the longitude and latitude of the first store, and generating a store card for each of the details of the first store;

[0018] Adding corresponding store cards to the map according to the latitude and longitude of each of the first stores;

[0019] Displaying the map with the store card added in the store display area;

[0020] When a viewing operation on a target store card in at least one of the store cards is received, the first store details corresponding to the target store card are displayed.

[0021] In a possible design, the method further includes: displaying a store configuration interface; receiving store information input by a user in the store configuration interface;

[0022] If the store information includes store basic information, the store basic information is stored in the RedisGeo data structure, and the store basic information includes the store number and / or the store latitude and longitude;

[0023] If the store information includes store details, the store details are stored in the Redis cache.

[0024] In a possible design, the method further includes: obtaining the historical access frequency and / or survival time of each store detail in the Redis cache;

[0025] According to the historical access frequency and / or survival time, delete the second store details from the Redis cache, the second store details including: the details of multiple stores with the lowest historical access frequency and / or the details of multiple stores with the longest survival time;

[0026] Delete the store basic information corresponding to the second store details from the Redis Geo data structure.

[0027] In a second aspect, the present application provides a store query processing device, comprising:

[0028] An acquisition module, used to display a store query interface, wherein the store query interface includes a latitude and longitude input control, a distance input control, and a store display area;

[0029] The acquisition module is further used to receive the target longitude and latitude input by the user in the longitude and latitude input control, and the target distance input in the distance input control;

[0030] A processing module, configured to call a query interface provided by a Redis Geo open source component, and read at least one first store number in a target area from a Redis Geo data structure, wherein the target area is an area with the target longitude and latitude as the center and the target distance as the radius;

[0031] The execution module is used to read at least one first store detail corresponding to the at least one first store number from the Redis cache, and display the at least one first store detail in the store display area.

[0032] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the store query processing method described in the first aspect and various possible designs of the first aspect.

[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the store query processing method described in the first aspect and various possible designs of the first aspect is implemented.

[0034] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the store query processing method described in the first aspect and various possible designs of the first aspect.

[0035] The store query processing method, device, equipment and storage medium provided in the present application obtain the target longitude and latitude and target distance input by the user through the store query interface, determine the target area according to the target longitude and latitude and the target distance, call the query interface provided by the Redis Geo open source component, read at least one first store number in the target area from the Redis Geo data structure, and read at least one first store detail corresponding to the at least one first store number from the Redis cache, and display the at least one first store detail in the store display area in the store query interface, thereby avoiding the low query efficiency caused by using traditional databases such as SQL or Oracle query methods when querying large-scale data, thereby improving the store query efficiency based on geographic location. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0037] Figure 1 Schematic diagram of the store query architecture provided for this application;

[0038] Figure 2 Schematic diagram of the process of the store query processing method provided in the embodiment of the present application Figure 1 ;

[0039] Figure 3 Schematic diagram of the process of the store query processing method provided in the embodiment of the present application Figure 2 ;

[0040] Figure 4 Schematic diagram of the process of the store query processing method provided in the embodiment of the present application Figure 3 ;

[0041] Figure 5 A schematic diagram of the structure of a store query processing device provided in an embodiment of the present application;

[0042] Figure 6A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0043] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0044] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0045] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.

[0046] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.

[0047] First, the terms involved in this application are explained:

[0048] Redis Geo: refers to the service function in the Redis remote dictionary service, which is used to store geographic location information as data in Redis and perform geographic location query operations based on this information.

[0049] With the popularization of mobile Internet and the widespread application of smart terminal devices, location-based services (LBS) have become an indispensable part of many Internet applications. Users have an increasing demand for location-based information, such as query services for nearby target stores.

[0050] In the prior art, there are store query solutions based on geographic location data. However, the existing store query solutions are usually implemented using traditional database storage and query methods. Specifically, the information of each dimension of the store is stored in a single database such as SQL (Structured Query Language) or Oracle. When querying nearby stores of the target location, the data records of all stores are read from the database to determine the distance between the geographic location in the data record of each store and the above target location. If the distance is less than or equal to the preset distance threshold, the store details in the data record of the store are extracted as the store details of the nearby stores. In this way, the store details of all nearby stores can be obtained by traversing all data records in the database.

[0051] A study of the above query process found that the above query process needs to query the data records of all stores from the database, resulting in a large amount of query data from the database, which in turn leads to low query efficiency. In order to improve query efficiency, one way is to reduce the amount of data in the database, so some data in the database can be moved out of the database and stored separately in a location with higher reading efficiency. In the above query process, the distance needs to be calculated based on the geographical location and the target location, and the store details are obtained only after the distance meets the conditions. In other words, the acquisition of geographical location and store details are two processes. Therefore, the geographical location of the store can be removed from the database and stored separately, so as to first determine the store code that meets the distance conditions, and then extract the store details corresponding to the store code from the database. This can also improve the efficiency of reading store details from the database.

[0052] In the present invention, the Redis Geo data structure is selected as the storage method of the store location. Corresponding to the Redis Geo data structure, the Redis cache is used to store the store details.

[0053] In addition, the present invention also provides a self-defined function for query conditions, thereby realizing a more flexible query method.

[0054] In view of this, the present application provides a store query processing method, which obtains the target longitude and latitude and target distance input by the user through the store query interface, determines the target area according to the target longitude and latitude and the target distance, calls the query interface provided by the Redis Geo open source component, reads at least one first store number in the target area from the Redis Geo data structure, and reads at least one first store detail corresponding to the at least one first store number from the Redis cache, and displays the at least one first store detail in the store display area in the store query interface. By storing the store number and store details in the Redis Geo data structure and the Redis cache respectively, it avoids the access pressure and burden on the single database when all relevant information of each store is stored in the database, thereby improving the efficiency and flexibility of store queries based on geographic location.

[0055] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0056] Figure 1 A schematic diagram of a store query architecture provided in an embodiment of the present application. Figure 2 Schematic diagram of the process of the store query processing method provided in the embodiment of the present application Figure 1 , combined with Figure 1 and Figure 2 As shown, the method includes:

[0057] S101, displaying a store query interface, wherein the store query interface includes a latitude and longitude input control, a distance input control, and a store display area;

[0058] Specifically, when a user needs to query a target store, the store query interface is displayed in the presentation layer through an application or applet, where the store query interface can provide an intuitive and easy-to-use user interface to support users to enter query conditions, such as entering the current location through the latitude and longitude input control, and querying the radius through the distance input control, and displaying the corresponding query results. The query results can be displayed to users in the store display area in the form of map marks, lists, or cards.

[0059] S102, receiving the target longitude and latitude input by the user in the longitude and latitude input control, and the target distance input in the distance input control;

[0060] Specifically, when the user enters the current location through the latitude and longitude input control, the user can select the current user location, or of course, other locations can be selected as the current location entered in the latitude and longitude input control. When entering the target distance through the distance input control, the target distance can be customized according to the street range or city range.

[0061] S103, calling the query interface provided by the Redis Geo open source component to read at least one first store number in the target area from the Redis Geo data structure, wherein the target area is an area with the target longitude and latitude as the center and the target distance as the radius;

[0062] Specifically, after obtaining the target longitude and latitude and target distance input by the user, the target area is determined according to the target longitude and latitude and the target distance, where the target area is an area centered on the target longitude and latitude and with the target distance as a radius. Based on the target area, the GEORADIUS (GEO geographic location command) or GEORADIUSBYMEMBER command of Redis Geo in the business logic layer is used to query the store information within the specified range, that is, to query and obtain at least one corresponding store number in the target area, where GEORADIUSBYMEMBER is a command in Redis, which is used to return a list of geographic index members that intersect with a given circular area.

[0063] S104, reading at least one first store detail corresponding to the at least one first store number from the Redis cache, and displaying the at least one first store detail in the store display area;

[0064] Specifically, after querying and obtaining at least one store number corresponding to the target area, the store details corresponding to each store number are read from the Redis cache of the data storage layer, where the store details of each store are stored in the Redis cache, and the store number and corresponding geographic location information of each store are stored in the Redis Geo data structure. For each store detail information in the Redis cache, the cache elimination algorithm such as LRU (Least Recently Used) or TTL (Time ToLive) of the business logic layer is used to automatically eliminate expired or less used cache data according to the access frequency and update time of the cache data. At the same time, the maximum storage limit of the cache data can be set to avoid unlimited growth of the cache space.

[0065] An embodiment of the present application provides a store query processing method, which obtains the target longitude and latitude and the target distance input by the user through the store query interface, determines the target area according to the target longitude and latitude and the target distance, calls the query interface provided by the Redis Geo open source component, reads at least one first store number in the target area from the Redis Geo data structure, and reads at least one first store detail corresponding to the at least one first store number from the Redis cache, and displays the at least one first store detail in the store display area in the store query interface, thereby avoiding the low query efficiency caused by using traditional databases such as SQL or Oracle query methods when querying large-scale data, thereby improving the store query efficiency based on geographic location.

[0066] Figure 3 Schematic diagram of the process of the store query processing method provided in the embodiment of the present application Figure 2 ,like Figure 3 As shown, in this embodiment Figure 2 Based on the embodiment, a store query processing method is described in detail, and the method includes:

[0067] S201, displaying a store query interface, wherein the store query interface includes a latitude and longitude input control, a distance input control, and a store display area;

[0068] Specifically, the store query interface also includes a display strategy input control, which obtains the store display strategy input by the user, so that the store information obtained by the query is intuitively displayed in the store display area of ​​the store query interface according to the store display strategy. Through the various controls in the store query interface, it supports users to customize query conditions and ranges to meet users' personalized needs.

[0069] S202, receiving the target longitude and latitude input by the user in the longitude and latitude input control, and the target distance input in the distance input control;

[0070] Specifically, the content of this step is the same as that of S102 and will not be repeated here.

[0071] S203, calling the query interface provided by the Redis Geo open source component, and reading at least one first candidate store number in the target area from multiple Redis Geo data structures in the memory as the first store number;

[0072] Furthermore, after obtaining the target longitude and latitude and target distance input by the user and determining the target area based on the target longitude and latitude and the target distance, the number of first candidate store numbers is compared with a preset number to detect whether the number of first candidate store numbers is less than or equal to the preset number. If the number of first candidate store numbers is greater than the preset number, the number of the first candidate store numbers is used as the first store number.

[0073] S204: If the number of first candidate store numbers is less than or equal to a preset number, read a second candidate store number in the target area that is different from the first candidate store number from a plurality of RedisGeo data structures in the hard disk as the first store number;

[0074] Specifically, if the number of first candidate store numbers is less than or equal to the preset number, that is, the number of target stores in the target area is too small, a default store is recommended to the user. A second candidate store number different from the first candidate store number in the target area is read from multiple Redis Geo data structures in the hard disk as the first store number, where the second candidate store number includes at least one of the following: the store number closest to the target longitude and latitude, the store number with the most reviews, that is, the default store number.

[0075] S205, reading at least one first store detail corresponding to the at least one first store number from the Redis cache, and obtaining the store display strategy input by the user in the display strategy input control, wherein the store display strategy includes at least one of the following: map display, list display, and card display;

[0076] Specifically, the map display is used to display the first store details in the map, the list display is used to display at least one first store details in the form of a list, and the card display is used to display at least one first store details in the form of a card. Each card corresponds to a first store detail, which can of course be displayed in the store display area in the store query interface according to the display strategy selected by the user.

[0077] S206, extracting the longitude and latitude of each first store from the details of each first store as the longitude and latitude of the first store, and generating a store card for each of the first store details;

[0078] Specifically, after obtaining at least one first store detail corresponding to at least one first store number, and when the store display strategy includes map display and card display, the corresponding store card is added to the map according to the longitude and latitude of each first store, and the map with the added store card is displayed in the store display area.

[0079] S207, when receiving a viewing operation on a target store card in at least one of the store cards, displaying first store details corresponding to the target store card;

[0080] Specifically, after the map with added store cards is displayed in the store display area, if the user views the target store card in the store display area, the target store card expands multiple sub-columns, and the detailed information of the corresponding store is displayed through the expanded multiple sub-columns, where one card corresponds to the detailed information of one store.

[0081] An embodiment of the present application provides a store query processing method, which obtains the target longitude and latitude and the target distance input by the user through the store query interface, determines the target area according to the target longitude and latitude and the target distance, calls the query interface provided by the Redis Geo open source component, reads at least one first store number in the target area from the Redis Geo data structure, and reads at least one first store detail corresponding to the at least one first store number from the Redis cache, and displays the at least one first store detail in the store display area in the store query interface, thereby avoiding the low query efficiency caused by using traditional databases such as SQL or Oracle query methods when querying large-scale data, thereby improving the store query efficiency based on geographic location.

[0082] Figure 4 Schematic diagram of the process of the store query processing method provided in the embodiment of the present application Figure 3 ,like Figure 4 As shown, in this embodiment Figure 3 Based on the embodiment, the store query processing method is further described, and the method includes:

[0083] S301, displaying a store configuration interface, and receiving store information input by a user in the store configuration interface;

[0084] Specifically, when the user needs to update the pre-stored store information data, the data update request is obtained through the store configuration interface, where the data update request includes the store information entered by the user, and different types of data information are stored in the Redis Geo data structure or Redis cache according to the store information.

[0085] S302: If the store information includes store basic information, store the store basic information in the Redis Geo data structure, where the store basic information includes the store number and / or the store latitude and longitude;

[0086] Specifically, after obtaining the store information in the data update request, it is detected whether the store information includes the store basic information. If it is detected that it is included, the store basic information is stored in the Redis Geo data structure. If it is not included, the store information is not stored in the Redis Geo data structure.

[0087] S303: If the store information includes store details, store the store details in the Redis cache;

[0088] Specifically, it is detected whether the store information includes store details. If it is detected that it is included, the store details are stored in the Redis cache. If not, the store information is not stored in the Redis cache. If it is detected that the store information does not include both the store basic information and the store details, a data update request is returned to prompt the user to re-enter the store information.

[0089] S304, obtaining the historical access frequency and / or survival time of each store detail in the Redis cache;

[0090] Specifically, after the store details are stored in the Redis cache, the access frequency and editing time of each store details are continuously recorded, and the historical access frequency and / or survival time of the corresponding store details are obtained based on the access frequency and editing time, where the store details include store name, store address and contact information.

[0091] S305. Deleting the second store details from the Redis cache according to the historical access frequency and / or survival time, and deleting the store basic information corresponding to the second store details from the Redis Geo data structure;

[0092] Specifically, after obtaining the historical access frequency and / or survival time corresponding to each store detail, the expired or less used cached data is automatically eliminated according to the cached data, that is, the access frequency and update time of each store detail. The second store details include: multiple store details with the lowest historical access frequency, and / or multiple store details with the longest survival time, so that the query data is easy to expand and upgrade, and can cope with the changing needs of future business development. At the same time, by integrating Redis Geo and an efficient cache management mechanism, the store's geographic location information can be quickly stored, queried and dynamically updated, thereby improving the overall efficiency of the query.

[0093] An embodiment of the present application provides a store query processing method, which obtains the target longitude and latitude and the target distance input by the user through the store query interface, determines the target area according to the target longitude and latitude and the target distance, calls the query interface provided by the Redis Geo open source component, reads at least one first store number in the target area from the Redis Geo data structure, and reads at least one first store detail corresponding to the at least one first store number from the Redis cache, and displays the at least one first store detail in the store display area in the store query interface, thereby avoiding the low query efficiency caused by the use of traditional databases such as SQL or Oracle query methods during large-scale data queries, thereby greatly reducing the query time and improving the user experience, and at the same time combining the Redis cache technology to store the detailed information of the store in the memory, further shortening the data access path, reducing the disk I / O operation, and making the query response faster.

[0094] Figure 5 This is a schematic diagram of the structure of the store query processing device provided in the embodiment of the present application. Figure 5 As shown, the device 50 includes: an acquisition module 501, a processing module 502 and an execution module 503.

[0095] The acquisition module 501 is used to display a store query interface, which includes a latitude and longitude input control, a distance input control and a store display area;

[0096] The acquisition module 501 is further used to receive the target longitude and latitude input by the user in the longitude and latitude input control, and the target distance input in the distance input control;

[0097] Processing module 502, used to call the query interface provided by the Redis Geo open source component to read at least one first store number in the target area from the Redis Geo data structure, where the target area is an area with the target longitude and latitude as the center and the target distance as the radius;

[0098] The execution module 503 is used to read at least one first store detail corresponding to at least one first store number from the Redis cache, and display the at least one first store detail in the store display area.

[0099] Further, the processing module 502 is specifically configured to read at least one first candidate store number in the target area from the multiple Redis Geo data structures in the memory as the first store number;

[0100] If the number of the first candidate store numbers is less than or equal to the preset number, the second candidate store numbers different from the first candidate store numbers in the target area are read from the multiple RedisGeo data structures in the hard disk as the first store numbers, and the second candidate store numbers include at least one of the following: the store number closest to the target longitude and latitude, and the store number with the largest number of reviews.

[0101] Furthermore, the store query interface further includes: a display strategy input control, wherein the at least one first store detail is displayed in the store display area, and a processing module 502 is specifically used to obtain a store display strategy input by a user in the display strategy input control, wherein the store display strategy includes at least one of the following: map display, list display, and card display, wherein the map display is used to display the first store detail in a map, the list display is used to display the at least one first store detail in the form of a list, and the card display is used to display the at least one first store detail in the form of a card, and each of the cards corresponds to one first store detail;

[0102] The at least one first store detail is displayed in the store display area according to the store display strategy.

[0103] Further, the processing module 502 is specifically configured to display the at least one first store detail in the store display area according to the store display strategy when the store display strategy includes map display and card display, including:

[0104] Extracting the longitude and latitude of each store from the details of each of the first stores as the longitude and latitude of the first store, and generating a store card for each of the details of the first store;

[0105] Adding corresponding store cards to the map according to the latitude and longitude of each of the first stores;

[0106] Displaying the map with the store card added in the store display area;

[0107] When a viewing operation on a target store card in at least one of the store cards is received, the first store details corresponding to the target store card are displayed.

[0108] Furthermore, the acquisition module 501 is also used to display a store configuration interface; receive store information input by a user in the store configuration interface;

[0109] If the store information includes store basic information, the store basic information is stored in the RedisGeo data structure, and the store basic information includes the store number and / or the store latitude and longitude;

[0110] If the store information includes store details, the store details are stored in the Redis cache.

[0111] Furthermore, the processing module 502 is also used to obtain the historical access frequency and / or survival time of each store detail in the Redis cache;

[0112] According to the historical access frequency and / or survival time, delete the second store details from the Redis cache, the second store details including: the details of multiple stores with the lowest historical access frequency and / or the details of multiple stores with the longest survival time;

[0113] Delete the store basic information corresponding to the second store details from the Redis Geo data structure.

[0114] The store query processing device provided in the embodiment of the present application can be used to execute the technical solution of the store query processing method in the above embodiment. Its implementation principle and technical effect are similar and will not be repeated here.

[0115] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. For example, the processing module 502 can be a separately established processing element, or it can be integrated in a chip of the above device. In addition, it can also be stored in the memory of the above device in the form of program code, and called and executed by a processing element of the above device. The function of the above processing module 502. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.

[0116] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As shown, the electronic device may include: a transceiver 601 , a processor 602 , and a memory 603 .

[0117] The processor 602 executes the computer execution instructions stored in the memory, so that the processor 602 executes the scheme in the above embodiment. The processor 602 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, and discrete hardware components.

[0118] The memory 603 is connected to the processor 602 via a system bus and completes communication between them. The memory 603 is used to store computer program instructions.

[0119] The transceiver 601 may be used to obtain tasks to be executed and configuration information of the tasks to be executed.

[0120] The system bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries).

[0121] The memory may include random access memory (RAM) and may also include non-volatile memory (VNM).

[0122] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of the store query processing method in the above embodiment.

[0123] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of the store query processing method of the above embodiment.

[0124] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of the store query processing method in the above embodiment.

[0125] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0126] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to implement the solution of this embodiment.

[0127] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

[0128] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.

[0129] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0130] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a main control device.

[0131] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.

[0132] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A store query processing method, characterized in that: include: Displaying a store query interface, wherein the store query interface includes a latitude and longitude input control, a distance input control, and a store display area; receiving the target longitude and latitude input by the user in the longitude and latitude input control, and the target distance input in the distance input control; Calling a query interface provided by the Redis Geo open source component to read at least one first store number in a target area from the Redis Geo data structure, wherein the target area is an area with the target longitude and latitude as the center and the target distance as the radius; Read at least one first store detail corresponding to the at least one first store number from the Redis cache; The at least one first store details are displayed in the store display area.

2. The method according to claim 1, characterized in that The step of reading at least one first store number in the target area from the Redis Geo data structure includes: Read at least one first candidate store ID in the target area from multiple Redis Geo data structures in the memory as the first store ID; If the number of the first candidate store numbers is less than or equal to the preset number, the second candidate store numbers different from the first candidate store numbers in the target area are read from multiple Redis Geo data structures in the hard disk as the first store numbers, and the second candidate store numbers include at least one of the following: the store number closest to the target longitude and latitude, and the store number with the largest number of reviews.

3. The method according to claim 1, characterized in that The store query interface further includes: a display strategy input control, wherein displaying the at least one first store details in the store display area includes: Obtaining a store display strategy input by a user in the display strategy input control, wherein the store display strategy includes at least one of the following: map display, list display, and card display, wherein the map display is used to display the first store details on a map, the list display is used to display the at least one first store details in the form of a list, and the card display is used to display the at least one first store details in the form of a card, and each of the cards corresponds to one first store detail; The at least one first store detail is displayed in the store display area according to the store display strategy.

4. The method according to claim 3, characterized in that When the store display strategy includes map display and card display, displaying the at least one first store detail in the store display area according to the store display strategy includes: Extracting the longitude and latitude of each store from the details of each of the first stores as the longitude and latitude of the first store, and generating a store card for each of the details of the first store; Adding corresponding store cards to the map according to the latitude and longitude of each of the first stores; Displaying the map with the store card added in the store display area; When a viewing operation on a target store card in at least one of the store cards is received, the first store details corresponding to the target store card are displayed.

5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: Display the store configuration interface; Receiving store information input by the user in the store configuration interface; If the store information includes store basic information, the store basic information is stored in the Redis Geo data structure, and the store basic information includes the store number and / or the store latitude and longitude; If the store information includes store details, the store details are stored in the Redis cache.

6. The method according to claim 4, characterized in that Also includes: Obtain the historical access frequency and / or survival time of each store detail in the Redis cache; According to the historical access frequency and / or survival time, delete the second store details from the Redis cache, the second store details including: the details of multiple stores with the lowest historical access frequency and / or the details of multiple stores with the longest survival time; Delete the store basic information corresponding to the second store details from the Redis Geo data structure.

7. A store query processing device, characterized in that: include: An acquisition module, used to display a store query interface, wherein the store query interface includes a latitude and longitude input control, a distance input control, and a store display area; The acquisition module is further used to receive the target longitude and latitude input by the user in the longitude and latitude input control, and the target distance input in the distance input control; A processing module, configured to call a query interface provided by a Redis Geo open source component, and read at least one first store number in a target area from a Redis Geo data structure, wherein the target area is an area with the target longitude and latitude as the center and the target distance as the radius; The execution module is used to read at least one first store detail corresponding to the at least one first store number from the Redis cache, and display the at least one first store detail in the store display area.

8. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 6 when executed by a processor.

10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when being executed by a processor.