Method and device for determining target object, electronic device and storage medium
By traversing node information in the social media data index structure, selecting child nodes that meet topics and geographical conditions, and determining candidate objects, the problems of low query efficiency and long time-consuming search in social media data in the prior art are solved, and the effect of efficiently screening influential local users is achieved.
Patent Information
- Application Number
- CN202111275195.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2025-05-23
- Estimated Expiration
- 2041-10-29
AI Technical Summary
The prior art searches for local users in designated topic areas from social media data, and the query is less efficient and takes longer.
By obtaining the target topic tag, the geographical location and preset range of the target area, traversing the node information of the data index structure, selecting child nodes that meet the conditions, and when determining that the minimum number of external rectangles contained in the child node is 1, the candidate object is determined, and finally selecting the target object that meets the preset conditions from the candidate object.
It realizes efficient screening of influential local users who meet topics and distance conditions, improves query efficiency, saves time, and solves the problems of low query efficiency and long time.
Smart Images

Figure CN114048394B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data search, and in particular to a method and device for determining a target object, an electronic device, and a storage medium. Background Art
[0002] Social media data can be used for many applications, such as social network relationship analysis, public opinion analysis, user sentiment analysis, and hot event detection. At the same time, as a leading social media service, Weibo generates massive amounts of social media data every day. The number of words in each Weibo post is limited to a certain number. Compared with traditional web pages, Weibo contains less content information, so the search behavior on Weibo is also different from web searches. For example, many users are more interested in searching for information on local Weibo, rather than entering keywords and searching the entire network like web searches.
[0003] Currently, when searching for influential local users in a specified topic area from social media data, a common practice is to enter the search topic tag, obtain multiple user lists, sort the user lists, and then select the top N users from the sorted user lists based on the local geographic location. This search method has the problems of low query efficiency and long time consumption. Summary of the invention
[0004] The present application provides a method and device for determining a target object, a storage medium and an electronic device, so as to at least solve the problems of low query efficiency and long time consumption in the related art.
[0005] According to one aspect of an embodiment of the present application, a method for determining a target object is provided, the method comprising: when searching for a target object with influence on a target topic in a target area, obtaining a target topic label, a geographical location of the target area, and a preset range from the geographical location; traversing from a root node of a data index structure to obtain information of each node in the data index structure, wherein the node information comprises geographical coordinates of two sets of minimum bounding rectangles and a bitmap of each set of geographical coordinates, the minimum bounding rectangle being cyclically generated by geographical coordinates of a plurality of reference objects and a bounding rectangle determined based on a rectangle composed of the geographical coordinates, and the bitmap being determined by a reference topic label of the reference object; selecting a child node from the node information that satisfies the target topic label, the geographical location, and the preset range; when determining that the number of current minimum bounding rectangles contained in the child node is 1, determining the reference object contained in the current minimum bounding rectangle as a candidate object; and selecting an object that satisfies preset conditions from the candidate objects as the target object.
[0006] According to another aspect of an embodiment of the present application, a device for determining a target object is also provided, the device comprising: a first acquisition unit, for acquiring a target topic label, a geographical location of the target area, and a preset range from the geographical location when searching for a target object with influence on a target topic in a target area; a second acquisition unit, for traversing from a root node of a data index structure to acquire information of each node in the data index structure, wherein the node information comprises two sets of geographical coordinates of minimum bounding rectangles and a bitmap of each set of geographical coordinates, the minimum bounding rectangle being cyclically generated by geographical coordinates of a plurality of reference objects and a bounding rectangle determined based on a rectangle composed of the geographical coordinates, and the bitmap being determined by a reference topic label of the reference object; a selection unit, for selecting a child node that satisfies the target topic label, the geographical location, and the preset range from the node information; a first determination unit, for determining the reference object contained in the current minimum bounding rectangle as a candidate object when it is determined that the number of current minimum bounding rectangles contained in the child node is 1; and a selection unit, for selecting an object that satisfies a preset condition from the candidate objects as the target object.
[0007] Optionally, the device also includes: a third acquisition unit, used to obtain the longitude coordinates and latitude coordinates of the locations of multiple reference objects before traversing from the root node of the data index structure to obtain the information of each node in the data index structure; a second determination unit, used to obtain the longitude coordinates and latitude coordinates of multiple groups of reference objects, and determine multiple first rectangles, wherein each group of reference objects contains two reference objects, and the distance between any two reference objects in each group of reference objects is less than a first threshold; a first obtaining unit, used to select two of the first rectangles according to the second threshold, combine them in pairs, and use the longitude coordinates and latitude coordinates of each combined rectangle to generate a minimum circumscribed rectangle to obtain multiple second rectangles, wherein the node where the second rectangle is located is used as the parent node of the node where the rectangle is located after the pairwise combination, and the second The threshold is used to indicate that the distance between two of the first rectangles is the minimum; the second obtaining unit is used to select two of the second rectangles according to the third threshold, combine them in pairs, and use the longitude coordinates and latitude coordinates of each combined rectangle to generate a minimum enclosing rectangle to obtain multiple third rectangles, wherein the node where the third rectangle is located is used as the parent node of the node where the rectangles are located after the combination in pairs, and the third threshold is used to indicate that the distance between two of the second rectangles is the minimum; the third obtaining unit is used to stop the cyclic generation of the minimum enclosing rectangle when the number of the third rectangles is 1, obtain a data index structure of a binary tree structure, and use the current node where the third rectangle is located as the root node of the data index structure; or, when the number of the third rectangles is not 1, cyclically generate the minimum enclosing rectangle.
[0008] Optionally, the second determining unit includes: a module for taking the longitude coordinates and the latitude coordinates of each group of the reference objects as two coordinate points of a diagonal line; and an establishing module for establishing the first rectangle according to the two coordinate points of the diagonal line.
[0009] Optionally, the third obtaining unit includes: a first obtaining module, used to obtain the bitmap corresponding to the first rectangle, the bitmap corresponding to the second rectangle, and the bitmap corresponding to the third rectangle; a writing module, used to write the longitude coordinates, latitude coordinates and corresponding bitmap of the first rectangle, the longitude coordinates, latitude coordinates and corresponding bitmap of the second rectangle, and the longitude coordinates, latitude coordinates and corresponding bitmap of the third rectangle into the data index structure.
[0010] Optionally, the first acquisition module includes: a first acquisition subunit, used to obtain the reference topic label and the preset topic space set of the reference object; a matching subunit, used to match the reference topic label according to the sorting of multiple topic parameters in the preset topic space set to obtain a bitmap of each reference object; a writing subunit, used to write the bitmap of the reference object contained in the first rectangle into the node corresponding to the first rectangle as the bitmap of the first rectangle; a first processing subunit, used to perform a union process on the bitmaps of the two reference objects contained in the first rectangle, and write the bitmap after the union process into the node corresponding to the second rectangle. The first processing unit is configured to process the bitmaps of the two first rectangles contained in the second rectangle, and write the bitmap after the union into the node corresponding to the third rectangle as the bitmap of the third rectangle, wherein each node corresponding to the third rectangle contains two groups of bitmaps of the second rectangle, and each group of bitmaps of the second rectangle is obtained by the union of the bitmaps of the two first rectangles. The second processing subunit is configured to process the bitmaps of the two first rectangles contained in the second rectangle, and write the bitmap after the union into the node corresponding to the third rectangle as the bitmap of the third rectangle, wherein each node corresponding to the third rectangle contains two groups of bitmaps of the second rectangle, and each group of bitmaps of the second rectangle is obtained by the union of the bitmaps of the two first rectangles.
[0011] Optionally, the unit includes: a second acquisition module, used to obtain the influence value of the candidate object; an acquisition module, used to sort the influence values from large to small to obtain a sorting result; and a determination module, used to select a pre-set candidate object from the sorting result and determine it as the target object.
[0012] Optionally, the second acquisition module includes: a second acquisition sub-unit, used to acquire social media data of the candidate object, wherein the social media data includes: the total number of reposts and the total number of replies of the published documents; and an acquisition sub-unit, used to determine the average value of the total number of reposts and the total number of replies to obtain the influence value of the candidate object.
[0013] According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein the memory is used to store a computer program; and the processor is used to execute the method steps in any of the above embodiments by running the computer program stored in the memory.
[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the method steps in any of the above embodiments when executed.
[0015] The present application can be applied to the organization, storage and query of text data with spatiotemporal attributes. In an embodiment of the present application, by searching for target objects with influence on a target topic in a target area, the target topic label, the geographical location of the target area, and the preset range from the geographical location are obtained; traversal is started from the root node of the data index structure to obtain information of each node in the data index structure, wherein the node information includes two sets of geographical coordinates of minimum bounding rectangles and a bitmap of each set of geographical coordinates, the minimum bounding rectangle is cyclically generated by the geographical coordinates of multiple reference objects and the bounding rectangle determined based on the rectangle composed of the geographical coordinates, the bitmap is determined by the reference topic label of the reference object, and the reference topic label is used to characterize the portrait of the reference object; a sub-node that meets the target topic label, geographical location and preset range is selected from the node information; when it is determined that the number of current minimum bounding rectangles contained in the sub-node is 1, the reference object contained in the current minimum bounding rectangle is determined as a candidate object; an object that meets the preset conditions is selected from the candidate objects as the target object. Since the embodiment of the present application first obtains the target topic label, the geographic location of the target area, and the preset range from the geographic location, and then starts from the root node of the generated data index structure, traverses each node information, compares each node information with the target topic label, the geographic location of the target area, and the preset range, and obtains the child nodes that meet these conditions, and then determines that the number of the minimum bounding rectangles contained in these child nodes is 1, the reference object contained in the current minimum bounding rectangle is used as a candidate object, and finally the target object is selected from the candidate objects based on the preset conditions. The embodiment of the present application can directly screen out multiple local users with influence who meet the topic and distance conditions, with high query efficiency, saving time, and solving the problem of low query efficiency and long time consumption caused by the search method in the related technology. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0018] Figure 1 is a schematic diagram of a hardware environment of an optional method for determining a target object according to an embodiment of the present invention;
[0019] Figure 2 is a flowchart of an optional method for determining a target object according to an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of an optional data index structure according to an embodiment of the present application;
[0021] Figure 4 is a schematic diagram of an optional process of generating a minimum circumscribed rectangle according to an embodiment of the present application;
[0022] Figure 5 is a structural block diagram of an optional device for determining a target object according to an embodiment of the present application;
[0023] Figure 6 It is a structural block diagram of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] According to one aspect of an embodiment of the present application, a method for determining a target object is provided. Optionally, in this embodiment, the method for determining a target object can be applied to Figure 1 In the hardware environment shown in the figure. Figure 1 As shown, the terminal 102 may include a memory 104, a processor 106, and a display 108 (optional component). The terminal 102 may be connected to a server 112 via a network 110 for communication. The server 112 may be used to provide services (such as game services, application services, etc.) for the terminal or a client installed on the terminal. A database 114 may be set on the server 112 or independently of the server 112 to provide data storage services for the server 112. In addition, a processing engine 116 may be running in the server 112, and the processing engine 116 may be used to execute the steps executed by the server 112.
[0027] Optionally, the terminal 102 may be, but is not limited to, a terminal that can calculate data, such as a mobile terminal (e.g., a mobile phone, a tablet computer), a laptop, a PC (Personal Computer), etc. The above network may include, but is not limited to, a wireless network or a wired network. The wireless network includes: Bluetooth, WIFI (Wireless Fidelity) and other networks that implement wireless communication. The above wired network may include, but is not limited to: a wide area network, a metropolitan area network, and a local area network. The above server 112 may include, but is not limited to, any hardware device that can perform calculations.
[0028] In addition, in this embodiment, the above target object determination method can also be applied to, but not limited to, an independent processing device with a relatively powerful processing capability without data interaction. For example, the processing device can be, but not limited to, a terminal device with a relatively powerful processing capability, that is, each operation in the above target object determination method can be integrated into an independent processing device. The above is only an example, and this embodiment does not make any limitation to this.
[0029] Optionally, in this embodiment, the above-mentioned method for determining the target object may be executed by the server 112, or by the terminal 102, or by both the server 112 and the terminal 102. The method for determining the target object of the embodiment of the present application may be executed by the terminal 102 or by a client installed thereon.
[0030] Take running on the server as an example, Figure 2 is a flow chart of an optional method for determining a target object according to an embodiment of the present application, such as Figure 2 As shown, the process of the method may include the following steps:
[0031] Step S201, when searching for a target object with influence on a target topic in a target area, obtain a target topic tag, a geographical location of the target area, and a preset range from the geographical location.
[0032] Optionally, in an embodiment of the present application, when you want to query a target object with influence on a target topic in a target area, you need to first filter out the set query conditions, for example, obtain the target topic label (such as a painting), the geographical location of the target area (such as longitude 20, latitude 20), and a certain preset range (such as r kilometers) from the geographical location of the target area. It should be explained that the target topic label is actually a topic that you want to query, and this topic can represent the current user's character portrait, interest tendency, data classification, etc.
[0033] Step S202, traverse from the root node of the data index structure to obtain information of each node in the data index structure, wherein the node information includes two sets of geographic coordinates of minimum bounding rectangles and a bitmap of each set of geographic coordinates, the minimum bounding rectangle is cyclically generated by the geographic coordinates of multiple reference objects and the bounding rectangle determined based on the rectangle composed of the geographic coordinates, and the bitmap is determined by the reference topic tag of the reference object.
[0034] Optionally, the embodiment of the present application may be based on a data index structure (such as Figure 3 As shown), we first query from the root node of the data index structure ( Figure 3 The traversal starts from the N7 node in the data index structure, and then obtains the node information of each data index structure (N6, N5, N4, N3, N2, N1) in turn. Each node information should contain two sets of minimum bounding rectangles and a bitmap of each set of geographic coordinates. The minimum bounding rectangle is generated by the geographic coordinates of multiple reference objects and the bounding rectangle determined by the rectangle composed of geographic coordinates. The bitmap is determined by the reference topic label of the reference object.
[0035] It should be noted that the data index structure is established before searching for the target object; the reference object refers to multiple user objects collected in advance when constructing the data index structure; each reference object corresponds to multiple topic tags and also has its own geographical location, where the geographical location refers to the longitude coordinates and latitude coordinates, which are obtained by obtaining the location of the user's login location (if there are multiple locations, the most frequently occurring one is taken); the bitmap is generated based on multiple topic tags. As shown in Table 1 below, Table 1 shows the geographical locations (i.e. longitude, latitude), topic lists (i.e. classification labels selected by users for themselves), and influence scores (i.e. the average number of reposts and comment replies obtained for each article published by it, such as Weibo). The bitmap is calculated based on the topic list of each reference object, and the method of obtaining the bitmap will be described in subsequent embodiments.
[0036] In addition, the embodiments of the present application include but are not limited to the 8 reference objects shown in Table 1. The embodiments of the present application only use the 8 reference objects in Table 1 as examples.
[0037] Table 1
[0038]
[0039] As can be seen from Table 1, each user has four attributes: longitude, latitude, topic list, and influence score.
[0040] Step S203, selecting a sub-node that meets the target topic tag, geographic location and preset range from the node information.
[0041] Optionally, the embodiment of the present application selects sub-nodes that can meet the above-set multiple query conditions from each node information, that is, the sub-nodes need to meet the target topic label, geographical location and preset range. Figure 3 As shown, the graph contains node information: N1, N2, N3, N4, N5, N6, N7, where N7 is the root node and N1, N2, N3, N4, N5, N6 can be called child nodes.
[0042] Step S204: when it is determined that the number of the current minimum bounding rectangle contained in the child node is 1, the reference object contained in the current minimum bounding rectangle is determined as a candidate object.
[0043] Optionally, after determining that the obtained sub-nodes satisfy the target topic tag, geographic location and preset range, it is also necessary to query the number of current minimum enclosing rectangles contained in these sub-nodes. When it is determined that the number of current minimum enclosing rectangles contained in the sub-nodes is 1, it means that the current sub-node contains only one reference object, that is, it contains only one user, that is, the user himself. At this time, multiple reference objects contained in the current minimum enclosing rectangle are determined as candidate objects.
[0044] Step S205: Select an object that meets a preset condition from the candidate objects as the target object.
[0045] Optionally, the embodiment of the present application sets a preset condition and selects an object that meets the preset condition from multiple candidate objects as a target object, wherein the number of target objects is usually multiple, so that a certain number of influential target objects can be obtained.
[0046] Following the target object with local influence, other users can pay attention to the offline activity messages released by the target object, as well as its comments on local events / products to obtain the information they need.
[0047] In order to avoid confusion in names, it needs to be explained that in the embodiment of the present application and subsequent embodiments, "object" is "user", "reference object A...reference object H" is "user A...user H", and "target object" is "target user".
[0048] In an embodiment of the present application, by searching for target objects that have influence on the target topic in the target area, the target topic label, the geographical location of the target area, and the preset range from the geographical location are obtained; traversal is started from the root node of the data index structure to obtain information of each node in the data index structure, wherein the node information includes two sets of geographical coordinates of minimum bounding rectangles and a bitmap of each set of geographical coordinates, the minimum bounding rectangle is cyclically generated by the geographical coordinates of multiple reference objects and the bounding rectangle determined based on the rectangle composed of the geographical coordinates, the bitmap is determined by the reference topic label of the reference object, and the reference topic label is used to characterize the portrait of the reference object; sub-nodes that meet the target topic label, geographical location and preset range are selected from the node information; when it is determined that the number of current minimum bounding rectangles contained in the sub-node is 1, the reference object contained in the current minimum bounding rectangle is determined as a candidate object; and an object that meets the preset conditions is selected from the candidate objects as the target object. Since the embodiment of the present application first obtains the target topic label, the geographic location of the target area, and the preset range from the geographic location, and then starts from the root node of the generated data index structure, traverses each node information, compares each node information with the target topic label, the geographic location of the target area, and the preset range, and obtains the child nodes that meet these conditions, and then determines that the number of the minimum bounding rectangles contained in these child nodes is 1, the reference object contained in the current minimum bounding rectangle is used as a candidate object, and finally the target object is selected from the candidate objects based on the preset conditions. The embodiment of the present application can directly screen out multiple local users with influence who meet the topic and distance conditions, with high query efficiency, saving time, and solving the problem of low query efficiency and long time consumption caused by the search method in the related technology.
[0049] As an optional embodiment, before traversing from the root node of the data index structure to obtain information of each node in the data index structure, the method further includes:
[0050] Obtaining the longitude and latitude coordinates of the locations of multiple reference objects;
[0051] Acquire longitude coordinates and latitude coordinates of multiple groups of reference objects, and determine multiple first rectangles, wherein each group of reference objects includes two reference objects, and the distance between any two reference objects in each group of reference objects is less than a first threshold;
[0052] Select two first rectangles according to the second threshold, combine them in pairs, and generate a minimum circumscribed rectangle using the longitude and latitude coordinates of each combined rectangle to obtain multiple second rectangles, wherein the node where the second rectangle is located is used as the parent node of the node where the two combined rectangles are located, and the second threshold is used to indicate that the distance between the two first rectangles is the minimum;
[0053] Select two second rectangles according to the third threshold, combine them in pairs, and generate a minimum circumscribed rectangle using the longitude and latitude coordinates of each combined rectangle to obtain multiple third rectangles, wherein the node where the third rectangle is located is used as the parent node of the node where the rectangles are located after the combination in pairs, and the third threshold is used to indicate that the distance between the two second rectangles is the minimum;
[0054] When the number of third rectangles is 1, stop the loop generation of the minimum enclosing rectangle, obtain the data index structure of the binary tree structure, and use the current node where the third rectangle is located as the root node of the data index structure; or, when the number of third rectangles is not 1, loop the generation of the minimum enclosing rectangle.
[0055] Alternatively, see Figure 3 As well as the contents of Table 1, the embodiment of the present application first obtains the longitude and latitude coordinates of the locations of the eight reference objects in Table 1, and then uses the first threshold as the critical value, and takes two reference objects whose distance between each two reference objects is less than the first threshold as a group, so as to obtain multiple groups of reference objects, such as Figure 3 The reference object A and the reference object F are grouped together to generate node N1, and the reference object B and the reference object D are grouped together to generate node N2.
[0056] Since each group of reference objects contains two reference objects, at this time, based on the longitude and latitude coordinates of each group of reference objects, that is, the two reference objects are used as two coordinate points of the diagonal line, and the diagonal lines are connected to form a rectangle. At this time, Figure 3 It can be seen that 4 rectangles can be obtained, and these 4 rectangles are called the first rectangle, so we get Figure 3 Node N1, node N2, node N3, node N4 in.
[0057] Then, two first rectangles are selected, such as node N1 and node N2, and are combined in pairs. The combination condition is to find the distance between the two first rectangles to be the smallest, such as the distance is the second threshold, and then the two rectangles are combined. After that, based on the longitude and latitude coordinates of each combined rectangle, the minimum circumscribed rectangle is generated to obtain multiple second rectangles.
[0058] The process of generating the minimum enclosing rectangle can be found in Figure 4, P and Q are two first rectangles, then the minimum bounding rectangle generated by P and Q is M; similarly, X and Y are two first rectangles, then the minimum bounding rectangle generated by X and Y is N. Corresponding to the nodes, node N5 is the parent node of nodes N1 and N2, and node N6 is the parent node of nodes N3 and N4, that is, the node where the second rectangle is located is the parent node of the node where the two combined rectangles are located, the pointer of node N5 where one second rectangle is located points to child nodes N1 and N2, and the pointer of node N6 where another second rectangle is located points to child nodes N3 and N4.
[0059] Then select two second rectangles, such as Figure 3 Nodes N5 and N6 in the image are combined in pairs. The combination condition is to find the minimum distance between the two second rectangles. For example, the distance is the third threshold. Then, the minimum enclosing rectangle is generated based on the longitude and latitude coordinates of each combined rectangle to obtain multiple third rectangles.
[0060] The process of generating the minimum enclosing rectangle can be found in Figure 4 , M and N are two second rectangles, then the minimum bounding rectangle generated by M and N is L. Corresponding to the node, node N7 is the parent node of nodes N5 and N6, that is, the node where the third rectangle is located is the parent node of the nodes where the two combined rectangles are located, and the pointer of node N7 where the third rectangle is located points to the child nodes N5 and N6.
[0061] According to the above process, the minimum enclosing rectangle is generated in a loop until the number of generated minimum enclosing rectangles reaches 1, and the loop is stopped. If the number of the third rectangle is 1, the loop generation of the minimum enclosing rectangle is stopped, and a minimum enclosing rectangle is obtained. Figure 3 The data index structure shown is a binary tree structure, and the current node N7 where the third rectangle is located is the root node of the binary tree; otherwise, the minimum circumscribed rectangle is generated in a loop in the same way as the third rectangle to obtain the fourth rectangle, the fifth rectangle, and so on. It can be understood that in Figure 3 The figure shows that the loop of generating the minimum enclosing rectangle ends when the third rectangle is obtained and the node N7 is obtained. This is just an example. In actual scenarios, according to the scenario and data requirements, as long as the number of minimum enclosing rectangles obtained is not 1, the corresponding minimum enclosing rectangle is generated in the same way as the third rectangle.
[0062] As an optional embodiment, obtaining a data index structure of a binary tree structure includes:
[0063] Get a bitmap corresponding to the first rectangle, a bitmap corresponding to the second rectangle, and a bitmap corresponding to the third rectangle;
[0064] The longitude coordinates, latitude coordinates and corresponding bitmap of the first rectangle, the longitude coordinates, latitude coordinates and corresponding bitmap of the second rectangle, and the longitude coordinates, latitude coordinates and corresponding bitmap of the third rectangle are written into the data index structure.
[0065] Alternatively, if Figure 3 As shown, the data index structure includes the longitude coordinates, latitude coordinates and corresponding bitmaps of each reference object and the first rectangle generated by the reference object, the second rectangle generated by the first rectangle, and the third rectangle generated by the second rectangle. For example, [24.2, 46.6][-72.7, 118.4] in node N7 is the geographic coordinates obtained by the minimum bounding rectangle generated by [24.2, 42.5][-72.7, -79.4] and [37.1, 46.6][114.5, 118.4] in node N5, and the bitmap corresponding to node N7 [24.2, 46.6][-72.7, 118.4] is obtained by the bitmap of [24.2, 42.5][-72.7, -79.4] and the bitmap of [37.1, 46.6][114.5, 118.4] in N5. The geographic coordinates of [-42.1, 52.4][137.2, -7.8] in node N7 are obtained by the minimum enclosing rectangle generated by [34.6, -42.1][137.2, 172.4] and [33.6, 52.4][-2.5, -7.8] in node N6. The bitmap corresponding to node N7 [-42.1, 52.4][137.2, -7.8] is obtained by the bitmap of [34.6, -42.1][137.2, 172.4] and the bitmap of [33.6, 52.4][-2.5, -7.8] in N6.
[0066] Among them, the above-mentioned bitmap is obtained in the following manner: The corresponding bitmap of the first rectangle: The embodiment of the present application first sets a preset topic space set, which covers the reference topic tags of all reference objects. For example, the embodiment of the present application sets the preset topic space set to {business, sports, music, food, novels, movies, poetry, art, dance, Internet, culture, entertainment, animation, fashion, drama, design}, with a total of 16 topics, and then the topic list of each reference object in Table 1 is matched with the topic order contained in these 16 topics in turn, and 1 is written if they are consistent, and 0 is written if they are inconsistent. At this time, the bitmap of each reference object can be obtained. For example, the topic list of reference object A is business, sports, and music. After matching with the preset topic space set {business, sports, music, food, novels, movies, poetry, art, dance, Internet, culture, entertainment, animation, fashion, drama, design}, the obtained bitmap is: 1110000000000000. In this way, you can get Figure 3 Bitmap of reference object A-reference object H.
[0067] Then, the bitmaps of the two reference objects contained in each first rectangle are written into the node of the first rectangle as the bitmap of the first rectangle. Figure 3 As shown, the node N1 contains the bitmaps of two reference objects A and F, which are 1110000000000000 and 0010000001001000 respectively.
[0068] When calculating the second rectangle, such as the two bitmaps contained in the nodes N5 and N6, the calculation is based on the two bitmaps in the node N1 and the two bitmaps in the node N2. More specifically, the bitmaps of the two reference objects contained in the first rectangle, i.e., the nodes N1 and N2, are unioned, and the bitmaps after the union are written into the nodes N5 and N6 corresponding to the second rectangle.
[0069] For example, after the bitmap 1110000000000000 of reference object A in node N1 and the bitmap 0010000001001000 of reference object F are unioned, the bitmap 1110000001001000 is obtained and written into the upper half of node N5; after the bitmap 000111000000000 of reference object B in node N2 and the bitmap 0100000000110000 are unioned, the bitmap 0101110000110000 is obtained and written into the lower half of node N5.
[0070] Similarly, the bitmaps of the two first rectangles contained in the second rectangle are processed as a union, and the bitmap after the union is written into the node corresponding to the third rectangle as the bitmap of the third rectangle. Wherein, each node corresponding to the third rectangle contains two groups of bitmaps of the second rectangle, and each group of bitmaps of the second rectangle is obtained by processing the union of the bitmaps of the two first rectangles.
[0071] That is, Figure 3 In the figure, the node N7 corresponding to the third rectangle contains the bitmap 1111110001111000 and the bitmap 00111111111010110, and each bitmap is obtained by finding the union of the bitmaps of the two first rectangles contained in the second rectangle.
[0072] For example, Figure 3, a second rectangle, that is, a first rectangle in node N5, whose bitmap 1110000001001000 and the bitmap 0101110000110000 are taken as the union, and the bitmap 1111110001111000 is obtained, which is written into the third rectangle, that is, the upper half of the node N7; another second rectangle, that is, a first rectangle in node N6, whose bitmap 0001111111000000 and the bitmap 0010000011010110 are taken as the union, and the bitmap 00111111111010110 is obtained, which is written into the third rectangle, that is, the lower half of the node N7.
[0073] Among them, bitmap is a way to represent topics, so when selecting tags that meet the target topic from the node information, you can directly view the bitmap contained in each node.
[0074] As an optional embodiment, selecting an object satisfying a preset condition from the candidate objects as the target object includes:
[0075] Get the influence value of the candidate object;
[0076] Sort the influence values from large to small to get the sorting result;
[0077] The pre-positioned candidate objects are selected from the sorting results and determined as the target objects.
[0078] Optionally, when selecting a target object from the candidate objects, the selection will be made according to the preset conditions. More specifically, the influence value of each candidate object is first obtained, wherein the influence value is calculated by: obtaining the social media data of the candidate object, wherein the social media data includes: the total forwarding amount and the total reply amount of the published document; calculating the average of the total forwarding amount and the total reply amount, and using the average as the influence value of each candidate object. As shown in Table 1, in the attributes corresponding to each reference object, there is also the influence value, and the calculation method is as above.
[0079] Then, the influence values of the obtained candidate objects are arranged in ascending order to obtain an arrangement result, and then the preset positions, that is, the top-k candidate objects are selected from the arrangement result to be determined as the target objects to be found in the embodiment of the present application.
[0080] As an optional embodiment, the present application embodiment proposes a process flow for querying a target user:
[0081] 1. Establish a first-in-first-out queue Q and a result list J;
[0082] 2. Add the root node of the index to queue Q;
[0083] 3. Take a node from the queue Q. If the closest distance between the position L and the smallest enclosing rectangle of the node is less than r kilometers, and the bitmap topic list contains the queried topic, add the child nodes of this node to the queue Q.
[0084] 4. Repeat step 3 until the node taken out from the queue contains only one user, and add it to the result list J;
[0085] 5. Query the influence scores of all users in list J from the database and return the target users with the top k influence scores.
[0086] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0087] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM (Read-Only Memory) / RAM (Random Access Memory), a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods of each embodiment of the present application.
[0088] According to another aspect of an embodiment of the present application, a target object determination device for implementing the above-mentioned target object determination method is also provided. Figure 5 is a structural block diagram of an optional device for determining a target object according to an embodiment of the present application, such as Figure 5 As shown, the device may include:
[0089] The first acquisition unit 501 is used to acquire a target topic tag, a geographical location of the target area, and a preset range from the geographical location when searching for a target object with influence on a target topic in a target area;
[0090] The second acquisition unit 502 is connected to the first acquisition unit 501 and is used to traverse from the root node of the data index structure to acquire information of each node in the data index structure, wherein the node information includes geographic coordinates of two groups of minimum bounding rectangles and a bitmap of each group of geographic coordinates, the minimum bounding rectangle is generated cyclically by geographic coordinates of multiple reference objects and a bounding rectangle determined based on a rectangle composed of the geographic coordinates, and the bitmap is determined by a reference topic tag of the reference object;
[0091] The selection unit 503 is connected to the second acquisition unit 502 and is used to select subnodes that meet the target topic tag, geographical location and preset range from the node information;
[0092] A first determining unit 504, connected to the selecting unit 503, is used to determine the reference object contained in the current minimum bounding rectangle as a candidate object when it is determined that the number of the current minimum bounding rectangle contained in the child node is 1;
[0093] As a unit 505, connected to the first determining unit 504, it is used to select an object that meets a preset condition from the candidate objects as a target object.
[0094] It should be noted that the first acquisition unit 501 in this embodiment can be used to execute the above-mentioned step S201, the second acquisition unit 502 in this embodiment can be used to execute the above-mentioned step S202, the selection unit 503 in this embodiment can be used to execute the above-mentioned step S203, the first determination unit 504 in this embodiment can be used to execute the above-mentioned step S204, and the acting unit 505 in this embodiment can be used to execute the above-mentioned step S205.
[0095] Through the above modules, the embodiment of the present application can directly filter out multiple local users with influence who meet the topic and distance conditions, with high query efficiency, saving time, and solving the problems of low query efficiency and long time consumption caused by the search method in the related technology.
[0096] As an optional embodiment, the device also includes: a third acquisition unit, used to obtain the longitude and latitude coordinates of the locations of multiple reference objects before traversing from the root node of the data index structure and obtaining the information of each node in the data index structure; a second determination unit, used to obtain the longitude and latitude coordinates of multiple groups of reference objects, and determine multiple first rectangles, wherein each group of reference objects contains two reference objects, and the distance between any two reference objects in each group of reference objects is less than a first threshold; a first obtaining unit, used to select two first rectangles according to the second threshold, combine them in pairs, and use the longitude and latitude coordinates of each combined rectangle to generate a minimum circumscribed rectangle to obtain multiple second rectangles, wherein the node where the second rectangle is located is used as the node where the rectangles that are combined in pairs are located. The parent node, the second threshold is used to indicate that the distance between the two first rectangles is the minimum; the second obtaining unit is used to select two second rectangles according to the third threshold, combine them in pairs, and use the longitude coordinates and latitude coordinates of each combined rectangle to generate a minimum enclosing rectangle to obtain multiple third rectangles, wherein the node where the third rectangle is located is used as the parent node of the node where the rectangles are located after the combination in pairs, and the third threshold is used to indicate that the distance between the two second rectangles is the minimum; the third obtaining unit is used to stop the cyclic generation of the minimum enclosing rectangle when the number of third rectangles is 1, obtain the data index structure of the binary tree structure, and use the current node where the third rectangle is located as the root node of the data index structure; or, when the number of third rectangles is not 1, cyclically generate the minimum enclosing rectangle.
[0097] As an optional embodiment, the second determining unit includes: a module for taking the longitude coordinates and latitude coordinates of each group of reference objects as two coordinate points of a diagonal line; and an establishing module for establishing a first rectangle according to the two coordinate points of the diagonal line.
[0098] As an optional embodiment, the third obtaining unit includes: a first obtaining module, used to obtain the bitmap corresponding to the first rectangle, the bitmap corresponding to the second rectangle, and the bitmap corresponding to the third rectangle; a writing module, used to write the longitude coordinates, latitude coordinates and corresponding bitmap of the first rectangle, the longitude coordinates, latitude coordinates and corresponding bitmap of the second rectangle, and the longitude coordinates, latitude coordinates and corresponding bitmap of the third rectangle into the data index structure.
[0099] As an optional embodiment, the first acquisition module includes: a first acquisition subunit, which is used to acquire a reference topic tag and a preset topic space set of a reference object; a matching subunit, which is used to match the reference topic tag according to the order of multiple topic parameters in the preset topic space set to obtain a bitmap of each reference object; a writing subunit, which is used to write the bitmap of the reference object contained in the first rectangle into the node corresponding to the first rectangle as the bitmap of the first rectangle; a first processing subunit, which is used to perform a union process on the bitmaps of the two reference objects contained in the first rectangle, and write the bitmap after the union process into the node corresponding to the second rectangle as the bitmap of the second rectangle, wherein each node corresponding to the second rectangle contains two groups of bitmaps of the first rectangle, and each group of bitmaps of the first rectangle is obtained by the union process of the bitmaps of the two reference objects; a second processing subunit, which is used to perform a union process on the bitmaps of the two first rectangles contained in the second rectangle, and write the bitmap after the union process into the node corresponding to the third rectangle as the bitmap of the third rectangle, wherein each node corresponding to the third rectangle contains two groups of bitmaps of the second rectangle, and each group of bitmaps of the second rectangle is obtained by the union process of the bitmaps of the two first rectangles.
[0100] As an optional embodiment, the unit includes: a second acquisition module, used to obtain the influence value of the candidate object; an acquisition module, used to sort the influence values from large to small to obtain a sorting result; a determination module, used to select a pre-set candidate object from the sorting result and determine it as the target object.
[0101] As an optional embodiment, the second acquisition module includes: a second acquisition sub-unit, used to obtain social media data of the candidate object, wherein the social media data includes: the total number of reposts and the total number of replies of the published document; and an acquisition sub-unit, used to determine the average value of the total number of reposts and the total number of replies to obtain the influence value of the candidate object.
[0102] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be run in Figure 1 In the hardware environment shown, it can be implemented by software or by hardware, wherein the hardware environment includes a network environment.
[0103] According to another aspect of an embodiment of the present application, an electronic device for implementing the above-mentioned method for determining a target object is also provided. The electronic device may be a server, a terminal, or a combination thereof.
[0104] Figure 6 is a structural block diagram of an optional electronic device according to an embodiment of the present application, such as Figure 6As shown, it includes a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602 and the memory 603 communicate with each other through the communication bus 604, wherein,
[0105] Memory 603, used for storing computer programs;
[0106] The processor 601 is used to implement the following steps when executing the computer program stored in the memory 603:
[0107] When searching for a target object with influence on a target topic in a target area, obtain a target topic tag, a geographic location of the target area, and a preset range from the geographic location;
[0108] Starting from the root node of the data index structure, traversing, obtaining each node information in the data index structure, wherein the node information includes two sets of geographic coordinates of the minimum bounding rectangle and a bitmap of each set of geographic coordinates, the minimum bounding rectangle is generated by looping the geographic coordinates of multiple reference objects and the bounding rectangle determined by the rectangle composed of the geographic coordinates, and the bitmap is determined by the reference topic label of the reference object;
[0109] Select subnodes that meet the target topic tag, geographic location, and preset range from the node information;
[0110] When it is determined that the number of the current minimum bounding rectangle contained in the child node is 1, the reference object contained in the current minimum bounding rectangle is determined as a candidate object;
[0111] Select an object that meets the preset conditions from the candidate objects as the target object.
[0112] Optionally, in this embodiment, the communication bus may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0113] The communication interface is used for communication between the above electronic device and other devices.
[0114] The memory may include RAM, or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0115] As an example, Figure 6 As shown, the memory 603 may include, but is not limited to, the first acquisition unit 501, the second acquisition unit 502, the selection unit 503, the first determination unit 504, and the as unit 505 in the target object determination device. In addition, other module units in the target object determination device may also be included but are not limited to, which will not be repeated in this example.
[0116] The above-mentioned processor can be a general-purpose processor, which can include but not be limited to: CPU (Central Processing Unit), NP (Network Processor), etc.; it can also be DSP (Digital Signal Processing), ASIC (Application Specific Integrated Circuit), FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0117] In addition, the electronic device mentioned above further comprises: a display for displaying the determination result of the target object.
[0118] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, and this embodiment will not be described in detail here.
[0119] It can be understood by those skilled in the art that Figure 6 The structure shown is for illustration only. The device for implementing the above-mentioned target object determination method may be a terminal device, which may be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 6 It does not limit the structure of the above electronic device. For example, the terminal device may also include Figure 6 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 6 Different configurations shown.
[0120] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, which can include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0121] According to another aspect of the embodiment of the present application, a storage medium is also provided. Optionally, in this embodiment, the storage medium can be used to execute the program code of the method for determining the target object.
[0122] Optionally, in this embodiment, the storage medium may be located on at least one network device among a plurality of network devices in the network shown in the above embodiment.
[0123] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps:
[0124] When searching for a target object with influence on a target topic in a target area, obtain a target topic tag, a geographic location of the target area, and a preset range from the geographic location;
[0125] Starting from the root node of the data index structure, traversing, obtaining each node information in the data index structure, wherein the node information includes two sets of geographic coordinates of the minimum bounding rectangle and a bitmap of each set of geographic coordinates, the minimum bounding rectangle is generated by looping the geographic coordinates of multiple reference objects and the bounding rectangle determined by the rectangle composed of the geographic coordinates, and the bitmap is determined by the reference topic label of the reference object;
[0126] Select subnodes that meet the target topic tag, geographic location, and preset range from the node information;
[0127] When it is determined that the number of the current minimum bounding rectangle contained in the child node is 1, the reference object contained in the current minimum bounding rectangle is determined as a candidate object;
[0128] Select an object that meets the preset conditions from the candidate objects as the target object.
[0129] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments, which will not be described in detail in this embodiment.
[0130] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media that can store program codes, such as a USB flash drive, a ROM, a RAM, a mobile hard disk, a magnetic disk, or an optical disk.
[0131] According to another aspect of the embodiments of the present application, a computer program product or a computer program is also provided, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of the method for determining the target object in any of the above embodiments.
[0132] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0133] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers, or network devices, etc.) to execute all or part of the steps of the method for determining the target object of each embodiment of the present application.
[0134] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0135] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution provided in this embodiment.
[0137] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0138] The above are only preferred implementations of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for determining a target object, It is characterized in that The method comprises: When searching for a target object with influence on a target topic in a target area, obtaining a target topic tag, a geographic location of the target area, and a preset range from the geographic location; Traversing from a root node of a data index structure, obtaining information of each node in the data index structure, wherein the node information includes geographic coordinates of two groups of minimum bounding rectangles and a bitmap of each group of geographic coordinates, the minimum bounding rectangle is generated cyclically by geographic coordinates of a plurality of reference objects and a bounding rectangle determined based on a rectangle composed of the geographic coordinates, and the bitmap is determined by a reference topic tag of the reference object; Selecting a subnode that satisfies the target topic tag, the geographic location, and the preset range from the node information; When it is determined that the number of the current minimum bounding rectangle contained in the child node is 1, determining the reference object contained in the current minimum bounding rectangle as a candidate object; Selecting an object that meets a preset condition from the candidate objects as the target object, wherein the target object is the top k objects in terms of influence value among the candidate objects; Wherein, before traversing from the root node of the data index structure and obtaining the information of each node in the data index structure, the method further includes: obtaining the longitude coordinates and latitude coordinates of the locations of multiple reference objects; obtaining the longitude coordinates and latitude coordinates of multiple groups of reference objects, determining multiple first rectangles, each group of reference objects containing two reference objects, and the distance between any two reference objects in each group of reference objects is less than a first threshold; selecting two of the first rectangles according to a second threshold, combining them in pairs, and using the longitude coordinates and latitude coordinates of each combined rectangle to generate the minimum circumscribed rectangle, to obtain multiple second rectangles, the node where the second rectangle is located is used as the parent node of the node where the rectangles are located after the combination in pairs, and the second threshold is used to indicate The distance between two of the first rectangles is the smallest; two of the second rectangles are selected according to a third threshold, and are combined in pairs, and the minimum enclosing rectangle is generated using the longitude and latitude coordinates of each combined rectangle to obtain a plurality of third rectangles, the nodes where the third rectangles are located are used as the parent nodes of the nodes where the rectangles that are combined in pairs are located, and the third threshold is used to indicate that the distance between two of the second rectangles is the smallest; when the number of the third rectangles is 1, the cyclic generation of the minimum enclosing rectangle is stopped, a data index structure of a binary tree structure is obtained, and the current node where the third rectangle is located is used as the root node of the data index structure; or, when the number of the third rectangles is not 1, the generation of the minimum enclosing rectangle is cyclically performed.
2. The method according to claim 1, It is characterized in that The acquiring the longitude coordinates and the latitude coordinates of multiple groups of reference objects and determining multiple first rectangles comprises: Taking the longitude coordinates and the latitude coordinates of each group of the reference objects as two coordinate points of a diagonal line; The first rectangle is established according to the two coordinate points of the diagonal line.
3. The method according to claim 1, It is characterized in that The data index structure of the binary tree structure includes: Get a bitmap corresponding to the first rectangle, a bitmap corresponding to the second rectangle, and a bitmap corresponding to the third rectangle; The longitude coordinates, latitude coordinates and corresponding bitmap of the first rectangle, the longitude coordinates, latitude coordinates and corresponding bitmap of the second rectangle, and the longitude coordinates, latitude coordinates and corresponding bitmap of the third rectangle are written into the data index structure.
4. The method according to claim 3, It is characterized in that The obtaining of a bitmap corresponding to the first rectangle, a bitmap corresponding to the second rectangle, and a bitmap corresponding to the third rectangle comprises: Obtaining a reference topic tag and a preset topic space set of the reference object; According to the sorting of the plurality of topic parameters in the preset topic space set, the reference topic tags are matched to obtain a bitmap of each reference object; Writing the bitmap of the reference object contained in the first rectangle into the node corresponding to the first rectangle as the bitmap of the first rectangle; Performing a union process on the bitmaps of the two reference objects contained in the first rectangle, and writing the bitmap after the union process into the node corresponding to the second rectangle as the bitmap of the second rectangle, wherein each node corresponding to the second rectangle contains two groups of bitmaps of the first rectangle, and each group of bitmaps of the first rectangle is obtained by the union process of the bitmaps of the two reference objects; The bitmaps of the two first rectangles contained in the second rectangle are unioned, and the bitmap after the union is written into the node corresponding to the third rectangle as the bitmap of the third rectangle, wherein each node corresponding to the third rectangle contains two groups of bitmaps of the second rectangle, and each group of bitmaps of the second rectangle is obtained by unioning the two bitmaps of the first rectangle.
5. The method according to any one of claims 1 to 4, It is characterized in that The selecting an object satisfying a preset condition from the candidate objects as the target object comprises: Obtaining the influence value of the candidate object; Sorting the influence values from large to small to obtain a sorting result; A previously preset candidate object is selected from the sorting results and determined as the target object.
6. The method according to claim 5, It is characterized in that The obtaining of the influence value of the candidate object comprises: Acquire social media data of the candidate object, wherein the social media data includes: a total number of forwardings and a total number of replies to a published document; The average of the total forwarding amount and the total reply amount is determined to obtain the influence value of the candidate object.
7. A device for determining a target object, It is characterized in that The device comprises: A first acquisition unit is used to acquire a target topic tag, a geographical location of the target area, and a preset range from the geographical location when searching for a target object with influence on a target topic in a target area; a second acquisition unit, configured to traverse from a root node of the data index structure to acquire information of each node in the data index structure, wherein the node information includes geographic coordinates of two groups of minimum bounding rectangles and a bitmap of each group of geographic coordinates, the minimum bounding rectangle is generated cyclically by geographic coordinates of a plurality of reference objects and a bounding rectangle determined based on a rectangle composed of the geographic coordinates, and the bitmap is determined by a reference topic tag of the reference object; A selection unit, configured to select a sub-node that satisfies the target topic tag, the geographical location, and the preset range from the node information; a first determining unit, configured to determine, when it is determined that the number of current minimum bounding rectangles contained in the child node is 1, a reference object contained in the current minimum bounding rectangle as a candidate object; As a unit, used to select objects that meet preset conditions from the candidate objects as the target objects, and the target objects are the top k influence values among the candidate objects; The device also includes: A third acquisition unit, configured to acquire the longitude coordinates and latitude coordinates of locations of multiple reference objects before traversing from the root node of the data index structure to acquire information of each node in the data index structure; A second determining unit is used to obtain the longitude coordinates and the latitude coordinates of multiple groups of reference objects, determine multiple first rectangles, each group of reference objects includes two reference objects, and the distance between any two reference objects in each group of reference objects is less than a first threshold; a first obtaining unit, configured to select two of the first rectangles according to a second threshold, perform pairwise combination, and generate the minimum circumscribed rectangle using the longitude coordinates and latitude coordinates of each combined rectangle to obtain a plurality of second rectangles, wherein the nodes where the second rectangles are located are used as parent nodes of the nodes where the pairwise combined rectangles are located, and the second threshold is used to indicate that the distance between the two first rectangles is the minimum; a second obtaining unit, configured to select two second rectangles according to a third threshold, perform pairwise combination, and generate the minimum circumscribed rectangle using the longitude coordinates and latitude coordinates of each combined rectangle to obtain a plurality of third rectangles, wherein the nodes where the third rectangles are located are used as parent nodes of the nodes where the pairwise combined rectangles are located, and the third threshold is used to indicate that the distance between the two second rectangles is the minimum; The third obtaining unit is used to stop the cyclic generation of the minimum enclosing rectangle when the number of the third rectangles is 1, obtain a data index structure of a binary tree structure, and use the current node where the third rectangle is located as the root node of the data index structure; or, when the number of the third rectangles is not 1, cyclically generate the minimum enclosing rectangle.
8. An electronic device comprising a processor, a communication interface, a memory and a communication bus, in, The processor, the communication interface and the memory communicate with each other via the communication bus, wherein: The memory is used to store computer programs; The processor is configured to execute the method steps of any one of claims 1 to 6 by running the computer program stored in the memory.
9. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program, wherein the computer program is configured to execute the method steps described in any one of claims 1 to 6 when run.
Citation Information
Patent Citations
Merchant searching method and device, electronic equipment and storage medium
CN109657022A
Geographic information index structure and retrieval method in knowledge map label loose scene
CN112214612A