A data indexing method and apparatus

CN116627982BActive Publication Date: 2026-09-22探探科技(北京)有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310625988.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-30
Publication Date
2026-09-22
Estimated Expiration
2043-05-30

AI Technical Summary

Technical Problem

在联合地理位置数据的移动用户之间的索引匹配过程中,若以地理位置数据为主索引,以其他维度的向量索引对地理位置数据索引后的数据集合进行过滤,或,以其他维度的向量索引作为主索引,以地理位置数据对其他维度的向量索引后的数据集合进行过滤,均可能出现过滤后结果数量较少或为空集的情况

Benefits of technology

[0026]通过将地理位置信息引入待索引的向量,从而构造新的索引向量并在响应用户索引指令时,对构造的新的索引向量执行且进执行一次索引,从而同时实现地理信息及向量索引后获得预期数量的数据集,提升索引效率、降低计算时间。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116627982B_ABST
    Figure CN116627982B_ABST
Patent Text Reader

Abstract

The application provides a data index method, comprising: obtaining an identification of a geographical positioning area of a user; fusing the geographical positioning area identification and a first index to construct a second index; wherein the first index is an index instruction of the user; the first index and the second index are vector indexes; and in response to the index instruction of the user, the second index is executed and only the second index is executed. The application solves the technical problems of unstable hit quantity and low index efficiency in the process of combining geographical position data and vector data index, and improves the stability of the quantity of index results and the index efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data retrieval, and more particularly to a data indexing method and apparatus. Background Technology

[0002] Index matching between mobile users involves data from multiple dimensions, such as geographic location data and user characteristics. User characteristics are typically retrieved and matched using vectors. In the process of index matching between mobile users with combined geographic location data, if geographic location data is used as the primary index and other dimension vector indexes are used to filter the dataset indexed by geographic location data, or vice versa, the filtered results may be insufficient or even empty. Furthermore, performing multiple rounds of searches based on geographic location data indexes and other dimension vector indexes until a sufficient number of index results is obtained requires significant resource consumption and computation time. Summary of the Invention

[0003] In view of this, this application provides a data indexing method and apparatus to improve the indexing efficiency and the stability of the number of index hits among mobile users.

[0004] The first aspect of this invention provides a data indexing method, comprising:

[0005] Obtain the identifier of the user's geographic location area;

[0006] The second index is constructed by integrating the geographic location area identifier and the first index;

[0007] Wherein, the first index is the user's index instruction;

[0008] The first index and the second index are vector indices;

[0009] In response to the user's indexing instruction, execute and only execute the second index to obtain the expected number of index hits.

[0010] In some embodiments, based on the distance between the user's location within the geographic location area and the boundary of the geographic location area, the identifier of the user's geographic location area is determined as: the identifier of the geographic location area the user fell into, or the sum of the identifier of the geographic location area the user fell into and the identifiers of other geographic locations.

[0011] In some embodiments, if the user falls into the geographic location area and is close to the boundary of the geographic location area, the identifier of the geographic location area into which the user fell and the extended identifier of the geographic location area into which the user fell are combined with the first index to construct a second index.

[0012] In some embodiments, if the user falls within the boundaries of a plurality of adjacent geographic location areas, the identifiers of the plurality of adjacent geographic location areas and the extended identifiers of the plurality of adjacent geographic location areas are combined with the first index to construct a second index.

[0013] In some embodiments, a third vector of an active user is constructed based on the identifier of the active user's real-time geographic location area and the attribute characteristics of the active user. The third vector is used to respond to the user's indexing instruction and, when executing and only executing the second index, to perform vector calculation with the second index to obtain the data indexing result.

[0014] In some embodiments, based on the distance between the location of the active user falling into the geographic location area and the boundary of the geographic location area, the identifier of the active user's real-time geographic location area is determined as: the identifier of the geographic location area to which the active user falls, or the sum of the identifier of the real-time geographic location area to which the active user falls and the identifiers of other geographic location areas.

[0015] In some embodiments, if the active user falls into the geographic location area and is close to the boundary of the geographic location area, the identifier of the geographic location area into which the active user falls and the extended identifier of the geographic location area into which the active user falls are fused together with the attribute features of the active user to construct the third vector of the active user.

