Regional user searching method and apparatus, device, and storage medium

By obtaining the vertex position information of the target area and determining the overlapping position area blocks using the position coding algorithm, and quickly finding users in the target area with inverted indexes, the problem of low user search efficiency in the prior art is solved, and efficient area user search is achieved.

WO2025060401A1PCT designated stage expired Publication Date: 2025-03-27CHINA UNIONPAY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/087917
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-09-21
Filing Date
2024-04-16
Publication Date
2025-03-27

AI Technical Summary

Technical Problem

The prior art is less efficient when finding users in the target area, especially when the user base is large, the geofencing method requires multiple ray generation and intersection statistics for each user, resulting in reduced efficiency.

Method used

By obtaining the vertex position information of the target area, a position encoding algorithm is used to determine the position area block that overlaps at least partially with the target area, and combined with the preset inverted index, users in the target area are quickly found to avoid comparing each user with the target area.

Benefits of technology

It improves the efficiency of finding users in selected areas, and can quickly locate users in target areas with a large user base, which is suitable for not only regular-shaped target areas, but also irregular-shaped areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024087917_27032025_PF_FP_ABST
    Figure CN2024087917_27032025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the field of data processing, and discloses a regional user searching method and apparatus, a device and a storage medium. The method comprises: acquiring position information of a vertex of a selected target region; determining a target position regional block on the basis of the position information of the vertex, wherein the target position regional block comprises a position regional block at least partially overlapping the target region, and the position regional block is obtained in advance on the basis of a position coding algorithm; and on the basis of a position code of the target position regional block and a preset inverted index, searching for a user corresponding to the position code of the target position regional block, and determining the found user as a user in the target region, wherein the inverted index comprises the correspondence between the position code and the user.
Need to check novelty before this filing date? Find Prior Art

Description

Regional user search method, device, equipment and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to Chinese patent application No. 202311227847.9, filed on September 21, 2023, entitled “Regional User Search Method, Device, Equipment and Storage Medium,” and the entire contents of that application are incorporated herein by reference. Technical Field

[0003] The present application relates to the field of data processing, and in particular to a method, apparatus, device and storage medium for searching regional users. Background Art

[0004] With the continuous development of electronic information technology, more and more tasks in users' daily lives and work can be performed through electronic devices. For example, electronic payments, membership logins, and transportation can all be performed through electronic devices. To better conduct business and provide more precise services to users, it is necessary to identify users in the target area, provide them with proprietary information, and improve the user experience.

[0005] Currently, geofencing can be used to determine whether a user is located in a target area. Specifically, a virtual geofence is used to create a virtual boundary. A ray is generated along the X-axis for each user's location. The intersections of the ray and the virtual geofence are counted, and the user's location is determined by whether the number of intersections is an odd or even number. The geofencing method requires performing this operation for each user, making it inefficient to find users within the target area, especially when the user base is large. For example, if you want to find users located in a certain square in a city, you need to generate a ray for each user in the city and count the intersections, which greatly reduces the efficiency of finding users within the target area.

[0006] Summary of the Invention

[0007] The embodiments of the present application provide a method, apparatus, device, and storage medium for searching users in a region, which can improve the efficiency of searching users in a selected region.

[0008] In a first aspect, an embodiment of the present application provides a method for searching for regional users, including: obtaining position information of vertices of a selected target area; determining a target position area block based on the position information of the vertices, the target position area block including a position area block that at least partially overlaps with the target area, the position area block being obtained in advance based on a position coding algorithm; searching for a user corresponding to the position coding of the target position area block based on the position coding of the target position area block and a preset inverted index, and determining the found user as a user within the target area, the inverted index including a correspondence between the position coding and the user.

[0009] In a second aspect, an embodiment of the present application provides an area user search device, including: an information acquisition module, used to obtain the position information of the vertices of a selected target area; a target determination module, used to determine the target position area block based on the position information of the vertices, the target position area block including a position area block that at least partially overlaps with the target area, the position area block being obtained in advance based on a position coding algorithm; a user search module, used to search for a user corresponding to the position coding of the target position area block based on the position coding of the target position area block and a preset inverted index, and determine the found user as a user within the target area, the inverted index including the correspondence between the position coding and the user.

[0010] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the regional user search method of the first aspect is implemented.

[0011] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having computer program instructions stored thereon. When the computer program instructions are executed by a processor, the method for searching regional users according to the first aspect is implemented.

[0012] Embodiments of the present application provide a method, apparatus, device, and storage medium for searching regional users. A position coding algorithm can be used to obtain a position region block based on position information. The position information of the vertices of the target region and the position region block obtained based on the position coding algorithm can be used to determine a position region block that at least partially overlaps with the target region. This allows the use of a pre-established inverted index that includes the correspondence between the position codes of the position region blocks and users to search for users corresponding to the position codes of the position region blocks that at least partially overlap with the selected target region. The inverted index includes the correspondence between the position codes of the position region blocks and users. Users corresponding to the position codes of the position region blocks are located in the position region blocks. Therefore, users corresponding to the position codes of the position region blocks that at least partially overlap with the selected target region can be directly determined as users in the target region, without the need to compare each user with the target region. Using the position codes of the position region blocks and the inverted index of users, users in the target region can be efficiently searched, improving the efficiency of searching for users in the selected region. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0014] FIG1 is a flow chart of a method for searching regional users according to an embodiment of the present application;

[0015] FIG2 is a schematic diagram of an example of a target area obtained by circle selection according to an embodiment of the present application;

[0016] FIG3 is a schematic diagram of an example of a location area block and a target area provided in an embodiment of the present application;

[0017] FIG4 is a schematic diagram of an example of an inverted index provided in an embodiment of the present application;

[0018] FIG5 is a schematic diagram of the classification of users in a target area according to an embodiment of the present application;

[0019] FIG6 is a flow chart of a method for searching regional users according to another embodiment of the present application;

[0020] FIG7 is a flowchart of a method for searching regional users according to another embodiment of the present application;

[0021] FIG8 is a schematic diagram of the structure of a regional user search device provided by an embodiment of the present application;

[0022] FIG9 is a schematic structural diagram of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0023] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is merely to provide a better understanding of the present application by illustrating examples of the present application. It should be noted that the acquisition, storage, use, processing, etc. of information and data in the embodiments of the present application are authorized by the user or relevant agencies and comply with the relevant provisions of national laws and regulations.

[0024] With the continuous development of electronic information technology, more and more aspects of users' lives and work can be performed through electronic devices. For example, electronic payments, membership logins, and transportation can all be performed through electronic devices. To better conduct business and provide more precise services to users, it is necessary to identify users within a target area, thereby providing them with proprietary information and improving the user experience. Currently, geofencing can be used to determine whether a user is located in a target area. Specifically, a virtual geofence is used to create a virtual boundary. For each user's location, a ray is generated along the X-axis. The intersection points of the ray with the virtual geofence are counted, and the user's presence is determined by whether the number of intersections is odd or even. The geofencing method requires performing this operation for each user, making it inefficient to find users within the target area, especially when the user base is large. For example, to find users located in a certain square in a city, a ray must be generated for each user in the city and the intersection points counted, significantly reducing the efficiency of finding users within the target area.

[0025] The present application provides a method, apparatus, device, and storage medium for searching regional users. A position coding algorithm can be used to obtain a position region block based on position information. The position information of the vertices of the target region and the position region block obtained based on the position coding algorithm are used to determine the position region block that at least partially overlaps with the target region. A pre-established inverted index, which includes the correspondence between the position coding of the position region block and the user, is then used to search for users corresponding to the position coding of the position region block that at least partially overlaps with the selected target region. Users corresponding to the position coding of the position region block that at least partially overlaps with the selected target region are directly determined as users in the target region, without the need to compare each user with the target region. The position coding of the position region block and the inverted index of the user can efficiently achieve user search in the target region. Furthermore, the method, apparatus, device, and storage medium for searching regional users provided in the embodiments of the present application are applicable not only to target regions of regular shapes such as rectangles, but also to target regions of irregular shapes, thereby improving the applicability of the regional user search method.

[0026] The following describes the regional user search method, device, equipment and storage medium provided by this application.

[0027] In a first aspect, the present application provides a method for searching regional users. The method can be applied to a regional user search device, an electronic device, or the like. Specifically, the method can be executed by the regional user search device, the electronic device, or the like, without limitation. FIG1 is a flowchart of the method for searching regional users according to one embodiment of the present application. As shown in FIG1 , the method for searching regional users may include steps S101 to S103.

[0028] In step S101 , position information of vertices of a selected target area is obtained.

[0029] The selection of the target area can be customized by the user and is not limited to the shape of the target area. The target area can include areas of regular shapes or irregular shapes. In some examples, a target area obtained by calling the circle selection function of an electronic map can be received, and the position information of the vertices of the target area can be obtained. The operator can customize the selected target area through the circle selection function of the electronic map. For example, Figure 2 is a schematic diagram of an example of a target area obtained by circle selection provided in an embodiment of the present application. As shown in Figure 2, the irregular polygon A1A2A3A4A5A1 in the shaded portion is the circled target area.

[0030] The vertices of the target area can be determined based on the specific shape of the target area, and the number of vertices of the target area is not limited. For example, if the target area is the irregular polygon A1A2A3A4A5A1 in Figure 2, the vertices of the target area include vertex A1, vertex A2, vertex A3, vertex A4, and vertex A5. The location information can represent a geographic location and can be implemented as location coordinates in a coordinate system. For example, the location information can include latitude and longitude.

[0031] In step S102 , a target location area block is determined based on the location information of the vertices.