[0016] And / or,

[0017] If the active user falls within the boundaries of multiple adjacent geographic location areas, the identifiers of the multiple adjacent geographic location areas and their extended identifiers are fused with the attribute features of the active user to construct the third vector of the active user.

[0018] In some embodiments, the second index includes an identifier of the user's geographic location area, the first index, and the user's attribute characteristics.

[0019] A second aspect of the present invention provides a data indexing apparatus, comprising:

[0020] An identifier acquisition unit is configured to acquire the identifier of the geographic location area where the user is located.

[0021] An index building unit is configured to fuse the geographic location area identifier and the first index to build a second index;

[0022] Wherein, the first index is the user's index instruction;

[0023] The first index and the second index are vector indices;

[0024] An index execution unit is configured to execute, and only execute, the second index in response to the user's index instruction, to obtain a desired number of index hits.

[0025] A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the steps of the data indexing method described in any of the preceding claims.

[0026] By incorporating geographic location information into the vector to be indexed, a new index vector is constructed. In response to the user's indexing command, the constructed new index vector is indexed again, thereby simultaneously achieving the expected amount of dataset after indexing geographic information and vectors, improving indexing efficiency and reducing computation time. Attached Figure Description

[0027] Figure 1 This is a flowchart illustrating a data indexing method in an exemplary embodiment of this application.

[0028] Figure 2 This is a flowchart illustrating how, in an exemplary embodiment, the identifier of a user's geographic location area is determined based on the distance between the user's location within the geographic location area and the boundary of the geographic location area.

[0029] Figure 3 This is a schematic diagram of a second-level geolocation region 200 and a surrounding third-level geolocation region 300 in an exemplary embodiment.

[0030] Figure 4 This is a flowchart illustrating how, in an exemplary embodiment, an active user's geographic location area is identified based on the distance between the location of the active user within the geographic location area and the boundary of the geographic location area.

[0031] Figure 5 This is a schematic block diagram illustrating a data indexing device as an exemplary embodiment. Detailed Implementation

[0032] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0033] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.

[0034] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, a first index may also be referred to as a second index, and similarly, a second index may also be referred to as a first index. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0035] A common scenario for joint retrieval based on geographic location data and vector data is as follows: a user searches for other active users nearby who share similar interests, work experience, or other similar characteristics. The geographic locations of the user and the other active users they are searching for / indexing change as they move, causing the indexing results to update in real time based on the user's and active users' geographic locations.

[0036] When performing joint retrieval based on geographic location data and vector data, there are typically three processing methods:

[0037] One approach is to use the geographic location index as the primary index and filter the results based on vectors.

[0038] Second, it uses vector indexes as the main indexes and filters based on geographical distance;

[0039] Third, combine the above two methods to conduct a progressive multi-round search in order to obtain the final number of hits that meet the expected number.

[0040] Using geographic location index as the index: Based on the geographic location of two points, calculate the distance between the points and determine a set of candidate points within a specified distance range from the user.

[0041] Using vector indices as the index: calculate the similarity between two vectors, determine the degree of association between the two vectors, and determine the set of candidate vectors whose vector similarity to the user is within a specified range.

[0042] When using the first method, i.e., using the geographic location index as the main index and filtering the results based on vectors to handle scenarios involving joint retrieval of geographic location data and vector data, the number of results after filtering may be far lower than the preset value, or even an empty set.

[0043] When using the second method, i.e., using the vector index as the main index and filtering based on geographical distance to handle scenarios involving joint retrieval of geographical location data and vector data, the number of filtered results may also be far lower than the preset value, or even an empty set.

[0044] The third approach, combining geographic location indexing and vector indexing, employs a progressive, multi-round search to obtain a final, expected number of hits for scenarios involving joint retrieval of geographic location and vector data. This method uses the primary index to obtain a candidate set; if the number of candidates after filtering is insufficient, the primary index is used to obtain supplementary candidates, and this process is repeated until the expected number of candidates is achieved. While this third approach effectively avoids situations where the number of candidates is far below the preset value or is an empty set, it requires a large number of search rounds, consumes significant computational resources, and results in excessively long waiting times.