[0032] The target location area block includes a location area block that at least partially overlaps with the target area. The location area block is pre-derived based on a location encoding algorithm. The location encoding algorithm can convert the location information of the location point into the location code of an area block. This area block is referred to as the location area block, and the location point is located in the location area block. The location area blocks located at different locations may be the same location area block or different location area blocks. The location encoding algorithm is not limited herein. For example, the location encoding algorithm may include a GeoHash algorithm, i.e., the location area block is derived based on the GeoHash algorithm.

[0033] The location area block belonging to the target area, namely the target location area block, can be determined based on the location information of the vertices of the target area. In the embodiment of the present application, the target location area block belonging to the target area includes the location area block that is completely located in the target area, and may also include the location area block that partially overlaps with the target area. For example, FIG3 is a schematic diagram of an example of the location area block and the target area provided in the embodiment of the present application, FIG3 shows the location area block ① to the location area block The target location area blocks at least partially overlapping with the target area B1B2B3B4B5B6B7B1 include location area blocks ⑤, location area blocks ⑥, location area blocks ⑦ and location area blocks

[0034] In some examples, a relatively large area can be determined based on the maximum and minimum values ​​of the position information of the vertices of the target area in the coordinate system. The area includes the target position area block and may also include non-target position area blocks. The target position area blocks can be screened in the area to obtain the target position area block.

[0035] In step S103, based on the position code of the target location area block and a preset inverted index, a user corresponding to the position code of the target location area block is searched and the found user is determined as a user in the target area.

[0036] The inverted index includes the correspondence between the position code and the user. The position code can be calculated using the position coding algorithm based on the position information. The position code corresponds to the position area block one by one, and the position codes of different position area blocks are different. The inverted index includes the correspondence between the position code and the user. The position code of the corresponding position area block can be obtained in advance based on the position information of the user's location point, thereby establishing the correspondence between the position code and the user. The users in the inverted index can be represented by user identifiers. After determining the target position area block, the user corresponding to the position code of the target position area block is searched in the inverted index. The user corresponding to the position code of the target position area block may include the user who is currently in the target position area block and / or the user who has appeared in the target position area block. The users in the target area can be quickly found through the inverted index.

[0037] In some examples, based on the position code of the target location area block, the position code in the inverted index that is consistent with the position code of the target location area block can be indexed; and the user corresponding to the position code that is consistent with the position code of the target location area block can be searched in the inverted index. The inverted index may include an index part, a position code part of the location area block, and a user identification part. The index part may adopt a tree structure index or other index, and the structure of the index part may be selected according to the speed requirement of the index. For example, the index part may adopt an indexing method such as a B+ tree. The index part can be used to quickly find the position code in the inverted index that is consistent with the position code of the target location area block, thereby obtaining the user identification corresponding to the position code, and the user identification can represent the user.

[0038] For example, Figure 4 is a schematic diagram of an example of an inverted index provided in an embodiment of the present application. As shown in Figure 4, the index part is implemented as a B+ tree structure, the position code wteye of the position area block corresponds to the user identifier U000001 and the user identifier U000002, and the position code wtf77 of the position area block corresponds to the user identifier U000003; when the position code of the target position area block is obtained as wteye, the index part can be used to quickly find the position code wteye in the position code part, and then determine the corresponding user identifiers U000001 and U000002 in the user identification part according to the position code wteye.

[0039] In some examples, messages specific to a target area can be pushed to users within it. The specific content of the message is relevant to the target area, providing a targeted and improved user experience. For example, a shopping mall can be selected as the target area, and mall promotions can be pushed to users within the target area. Another example is a subway station, where a subway outage notification message can be pushed to users within the target area. Messages can be pushed to users' terminals via SMS or app push, ensuring precise reach.

[0040] In some examples, user information of users within the target area can be obtained and categorized based on this information to facilitate user analysis and provide differentiated services to different categories of users, improving the user experience. Messages corresponding to the categories of users within the target area can be pushed to users in different categories, allowing users to receive messages more relevant to their location and improving the accuracy of message push. For example, Figure 5 is a schematic diagram of the classification of users in a target area provided in an embodiment of the present application. As shown in Figure 5, users in the target area can be classified according to factors of different dimensions. For example, according to factor C, the users in the target area are classified into C1 users accounting for 68.49% and C2 users accounting for 31.51%; according to factor D, the users in the target area are classified into D1 users accounting for 36.45%, D2 users accounting for 46.56%, D3 users accounting for 12.72%, and D4 users accounting for 4.27%; according to factor E, the users in the target area are classified into E1 users accounting for 65.24%, E2 users accounting for 3.93%, E3 users accounting for 1.66%, and E4 users accounting for 29.17%.

[0041] In an embodiment of the present application, a position coding algorithm can be used to obtain a position area block based on position information. The position information of the vertices of the target area and the position area block obtained based on the position coding algorithm can be used to determine the position area block that at least partially overlaps with the target area. A pre-established inverted index, which includes the correspondence between the position codes of the position area blocks and users, can then be used to search for users corresponding to the position codes of the position area blocks that at least partially overlap with the selected target area. The inverted index includes the correspondence between the position codes of the position area blocks and users. Users corresponding to the position codes of the position area blocks are located in the position area blocks. Therefore, users corresponding to the position codes of the position area blocks that at least partially overlap with the selected target area can be directly determined as users in the target area without comparing each user with the target area. Using the position codes of the position area blocks and the inverted index of users, users in the target area can be efficiently searched, improving the efficiency of searching for users in the selected area. Furthermore, based on the position information of the vertices of the target area and the pre-divided position area blocks, users in target areas of various shapes can be searched. The target area can be customized and is not limited to regular shapes such as rectangles. This ensures sufficient accuracy of the target area to a certain extent, making user selection of the target area more flexible and improving the applicability of the regional user search method.

[0042] In some embodiments, the target location area block can be determined based on the maximum and minimum values ​​in the location information of the vertices of the target area, as well as the center position of the location area block. Figure 6 is a flowchart of a method for searching for regional users provided by another embodiment of the present application. The difference between Figure 6 and Figure 1 is that step S102 in Figure 1 can be specifically refined into steps S1021 to S1023 in Figure 6.

[0043] In step S1021 , first maximum position information and first minimum position information in a first direction in the coordinate system and second maximum position information and second minimum position information in a second direction in the coordinate system are acquired from the position information of the vertex.

[0044] The first direction and the second direction are two directions that constitute the coordinate system, and the first direction is different from the second direction. The first maximum position information may be the position information in the first direction with the largest value among the position information of multiple vertices, the first minimum position information may be the position information in the first direction with the smallest value among the position information of multiple vertices, the second maximum position information may be the position information in the second direction with the largest value among the position information of multiple vertices, and the second minimum position information may be the position information in the second direction with the smallest value among the position information of multiple vertices. For example, the position information may include latitude and longitude, the first direction may be the latitude direction, the second direction may be the accuracy direction, the first maximum position information may include the maximum latitude among the latitudes of multiple vertices, the first minimum position information may include the minimum latitude among the latitudes of multiple vertices, the second maximum position information may include the maximum longitude among the longitudes of multiple vertices, and the second minimum position information may include the minimum longitude among the longitudes of multiple vertices.

[0045] In step S1022 , a location area block that at least partially overlaps with the area defined by the first maximum location information, the first minimum location information, the second maximum location information, and the second minimum location information is determined as a candidate location area block.

[0046] Based on the first maximum position information, the first minimum position information, the second maximum position information, and the second minimum position information, a relatively large area can be defined. This area includes the target area, but may not only include the target area. That is, this area may contain target position area blocks that at least partially overlap with the target area, and may also contain position area blocks that do not overlap with the target area. The candidate position area blocks include position area blocks that at least partially overlap with this area. In subsequent steps, the candidate position area blocks need to be screened to determine the target position area block.

[0047] In some examples, the position information of a temporary vertex can be obtained by combining the first maximum position information, the first minimum position information, the second maximum position information, and the second minimum position information; based on the position information of the temporary vertex, a position coding algorithm is used to obtain a position area block corresponding to the temporary vertex; based on the position area block corresponding to the temporary vertex and the arrangement rule of the position area blocks, a candidate position area block that at least partially overlaps with the area defined by the first maximum position information, the first minimum position information, the second maximum position information, and the second minimum position information is determined.

[0048] The position information of the temporary vertex obtained according to the first maximum position information, the first minimum position information, the second maximum position information and the second minimum position information can be respectively (first maximum position information, second maximum position information), (first maximum position information, second minimum position information), (first minimum position information, second maximum position information) and (first minimum position information, second minimum position information). When the first maximum position information and the first minimum position information are latitudes, and the second maximum position information and the second minimum position information are longitudes, the position information of the temporary vertex can be respectively (first maximum latitude, second maximum longitude), (first maximum latitude, second minimum longitude), (first minimum latitude, second maximum longitude) and (first minimum latitude, second minimum longitude). Using the position coding algorithm, the position information of the temporary vertex can be converted into a position code, and the position area block corresponding to the position code can be obtained, that is, the position area block where the temporary vertex is located. The position area block where the temporary vertex is located belongs to the candidate position area block. The position area block is obtained based on the position coding algorithm and has an arrangement rule. According to the arrangement rule, other candidate position area blocks other than the position area block where the temporary vertex is located can be obtained. For example, the arrangement pattern of the position area blocks and the target area are shown in FIG3 , and the position area blocks where the temporary vertex is located are position area blocks ⑤, position area blocks ⑦, and position area blocks And location area block ⑨, according to the arrangement rule of location area blocks, it can be known that location area block ⑥ is between location area block ⑤ and location area block ⑦. Between the location area block ⑨ and the location area block ⑩, correspondingly, the candidate location area blocks may include location area block ⑤, location area block ⑥, location area block ⑦, location area block ⑨, location area block ⑩ and location area block