[0045] In view of this, the present invention proposes a data indexing method and apparatus, which constructs a new index vector by introducing geographic location information into the vector to be indexed, and performs an indexing operation on the constructed new index vector in response to the user's indexing instruction, thereby simultaneously achieving the expected amount of dataset after indexing geographic information and vector, improving indexing efficiency and reducing computation time.

[0046] Figure 1 A flowchart illustrating a data indexing method as an exemplary embodiment.

[0047] Please refer to Figure 1 Data indexing methods include:

[0048] S101 obtains the identifier of the user's geographic location area.

[0049] The identification of a geolocation area can be obtained through geolocation encoding, such as Geohash. Specifically, the geolocation area is divided into multiple levels, with each level's grid division distinguished by area size: a larger first-level area consists of multiple smaller second-level areas, and the smaller second-level areas are further composed of multiple even smaller third-level areas. Each smaller third-level area, smaller second-level area, and larger first-level area involves a specific code, and the code corresponding to each area is used as the identifier of the geolocation area.

[0050] It is understood that this embodiment uses a three-layer hierarchical structure of geographic location areas as an example, and should not be limited to a three-layer hierarchical structure. A hierarchical structure with more than three layers or less does not affect the implementation of the technical solution of this invention.

[0051] When a user performs a search, their geographic location is determined to be in the second-level geographic location region 200, and the corresponding characters for that geographic location region are obtained. The letters of the second-level geographic location region 200 are used as the identifier for the user's current geographic location region.

[0052] In some embodiments, the identifier of the user's geographic location area is determined based on the distance between the user's location within the geographic location area and the boundary of the geographic location area. For example, the identifier of the geographic location area the user falls into may be used alone, or the identifier of the geographic location area the user falls into may be used together with the identifiers of other geographic locations as the identifier of the user's geographic location area.

[0053] By considering the distance between the user's location within the geolocation area and the boundary of the geolocation area and introducing necessary identifiers, this approach balances resource consumption during computation with the geographical range of the indexed target object. This embodiment solves the distance problem of the indexed target object by replacing distance calculation with the addition of geolocation area identifiers, thus avoiding unnecessary geolocation index calculations during vector indexing.

[0054] Figure 2 This is a flowchart illustrating how, in an exemplary embodiment, the identifier of a user's geographic location area is determined based on the distance between the user's location within the geographic location area and the boundary of the geographic location area.

[0055] Figure 3 This is a schematic diagram of a second-level geolocation region 200 and a surrounding third-level geolocation region 300 in an exemplary embodiment.

[0056] Please refer to Figure 2 and Figure 3The method for determining the identifier of the user's geographic location area based on the distance between the user's location within the geographic location area and the boundary of the geographic location area includes:

[0057] S1011 determines the user's second-level geographic location area 200.

[0058] Based on determining the user's second-level geographic location region 200, obtain a 3-character identifier for the second-level geographic location region 200.

[0059] S1012 calculates the distance between the user's location and the boundary of the second-level geographic location area 200.

[0060] If the distance between the user's location and the boundary of the second-level geographic location area 200 is greater than the first threshold, then proceed to step S1013.

[0061] If the distance between the user's location and the boundary of the second-level geographic location area 200 is less than the first threshold and greater than the second threshold, then proceed to step S1014.

[0062] The first and second thresholds define the edge of the user's second-level geolocation area 200, but there is still a certain distance from the boundary. Within this area, only the third-level geolocation area 300 is introduced to supplement the area.

[0063] If the distance between the user's location and the boundary of the second-level geographic location area 200 is less than the second threshold, then proceed to step S1015.

[0064] The second threshold limits the user's location to a very close edge of the boundary of their current second-level geographic location area 200, and may even place them at the boundary of two adjacent second-level geographic location areas 200. Especially if the user is moving, the second-level geographic location area 200 determined in S1011 may even have a degree of randomness, potentially being classified as different second-level geographic location areas 200. In this case, simply introducing a third-level geographic location area 300 for supplementation is insufficient to comprehensively and accurately define their geographical location; therefore, adjacent second-level geographic location areas need to be introduced as compensation.

[0065] S1013 uses a 3-character identifier for the second-level geolocation area 200 into which the user has fallen as the identifier for the user's geolocation area.