[0049] In step S1023 , the center position of each candidate position region block is obtained, and the candidate position region block whose center position is within the target region is selected as the target position region block.

[0050] The center position of the candidate location area is located in the target area, indicating that the candidate location area block has a portion overlapping with the target area. Candidate location area blocks whose center positions are outside the target area can be excluded, and candidate location area blocks whose center positions are located in the target area are retained as target location area blocks. For example, the arrangement pattern of the location area blocks and the target area are shown in FIG3 , and the candidate location area blocks include location area blocks ⑤, location area blocks ⑥, location area blocks ⑦, location area blocks ⑨, location area blocks ⑩ and location area blocks The center positions of location area block ⑨ and location area block ⑩ are both outside the target area, and location area block ⑨ and location area block ⑩ cannot be used as target location area blocks. Correspondingly, location area block ⑤, location area block ⑥, location area block ⑦ and location area block Determine the target location area block.

[0051] The above-mentioned method for determining the target location area block can be applied to target areas of various shapes, and can realize the search for users in a customized target area, thereby expanding the applicable scope of the area user search method and further improving the applicability of the area user search method.

[0052] In some embodiments, the location information of the user's location point can be used in advance to establish an inverted index for use in subsequent processes. Figure 7 is a flowchart of a method for searching regional users provided by another embodiment of the present application. The difference between Figure 7 and Figure 1 is that the method for searching regional users shown in Figure 7 can also include steps S104 to S106.

[0053] In step S104, the location information of the user's location point is obtained.

[0054] A user's location may include the user's current location and / or locations the user has previously been. The user's location information can be determined by merchants with whom the user has business interactions, or by the user's terminal itself, by voluntarily uploading the user's location information. In some examples, the location information of a merchant with whom the user has business interactions can be determined as the user's location information; and / or, location information uploaded by the user's terminal in response to a predetermined operation can be determined as the user's location information. Business interactions between a user and a merchant indicate that the user has been at the merchant's location, and the merchant's location information can be used as the user's location information. Business interactions between users and merchants are not limited here; for example, business interactions can be implemented as payment, membership registration, etc. Predefined operations that trigger the upload of location information can also be pre-set in the user's terminal. For example, these predefined operations may include opening an application, requesting a payment code, making a repayment, and other operations, although these are not limited here. When the user terminal executes a predetermined operation, it automatically uploads its current location information.

[0055] In step S105 , a position coding algorithm is used according to the position information of the user's position point to obtain a position code of the position area block where the user's position point is located.

[0056] After obtaining the location information of the user's location point, a location coding algorithm may be used to convert the location information into a location code of a location area block in which the user's location point is located.

[0057] In step S106, an inverted index including the correspondence between the position code of the position area block where the user's position point is located and the user is established.

[0058] A correspondence between the position code obtained in step S105 and the user is established to form an inverted index.

[0059] When the location information of the merchant with whom the user has business interaction is determined to be the location information of the user's location point, that is, when the location information of the user's location point includes the location information of the merchant with whom the user has business interaction, business detail information will be generated during the business interaction between the user and the merchant. A correspondence between the merchant and the user can be established based on the business detail information. The correspondence between the merchant and the user can be specifically implemented as a correspondence between the merchant identifier and the user identifier. The merchant's location information can be used as the location information of the user's location point. Using a location coding algorithm, the merchant's location information can be converted into a location code of a location area block. The user can be considered to be located within the location area block. A correspondence is established between the location code obtained by converting the merchant's location information and the user with whom the merchant has business interaction, that is, a first correspondence is established between the location code of the location area block obtained based on the location information of the merchant with which the user has business interaction and the user. The inverted index includes this first correspondence.

[0060] For example, based on the business interaction between the merchant and the user, the correspondence between the merchant's merchant ID and the user ID of the user interacting with the merchant's business is obtained. The correspondence between the merchant ID and the user ID can be shown in Table 1 below:

[0061] Table 1

[0062] Based on the location information of each merchant, the location code of the location area block where the merchant is located is calculated. When the location information of the merchant is address information, the address information can be first converted into geographic coordinate information, such as latitude and longitude, and then converted into the location code of the location area block. For example, if the address of the merchant is No. 6, XX Avenue, XX City, XX Province, the location code of the location area block corresponding to the merchant can be wteye. Here, a correspondence between the merchant identifier, the user identifier and the location code of the location area block corresponding to the merchant can be established. For example, the correspondence between the merchant identifier, the user identifier and the location code of the location area block corresponding to the merchant can be shown in the following Table 2:

[0063] Table 2

[0064] According to the first correspondence between user identifiers and position codes shown in Table 2, an inverted index as shown in FIG. 4 can be established.