[0066] S1014 uses a 3-character identifier of the second-level geolocation area 200 into which the user has fallen, and a 4-character identifier of the third-level geolocation area 300 surrounding the second-level geolocation area 200 into which the user has fallen, together as the identifier of the user's geolocation area.

[0067] Understandably, supplementing the four characters of the third-level geolocation area 300 surrounding the second-level geolocation area 200 into which the user falls is for any edge of the second-level geolocation area 200. That is, if the user is only less than a first threshold and greater than a second threshold at the left boundary of the second-level geolocation area 200, then only the four characters of the third-level geolocation area at the left boundary of the second-level geolocation area 200 are supplemented.

[0068] S1015 uses the three-character identifier of the second-level geolocation area 200 into which the user has fallen, and the three-character identifier of the second-level geolocation area 200 adjacent to the user's second-level geolocation area 200, together as the identifier of the user's geolocation area.

[0069] Similar to S1014, the 3-character information of the second-level geolocation area 200 to which the user falls is supplemented is for the edge of any second-level geolocation area 200. That is, if the user is only less than the second threshold distance from the left boundary of the second-level geolocation area 200, then only the 3-character information of the second-level geolocation area 200 to which the user falls is supplemented.

[0070] Generally, by expanding the geographic location area as described above, the expected quantity requirement after S103 executes the second index can be met.

[0071] However, the geographical distribution of users and active users is uneven; some regions have a dense concentration of users and active users, while others have a sparse distribution. In actual indexing processes, the vast majority of index requests occur in areas with a dense concentration of users and active users, while the frequency of index requests is correspondingly lower in areas with a sparse concentration. The above method can meet the indexing requirements to a certain extent.

[0072] If the preset number of indexes cannot be met, the geographic location area can be further expanded. For example, the code of the larger first-level area that the user or active user falls into can be used as the identifier of the user's geographic location area.

[0073] In the above embodiments, by introducing redundant geolocation area identifiers in addition to the identifier of the geolocation area where the user falls, the deviation in the hit results that may be caused by the user falling at the edge of the geolocation area is optimized with a small amount of computation.

[0074] S102 integrates the geographic location area identifier and the first index to construct the second index.

[0075] Wherein, the first index is the user's index instruction, and the first index and the second index are vector indexes.

[0076] When a user initiates indexing, the user's current geographic location area identifier is merged with the user's first indexing instruction to form a vector.

[0077] Corresponding to the above embodiments, when fused into a vector, the geographic location area identifier of the user at this moment can be the identifier of the user's geographic location area determined after supplementing redundant identifiers based on the distance between the user's position within the geographic location area and the boundary of the geographic location area.

[0078] For example, if the user falls into the geographic location area and is close to the boundary of the geographic location area, the identifier of the geographic location area into which the user fell and the extended identifier of the geographic location area into which the user fell are combined with the first index to construct the second index.

[0079] For example, if the user falls within the boundaries of multiple adjacent geographic location areas, the identifiers of the multiple adjacent geographic location areas and their extended identifiers are combined with the first index to construct a second index.

[0080] In some embodiments, the vector fused into the second index not only includes the user's current geographic location identifier and the user's indexing command, but may also incorporate the user's attribute features as index dimensions in the vector. For example, user characteristics determined based on past user behavior, or necessary information filled in by the user during registration. By fusing the user's attribute features with the user's current geographic location identifier and the user's indexing command, and through vector similarity calculation during the indexing process, the degree of personalized matching of the indexing results to the user is improved.

[0081] S103 responds to the user's indexing instruction, executes only the second index, and obtains the expected number of index hits.

[0082] In some embodiments, a third vector of an active user is constructed based on the identifier of the active user's real-time geographic location area and the attribute characteristics of the active user. The third vector is used to respond to the user's indexing instruction and, when executing and only executing the second index, to perform vector calculation with the second index to obtain the data indexing result.

[0083] The second index is executed on the vectors of active users. It is understood that when constructing the vectors of active users, the geographical location identifiers of active users should also be introduced, so that when executing the second index, active users that meet the geographical location requirements and the indexing objectives can be selected simultaneously through a vector similarity calculation.

[0084] The construction of active user vectors includes the attribute features of active users and their current geographic location identifier. Attribute features include, for example, user characteristics determined based on past user behavior and necessary information filled in by the user during registration.

[0085] During the execution of the second index, the active user vector, constructed from the attribute features of active users and their current geographic location, is compared with the vector of the second index for vector similarity. After this one and only vector similarity calculation, based on the preset expected number of hits N, the vectors of the N active users with the highest similarity to the second index vector are selected and displayed in descending order of similarity. It is understandable that other rules could also be used to display the N most similar active users, such as based on proximity or the highest relevance of the dimensions involved in the first index.

[0086] Therefore, this embodiment performs vector similarity calculation only once, eliminating the need for filtering steps before or after the similarity calculation. This avoids the two-stage calculation method where the result is filtered based on vectors using a geographic location index as the primary index, or filtered based on geographic distance using a vector index as the primary index. This avoids situations where the final hit count might be far lower than the preset value, or even an empty set. The final hit count can be determined simply by adjusting the preset expected hit count.

[0087] The reconstructed index vector in this embodiment avoids the technical problems caused by two-step indexing of geographic location and vector, while still meeting the requirements of geographic location and vector indexing respectively: first, it satisfies that geographic location determines the search range, and candidates outside the range will definitely not be considered; second, it satisfies the priority of vector data inherent in vector retrieval.

[0088] Furthermore, this embodiment eliminates the need for a combination of multiple rounds of geographic location indexing and vector indexing. Instead, it introduces geographic location information into the reconstructed index vector in the form of characters corresponding to the region, thus avoiding the resource consumption of iterating through the loop until a candidate set of the expected number is obtained.

[0089] Of course, when constructing vectors for indexed active users, similar supplementary identifiers can be added based on the user's geographical location.

[0090] Figure 4 This is a flowchart illustrating how, in an exemplary embodiment, an active user's geographic location area is identified based on the distance between the location of the active user within the geographic location area and the boundary of the geographic location area.

[0091] Please refer to Figure 4 The method for determining the identifier of the geolocation area of ​​an active user based on the distance between the location of the active user within the geolocation area and the boundary of the geolocation area includes:

[0092] S4011 determines the second-level geographic location region 200 where the active user is located.

[0093] Based on determining the second-level geolocation region 200 where the active user is located, obtain a 3-character identifier for the second-level geolocation region 200.

[0094] S4012 calculates the distance between the location of an active user and the boundary of the second-level geographic location area 200.

[0095] If the distance between the location of an active user and the boundary of the second-level geographic location area 200 is greater than the first threshold, then proceed to step S4013.

[0096] If the distance between the location of an active user and the boundary of the second-level geographic location area 200 is less than the first threshold and greater than the second threshold, then proceed to step S4014.

[0097] The first and second thresholds define the active user's location as being at the edge of the second-level geolocation area 200, but at a certain distance from the boundary. Within this area, only the third-level geolocation area 300 needs to be introduced for regional supplementation.

[0098] If the distance between the location of an active user and the boundary of the second-level geographic location area 200 is less than the second threshold, then proceed to step S4015.

[0099] The second threshold limits the location of active users to very close to the edge of their respective second-level geographic location area 200, and may even be located at the boundary of two adjacent second-level geographic location areas 200. Especially if the active user is moving, the determination of the second-level geographic location area 200 where the active user is located in S4011 may even involve a degree of randomness, potentially classifying it into different second-level geographic location areas 200. In this case, simply introducing a third-level geographic location area 300 for supplementation is insufficient to comprehensively and accurately define its geographical location; therefore, adjacent second-level geographic location areas need to be introduced as compensation.

[0100] S4013 uses a 3-character identifier for the second-level geolocation region 200 to which the active user has fallen as the identifier for the active user's geolocation region.

[0101] S4014 uses a 3-character identifier of the second-level geolocation region 200 to which the active user falls, and a 4-character identifier of the third-level geolocation region 300 surrounding the second-level geolocation region 200 to which the active user falls, together as the identifier of the active user's geolocation region.

[0102] Understandably, supplementing the four characters of the third-level geolocation area 300 surrounding the second-level geolocation area 200 into which the active user falls is for any edge of the second-level geolocation area 200. That is, if the active user is only less than the first threshold and greater than the second threshold at the left boundary of the second-level geolocation area 200, then only the four characters of the third-level geolocation area at the left boundary of the second-level geolocation area 200 are supplemented.