[0065] When the location information uploaded by the user terminal triggered by a predetermined operation is determined to be the location information of the user's location point, that is, when the location information of the user's location point includes the location information uploaded by the user terminal triggered by a predetermined operation, when the user performs a predetermined operation on the user terminal, the user terminal will be triggered to automatically upload the current location information. When the location information automatically uploaded by the user terminal is received, a correspondence between the user, upload time, predetermined operation and location information can be established, and the user can be represented by a user identifier. Using a position coding algorithm, the received location information automatically uploaded by the user terminal is converted into a position code, and the user can be considered to be located in the location area block corresponding to the position code. A correspondence is established between the position code obtained by converting the location information uploaded by the user terminal and the user corresponding to the user terminal, that is, a second correspondence is established between the position code of the location area block obtained according to the location information uploaded by the user terminal triggered by a predetermined operation and the user. The inverted index includes this second correspondence.

[0066] For example, based on the location information uploaded by the user terminal, the corresponding relationship between the user identifier, upload time, scheduled operation and location information can be obtained. The corresponding relationship between the user identifier, upload time, scheduled operation and location information is shown in Table 3 below:

[0067] Table 3

[0068] Based on the location information uploaded by the user terminal, the location code of the location area block where the user is located is calculated. A corresponding relationship between the user identifier, location information, and the location code of the location area block is established. The corresponding relationship between the user identifier, location information, and the location code of the location area block can be shown in the following table 4:

[0069] Table 4

[0070] According to the second correspondence between user identifiers and position codes shown in Table 4, an inverted index as shown in FIG. 4 can be established.

[0071] In some examples, the location information of the user's location point includes the location information of the merchant with whom the user has business interactions and the location information uploaded by the user terminal triggered by a predetermined operation. Correspondingly, a first correspondence between the location code of the location area block obtained based on the location information of the merchant with which the user has business interactions and the user can be established; a second correspondence between the location code of the location area block obtained based on the location information uploaded by the user terminal triggered by a predetermined operation and the user can be established; and the union of the first correspondence and the second correspondence is determined as an inverted index. In the same location area block, the user who has business interactions with the merchant and the user of the user terminal that uploaded the location information may overlap. The first correspondence and the second correspondence can be deduplicated, and the union of the first correspondence and the second correspondence can be used as an inverted index.

[0072] FIG8 is a schematic diagram of the structure of the regional user search device provided in one embodiment of the present application. As shown in FIG8 , the regional user search device 200 may include an information acquisition module 201 , a target determination module 202 , and a user search module 203 .

[0073] The information acquisition module 201 may be used to acquire position information of vertices of a selected target area.

[0074] The target determination module 202 may be configured to determine a target location area block according to vertex location information. The target location area block includes a location area block at least partially overlapping with the target area. The location area block is pre-obtained based on a location encoding algorithm.

[0075] In some examples, the location area block is obtained based on a GeoHash algorithm.

[0076] The user search module 203 may be configured to search for a user corresponding to the position code of the target location area block according to the position code of the target location area block and a preset inverted index, and determine the found user as a user within the target area. The inverted index includes a correspondence between the position code and the user.

[0077] In an embodiment of the present application, a position coding algorithm can be used to obtain a position area block based on position information. The position information of the vertices of the target area and the position area block obtained based on the position coding algorithm can be used to determine the position area block that at least partially overlaps with the target area. A pre-established inverted index, which includes the correspondence between the position codes of the position area blocks and users, can then be used to search for users corresponding to the position codes of the position area blocks that at least partially overlap with the selected target area. The inverted index includes the correspondence between the position codes of the position area blocks and users. Users corresponding to the position codes of the position area blocks are located in the position area blocks. Therefore, users corresponding to the position codes of the position area blocks that at least partially overlap with the selected target area can be directly determined as users in the target area without comparing each user with the target area. Using the position codes of the position area blocks and the inverted index of users, users in the target area can be efficiently searched, improving the efficiency of searching for users in the selected area. Furthermore, based on the position information of the vertices of the target area and the pre-divided position area blocks, users in target areas of various shapes can be searched. The target area can be customized and is not limited to regular shapes such as rectangles. This ensures sufficient accuracy of the target area to a certain extent, making user selection of the target area more flexible and improving the applicability of the regional user search method.

[0078] In some embodiments, the target determination module 202 can be specifically used to: obtain the first maximum position information, the first minimum position information in the first direction in the coordinate system and the second maximum position information, the second minimum position information in the second direction in the coordinate system from the position information of the vertex; determine the position area block that at least partially overlaps with the area defined by the first maximum position information, the first minimum position information, the second maximum position information and the second minimum position information as a candidate position area block; obtain the center position of each candidate position area block, and select the candidate position area block whose center position is within the target area as the target position area block.