[0103] S4015 uses a 3-character identifier of the second-level geolocation area 200 to which the active user falls, and a 3-character identifier of the second-level geolocation area 200 adjacent to the active user's second-level geolocation area 200, together as the identifier of the active user's geolocation area.

[0104] Similar to S4014, the 3-character information of the second-level geolocation region 200 to which the nearby active user falls is added is for the edge of any second-level geolocation region 200. That is, if the distance between the active user and the left boundary of the second-level geolocation region 200 is less than the second threshold, then only the 3-character information of the second-level geolocation region 200 to which the nearby active user falls is added.

[0105] Generally, by expanding the geographic location area as described above, the expected quantity requirement after S103 executes the second index can be met.

[0106] However, the geographical distribution of users and active users is uneven; some regions have a dense concentration of users and active users, while others have a sparse distribution. In actual indexing processes, the vast majority of index requests occur in areas with a dense concentration of users and active users, while the frequency of index requests is correspondingly lower in areas with a sparse concentration. The above method can meet the indexing requirements to a certain extent.

[0107] If the preset number of indexes cannot be met, the geographic location area can be further expanded. For example, the code of the larger first-level area that the user or active user falls into can be used as the identifier of the user's geographic location area.

[0108] The above is a detailed description of the method provided in this application. The following is a detailed description of the apparatus provided in this application in conjunction with embodiments.

[0109] Figure 5 This is a schematic block diagram illustrating a data indexing device as an exemplary embodiment.

[0110] Please refer to Figure 5 A second aspect of the present invention provides a data indexing apparatus, comprising:

[0111] The identifier acquisition unit 501 is configured to acquire the identifier of the geographic location area where the user is located.

[0112] Index building unit 502, configured to merge the geographic location area identifier and the first index to build a second index;

[0113] Wherein, the first index is the user's index instruction;

[0114] The first index and the second index are vector indices;

[0115] Index execution unit 503 is configured to execute, and only execute, the second index in response to the user's index instruction, to obtain the expected number of index hits.

[0116] The apparatus of this embodiment can be used to perform... Figure 1 The technical solutions of the method embodiments shown are similar in principle and in effect, and will not be described again here.

[0117] This embodiment reconstructs an index vector that performs a vector similarity calculation only once, eliminating the need for filtering steps before or after the similarity calculation. This avoids the two-stage calculations that use either a geographic location index as the primary index and filter results based on vectors, or a vector index as the primary index and filter based on geographic distance, which can result in a final hit count far lower than the preset value, or even an empty set. The final hit count can be determined simply by adjusting the preset expected hit count. This embodiment avoids introducing multiple rounds of combinations of geographic location and vector indices, incorporating geographic location information into the reconstructed index vector in the form of region-corresponding characters, thus avoiding the resource consumption of iterating until a candidate set meeting the expected number is obtained.

[0118] This application also provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the steps of any of the information display methods provided in this application.

[0119] Specifically, computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks.

[0120] This application also provides a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the steps of any of the above-described data indexing methods.

[0121] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the information display methods provided in this application.

[0122] Specifically, the electronic device can be a mobile phone, tablet, computer, etc.

[0123] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A data indexing method, characterized in that, include: The identifier of the user's geographic location area is obtained, and the geographic area is divided into multiple levels. The grid division of each level is distinguished by the size of the area. The larger first-level area is composed of multiple smaller second-level areas, and the smaller second-level areas are composed of multiple even smaller third-level areas. Each smaller third-level area, smaller second-level area, and larger first-level area involves a specified code. Based on the distance between the user's position within the geographic location area and the boundary of the geographic location area, the identifier of the user's geographic location area is determined. If the user falls within the boundary of multiple adjacent geographic location areas, the identifiers of the multiple adjacent geographic location areas and the extended identifiers of the multiple adjacent geographic location areas are combined with the first index to construct a second index. Specifically, the three-character identifier of the second-level geolocation area to which the user falls, and the four-character identifier of the third-level geolocation area surrounding the second-level geolocation area, together serve as the identifier of the user's geolocation area. The four-character identifier of the third-level geolocation area surrounding the second-level geolocation area to which the user falls is used as the edge for any second-level geolocation area. The three-character identifier of the second-level geolocation area adjacent to the second-level geolocation area to which the user falls is used as the edge for any second-level geolocation area. The second index is constructed by integrating the geographic location area identifier and the first index; Wherein, the first index is the user's index instruction; The first index and the second index are vector indices; In response to the user's indexing instruction, the second index is executed only, and the expected number of index hits are obtained. The active user vector, which is constructed by the attribute features of the active user and the geographic location area identifier of the active user at this moment, is compared with the vector of the second index. Through a single vector similarity calculation, active users who meet the geographic location requirements and the indexing target are simultaneously selected.