[0079] In some examples, the target determination module 202 can be specifically used to: obtain the position information of the temporary vertex based on the first maximum position information, the first minimum position information, the second maximum position information, and the second minimum position information; based on the position information of the temporary vertex, use the position coding algorithm to obtain the position area block corresponding to the temporary vertex; based on the position area block corresponding to the temporary vertex and the arrangement rule of the position area block, determine the candidate position area block that at least partially overlaps with the area defined by the first maximum position information, the first minimum position information, the second maximum position information, and the second minimum position information.

[0080] In some embodiments, the user search module 203 can be specifically used to: index to the position code in the inverted index that is consistent with the position code of the target position area block according to the position code of the target position area block; and search the inverted index for the user corresponding to the position code that is consistent with the position code of the target position area block.

[0081] In some embodiments, the regional user search device 200 may further include a user information acquisition module, an encoding module, and an index creation module.

[0082] The user information acquisition module can be used to obtain the location information of the user's location point.

[0083] The encoding module may be configured to obtain a position code of a location area block where the user's location point is located using a position encoding algorithm according to the location information of the user's location point.

[0084] The index building module may be configured to build an inverted index including a correspondence between a position code of a location area block where a user's location point is located and the user.

[0085] In some examples, the user information acquisition module can be specifically used to: determine the location information of the merchant with which the user interacts as the location information of the user's location point; and / or determine the location information uploaded by the user terminal triggered by a predetermined operation as the location information of the user's location point.

[0086] In some examples, the location information of the user's location point includes the location information of a merchant with which the user interacts and location information uploaded by the user terminal as a result of a predetermined operation. The index establishment module may be specifically configured to: establish a first correspondence between a location code of a location area block obtained based on the location information of the merchant with which the user interacts and the user; establish a second correspondence between the location code of the location area block obtained based on the location information uploaded by the user terminal as a result of a predetermined operation and the user; and determine the union of the first correspondence and the second correspondence as an inverted index.

[0087] In some embodiments, the information acquisition module 201 may be specifically configured to: receive a target area obtained by calling a circle selection function of an electronic map; and acquire position information of vertices of the target area.

[0088] In some embodiments, the regional user search device 200 may further include a message sending module. The message sending module may be configured to push a message corresponding to the target region to users in the target region.

[0089] A third aspect of the present application further provides a regional user search device. FIG9 is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application. As shown in FIG9 , electronic device 300 includes memory 301, processor 302, and a computer program stored in memory 301 and executable on processor 302.

[0090] In some examples, the processor 302 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0091] The memory 301 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the regional user search method according to the embodiment of the present application.

[0092] The processor 302 reads the executable program code stored in the memory 301 to run a computer program corresponding to the executable program code, so as to implement the regional user search method in the above embodiment.

[0093] In some examples, the electronic device 300 may further include a communication interface 303 and a bus 304. As shown in FIG9, the memory 301, the processor 302, and the communication interface 303 are connected via the bus 304 and communicate with each other.

[0094] The communication interface 303 is mainly used to implement communication between the modules, devices, units and / or equipment in the embodiment of the present application. Input devices and / or output devices can also be connected through the communication interface 303.

[0095] Bus 304 includes hardware, software, or both that couples components of electronic device 300 to each other. By way of example, and not limitation, bus 304 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or a combination of two or more of the above. Bus 304 may include one or more buses, where appropriate. Although embodiments herein describe and illustrate a particular bus, this application contemplates any suitable bus or interconnect.

[0096] In a fourth aspect, the present application further provides a computer-readable storage medium having computer program instructions stored thereon. When executed by a processor, the computer program instructions can implement the regional user search method in the above-described embodiment and achieve the same technical effect. To avoid repetition, the above-described computer-readable storage medium may include a non-transitory computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc., and is not limited here.

[0097] An embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the regional user search method in the above embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0098] It should be understood that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. For device embodiments, equipment embodiments, computer-readable storage medium embodiments, and computer program product embodiments, the relevant parts can be referred to the description section of the method embodiment. This application is not limited to the specific steps and structures described above and shown in the figures. Those skilled in the art can make various changes, modifications and additions, or change the order of the steps after understanding the spirit of this application. In addition, for the sake of brevity, a detailed description of known method technologies is omitted here.

[0099] Aspects of the present application have been described above with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed via the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. This processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit. It is also understood that each box in the block diagram and / or the flowchart and the combination of the boxes in the block diagram and / or the flowchart can also be implemented by the dedicated hardware that performs the specified function or action, or can be implemented by the combination of dedicated hardware and computer instructions.

[0100] Those skilled in the art should understand that the above embodiments are illustrative rather than restrictive. Different technical features appearing in different embodiments can be combined to achieve beneficial effects. Based on a study of the drawings, the specification and the claims, those skilled in the art should be able to understand and implement other variations of the disclosed embodiments. In the claims, the term "comprising" does not exclude other devices or steps; the quantifier "one" does not exclude a plurality; the terms "first" and "second" are used to identify names rather than to indicate any specific order. Any figure marks in the claims should not be understood as limiting the scope of protection. The functions of multiple parts appearing in the claims can be implemented by a separate hardware or software module. The fact that certain technical features appear in different dependent claims does not mean that these technical features cannot be combined to achieve beneficial effects.

Claims

1. A method for searching regional users, comprising: Get the position information of the vertices of the selected target area; Determine a target position area block according to the position information of the vertex, wherein the target position area block includes a position area block at least partially overlapping with the target area, and the position area block is obtained in advance based on a position coding algorithm; According to the position code of the target position area block and a preset inverted index, a user corresponding to the position code of the target position area block is found, and the found user is determined as a user in the target area, wherein the inverted index includes a correspondence between the position code and the user.

2. The method according to claim 1, wherein: The step of determining the target location area block according to the location information of the vertex includes: Acquire first maximum position information and first minimum position information of a first direction in the coordinate system and second maximum position information and second minimum position information of a second direction in the coordinate system from the position information of the vertex; Determine the location area block that at least partially overlaps with the area defined by the first maximum location information, the first minimum location information, the second maximum location information, and the second minimum location information as a candidate location area block; The center position of each candidate position area block is obtained, and the candidate position area block whose center position is located in the target area is selected as the target position area block.

3. The method according to claim 2, wherein: The determining, as a candidate location area block, the location area block that at least partially overlaps with the area defined by the first maximum location information, the first minimum location information, the second maximum location information, and the second minimum location information, comprises: Combining the first maximum position information, the first minimum position information, the second maximum position information and the second minimum position information to obtain position information of a temporary vertex; Based on the position information of the temporary vertex, using a position coding algorithm, obtaining the position area block corresponding to the temporary vertex; According to the position area block corresponding to the temporary vertex and the arrangement rule of the position area block law, determining the candidate position area block that at least partially overlaps with the area defined by the first maximum position information, the first minimum position information, the second maximum position information, and the second minimum position information.

4. The method according to claim 1, wherein: The step of searching for a user corresponding to the position code of the target position area block according to the position code of the target position area block and a preset inverted index includes: According to the position code of the target position area block, indexing to the position code in the inverted index that is consistent with the position code of the target position area block; The inverted index is searched for a user corresponding to a position code that is consistent with the position code of the target position area block.

5. The method according to claim 1, further comprising: Get the location information of the user's location point; According to the location information of the user's location point, using a location coding algorithm, obtain a location code of the location area block where the user's location point is located; The inverted index including the correspondence between the position code of the position area block where the user's position point is located and the user is established.

6. The method according to claim 5, wherein: The step of obtaining the location information of the user's location point includes: Determine the location information of the merchant with which the user has business interaction as the location information of the user's location point; and / or, The location information uploaded by the user terminal triggered by the predetermined operation is determined as the location information of the user's location point.

7. The method according to claim 5, wherein: The location information of the user's location point includes the location information of the merchant with whom the user has business interaction and the location information uploaded by the user terminal triggered by a predetermined operation. The step of establishing the inverted index including the correspondence between the position code of the location area block where the user's position point is located and the user includes: Establish the location area obtained based on the location information of the merchant with whom the user has business interaction The position encoding of the block corresponds to the first correspondence of the user; Establishing a second correspondence between the position code of the location area block obtained according to the location information uploaded by the user terminal triggered by a predetermined operation and the user; A union of the first corresponding relationship and the second corresponding relationship is determined as the inverted index.

8. The method according to claim 1, wherein: The step of obtaining the position information of the vertices of the selected target area includes: Receiving the target area obtained by calling a circle selection function of an electronic map; The position information of the vertices of the target area is obtained.

9. The method according to claim 1, further comprising: A message corresponding to the target area is pushed to users in the target area.

10. The method according to any one of claims 1 to 9, wherein: The location area block is obtained based on the GeoHash algorithm.

11. A regional user search device, comprising: An information acquisition module, used to acquire position information of vertices in a selected target area; A target determination module, configured to determine a target position area block according to the position information of the vertex, wherein the target position area block includes a position area block at least partially overlapping with the target area, and the position area block is obtained in advance based on a position coding algorithm; A user search module is used to search for a user corresponding to the position code of the target position area block according to the position code of the target position area block and a preset inverted index, and determine the found user as a user in the target area, wherein the inverted index includes a correspondence between the position code and the user.

12. An electronic device comprising: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for searching regional users according to any one of claims 1 to 10 is implemented.

13. A computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement the regional user search method as described in any one of 1 to 10.

Citation Information

Patent Citations

  • Intelligent service pushing method and device based on Redis and computer equipment

    CN112948674A

  • Target position user query method and device, equipment and storage medium

    CN116776010A

  • Regional user searching method and device, equipment and storage medium

    CN117251647A

  • Smart geo-fencing using location sensitive product affinity

    US20180232767A1