2. The data indexing method according to claim 1, characterized in that, Based on the distance between the user's location within the geographic location area and the boundary of the geographic location area, the identifier of the user's geographic location area is determined as: the identifier of the geographic location area into which the user has landed.

3. The data indexing method according to claim 2, characterized in that, If the user falls into the geographic location area and is close to the boundary of the geographic location area, the identifier of the geographic location area into which the user fell and the extended identifier of the geographic location area into which the user fell are combined with the first index to construct the second index.

4. The data indexing method according to claim 1, characterized in that, Based on the real-time geographic location area identifier and attribute characteristics of active users, a third vector of active users is constructed. The third vector is used to respond to the indexing instruction of the user and, when executing only the second index, to perform vector calculation with the second index to obtain the data indexing result.

5. The data indexing method according to claim 4, characterized in that, Based on the distance between the location of an active user within a geographic location area and the boundary of that geographic location area, the identifier of the active user's real-time geographic location area is determined as: the identifier of the geographic location area into which the active user has fallen.

6. The data indexing method according to claim 5, characterized in that, If the active user falls into the geographic location area and is close to the boundary of the geographic location area, the identifier of the geographic location area into which the active user falls and the extended identifier of the geographic location area into which the active user falls are fused together with the attribute features of the active user to construct the third vector of the active user; And / or, If the active user falls within the boundaries of multiple adjacent geographic location areas, the identifiers of the multiple adjacent geographic location areas and their extended identifiers are fused with the attribute features of the active user to construct the third vector of the active user.

7. The data indexing method according to claim 1, characterized in that, The second index includes the identifier of the user's geographic location area, the first index, and the user's attribute characteristics.

8. A data indexing device, characterized in that, include: An identifier acquisition unit is configured to obtain the identifier of the user's geographic location area. The geographic area is divided into multiple levels, with each level divided into grids based on area size. A larger first-level area is composed of multiple smaller second-level areas, and each smaller second-level area is composed of multiple even smaller third-level areas. Each smaller third-level area, smaller second-level area, and larger first-level area involves a specified code. Based on the distance between the user's location within the geographic location area and the boundary of the geographic location area, the identifier of the user's geographic location area is determined. If the user falls within the boundaries of multiple adjacent geographic location areas, the identifier of those adjacent areas is... The identifier of each geographic location region and the extended identifiers of the adjacent geographic location regions are combined with the first index to construct the second index; wherein, the three-character identifier of the second-level geographic location region to which the user falls and the four-character identifier of the third-level geographic location region surrounding the second-level geographic location region to which the user falls serve as the identifier of the user's geographic location region, and the four-character identifier of the third-level geographic location region surrounding the second-level geographic location region to which the user falls serves as the edge for any second-level geographic location region; the three-character identifier of the second-level geographic location region adjacent to the second-level geographic location region to which the user falls serves as the edge for any second-level geographic location region. An index building unit is configured to fuse the geographic location area identifier and the first index to build a second index; Wherein, the first index is the user's index instruction; The first index and the second index are vector indices; An index execution unit is configured to respond to the user's indexing instruction, execute only the second index, obtain the expected number of index hits, and compare the vector of the active user, which is constructed by the attribute features of the active user and the geographic location area identifier of the active user at this moment, with the vector of the second index. Through a single vector similarity calculation, active users who meet the geographic location requirements and the indexing target are simultaneously selected.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that... When the program is executed by a processor, it implements the steps of the data indexing method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Semantic comprehension-based interest point query method and device and computer equipment

    CN108763293A