Target resource search method, search device, and electronic device
By dividing the electronic map into grids and calculating the resource index, the high computational complexity and time-consuming problem of house-hunting platforms in finding houses within commuting distances is solved, and user-friendly resource recommendations and comparisons are achieved.
Patent Information
- Application Number
- CN202210443311.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-25
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-04-25
AI Technical Summary
Existing housing search platforms lack the function of finding houses based on commuting distance, and the calculation complexity and time-consuming route planning are high, making it impossible for users to intuitively compare the commuting convenience of various communities.
Determine the search range on the electronic map based on the preset reference position and search distance, divide the range into multiple grids, calculate the resource logical distance and resource index of each grid, and recommend target resources based on the resource index.
It reduces computational complexity and time consumption, provides an intuitive resource comparison method, and enables users to more easily select appropriate target resources.
Smart Images

Figure CN114880557B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of resource search, and in particular to a method, device, and electronic device for searching target resources. Background Art
[0002] At present, most of the existing house-hunting platforms do not provide the function of finding houses according to commuting distance.
[0003] The inventors have found that a few platforms that provide housing search based on commuting distance have problems such as high computational complexity, long time consumption, and poor visualization when performing path planning calculations for all communities within the distance range of the workplace, and users cannot intuitively compare the commuting convenience of each community. Summary of the Invention
[0004] The present application provides a target resource search method, a search device, and an electronic device to solve at least one of the above problems.
[0005] According to one aspect of the present application, a method for searching a target resource is proposed, the method comprising: determining a search range of the target resource on an electronic map based on a preset reference position and search distance; dividing the search range into a plurality of grids; calculating a logical distance of the target resource in the grids including the target resource; calculating a resource index of the target resource based on the logical distance; and recommending the target resource based on the resource index.
[0006] According to some embodiments, determining the search range of the target resource on the electronic map based on a preset reference position and search distance includes: determining the search range of the target resource with the preset reference position as the center and an even multiple of the search distance as the side length.
[0007] According to some embodiments, dividing the search range into multiple grids includes: dividing the search range into multiple search areas with a horizontal line and a vertical line passing through the preset reference position as symmetry axes; and dividing each search area into grids with the same side length.
[0008] According to some embodiments, the calculation of the logical distance of the target resource in the grid including the target resource includes: judging the resource logical value of each grid; determining the grid including the target resource according to the resource logical value; and calculating the logical distance of the target resource in the determined grid.
[0009] According to some embodiments, determining the resource logic value of each grid includes: determining whether the target resource exists in each grid; if so, the resource logic value of the grid is 1; otherwise, the resource logic value of the grid is 0.
[0010] According to some embodiments, the calculated logical distance of the target resource in the grid includes: taking the location of the target resource as the starting point and the preset reference location as the end point; connecting the starting point and the end point with a straight line; determining the grid through which the straight line passes; calculating the resource logical value of the grid through which the straight line passes; and calculating the logical distance to the target resource based on the resource logical value.
[0011] According to some embodiments, the logical distance of the target resource is calculated by the following formula:
[0012]
[0013] Among them, D i is the logical distance to the target resource, d i is the length of the straight line, n i is the number of grids that the straight line passes through, o i is the number of resource logic values of zero in the grids that the straight line passes through.
[0014] According to some embodiments, calculating the resource index of the target resource based on the logical distance includes: fitting a probability density function using the logical distances of all target resources included in the grid where the target resource is located; determining the quantile of the logical distance based on the probability density function; and calculating the resource index of the target resource based on the quantile.
[0015] According to some embodiments, the resource index of the target resource is calculated by the following formula:
[0016] CI i =1-α i
[0017] Among them, CI i is the resource index, the α i The quantile of the logical distance to the target resource.
[0018] According to some embodiments, the probability density function satisfies the following formula:
[0019]
[0020] Where, e is the natural logarithm, u=(xD i ) / Δ, window width Δ=1.06s / n^(1 / 5), s is the standard deviation of the logical distances of all target resources included in the grid where the target resource is located, and n is the number of all target resources included in the grid where the target resource is located.
[0021] According to some embodiments, the calculating of the logical distance of the target resource in the grid including the target resource includes: calculating the logical distance of the target resource in the grid including the target resource in order from near to far according to the distance between each grid and the reference position.
[0022] According to some embodiments, before calculating the logical distance of the grid farthest from the reference position, the search method further includes: determining whether the target resource exists in a grid whose distance from the reference position is less than the farthest distance; if the target resource exists, calculating the logical distance of the grid farthest from the reference position; otherwise, not calculating the logical distance of the grid farthest from the reference position.
[0023] According to some embodiments, calculating the resource logic value of the grid through which the straight line passes includes determining whether each grid through which the straight line passes is connected; and calculating the resource logic value of the grid through which the straight line passes according to the determination result of each grid.
[0024] According to one aspect of the present application, a target resource search device is proposed, the search device comprising: a search range determination unit, for determining the search range of the target resource on an electronic map according to a preset reference position and search distance; a grid division unit, for dividing the search range into a plurality of grids; a logical distance calculation unit, for calculating the logical distance of the target resource in the grid including the target resource; a resource index calculation unit, for calculating the resource index of the target resource according to the logical distance; and a target resource recommendation unit, for recommending the target resource according to the resource index.
[0025] According to one aspect of the present application, an electronic device is proposed, which includes: one or more processing units; a storage unit for storing one or more programs; when the one or more programs are executed by the one or more processing units, the one or more processing units implement the search method as described in any of the above.
[0026] According to an exemplary embodiment of the present application, a search range for a target resource is determined on an electronic map based on a preset reference location and search distance, and the search range is divided into multiple grids. Target resources are recommended by calculating the resource index of each grid, thereby reducing computational complexity and time consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for describing the embodiments.
[0028] Figure 1 A flow chart of a method for searching for a target resource according to an exemplary embodiment of the present application is shown.
[0029] Figure 2 A flow chart of a method for calculating a logical distance to a target resource according to an exemplary embodiment of the present application is shown.
[0030] Figure 3 A flow chart of a method for calculating a resource index according to an exemplary embodiment of the present application is shown.
[0031] Figure 4 A schematic diagram of dividing a search range based on an electronic map according to an exemplary embodiment of the present application is shown.
[0032] Figure 5 A block diagram of a target resource search device according to an exemplary embodiment of the present application is shown.
[0033] Figure 6 An electronic device according to an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0034] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. Like reference numerals in the drawings represent like or similar parts, and thus repetitive description thereof will be omitted.
[0035] The described features, structures or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of these specific details, or other modes, components, materials, devices or operations may be employed. In these cases, well-known structures, methods, devices, implementations, materials or operations will not be shown or described in detail.
[0036] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.
[0037] The terms "first," "second," and the like in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, not to describe a particular order. Furthermore, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0038] Most existing house-hunting platforms do not provide the function of finding houses based on commuting distance. Even if a few platforms provide this function, they often have problems such as high computational complexity and long time consumption when planning routes based on commuting distance.
[0039] According to an embodiment of the present application, a method for searching for target resources is proposed. Based on a preset reference location and search distance, a search range for target resources is determined on an electronic map and divided into multiple grids. Target resources are recommended by calculating a resource index for each grid. This method reduces computational complexity and time consumption, and the resource index can be displayed on the electronic map, allowing users to intuitively compare recommended target resources.
[0040] The specific embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0041] Figure 1 A flow chart of a method for searching a target resource according to an exemplary embodiment of the present application is shown below. Figure 1 , a method for searching for target resources according to an example embodiment of the present application is described in detail.
[0042] like Figure 1 As shown, in step S101, a search range of a target resource is determined on an electronic map according to a preset reference position and search distance.
[0043] According to some embodiments, the search range of the target resource is determined with a preset reference position as the center and an even multiple of the search distance as the side length.
[0044] In step S103, the search range determined in step S101 is equally divided into a plurality of grids.
[0045] According to some embodiments of the present application, the search range determined in step S101 is divided into multiple search areas using a horizontal line and a vertical line passing through a preset reference position as symmetry axes, and each search area is equally divided into grids with the same side length.
[0046] In step S105 , a logical distance of the target resource in the grid including the target resource is calculated.
[0047] According to some embodiments, the logical distance of each grid is calculated through the following steps.
[0048] First, determine the resource logic value of each grid. In other words, determine whether the target resource exists in each grid. If so, the resource logic value of the grid is 1; otherwise, the resource logic value of the grid is 0.
[0049] Then, a grid including the target resource is determined according to the resource logical value.
[0050] Finally, the logical distance of the target resource in the determined grid is calculated.
[0051] According to some embodiments, the target resource is a target object of the search, such as a rental house, a shop, a supermarket, or a hospital.
[0052] Figure 2 A flow chart of a method for calculating a target resource logical distance according to an exemplary embodiment of the present application is shown as follows: Figure 2 As shown, in step S1051, the location of the target resource is used as the starting point, and the reference location preset in step S101 is used as the end point;
[0053] In step S1053, a straight line connects the starting point and the end point determined in step S1051;
[0054] In step S1055, the grid through which the straight line connected in step S1053 passes is determined;
[0055] In step S1057, the resource logic value of the grid determined in step S1055 is calculated;
[0056] In step S1059, the logical distance of the target resource is calculated according to the resource logical value determined in step S1057.
[0057] According to some embodiments, the logical distance of the target resource is calculated using formula (1).
[0058]
[0059] Among them, D i The logical distance of each grid, d i is the length of the straight line in step S1053, n i is the number of grids that the line passes through, o i The number of logical zero resources in the grids that the line passes through.
[0060] According to some embodiments of the present application, the logical distance of the target resource in the grids including the target resource is calculated in order from near to far based on the distance between each grid and the reference position preset in step S101.
[0061] According to some embodiments, before calculating the logical distance of the grid farthest from the reference position, it is also necessary to determine whether there is a target resource in the grid whose distance from the reference position is less than the farthest distance; if there is a target resource, the logical distance of the grid farthest from the reference position is calculated; otherwise, the logical distance of the grid farthest from the reference position is no longer calculated.
[0062] According to some other embodiments, step S1057 includes:
[0063] Step S10571: Determine whether each grid passed by the straight line connected in step S1053 is connected.
[0064] Step S10573: Formula (1) calculates the logical distance of the target resource.
[0065] According to some embodiments, if the grid determined in step S10571 includes a community or social resources, such as a shop, supermarket, or hospital, when calculating the logical distance using formula (1), the resource logic value of the grid is recorded as 1; otherwise, it is recorded as 0. According to this embodiment, if the grid includes social resources, even if it does not include the target resource, it means that there is a road through the grid, thereby improving the convenience of the target resource finally determined.
[0066] In step S107 , the resource index of the target resource is calculated according to the logical distance calculated in step S105 .
[0067] Figure 3 A flow chart of a method for calculating resource index according to an exemplary embodiment of the present application is shown as follows: Figure 3 As shown, in step S1071, a probability density function is fitted using the logical distances of all target resources included in the grid where the target resource is located.
[0068] According to some embodiments, a probability density function is used to satisfy a Gaussian kernel function distribution, as shown in formula (2).
[0069]
[0070] Where, e is the natural logarithm, u=(xD i ) / Δ, window width Δ=1.06s / n^(1 / 5), s is the standard deviation of the logical distances of all target resources included in the grid where the target resource is located, and n is the number of all target resources included in the grid where the target resource is located.
[0071] In step S1073 , the quantile of the logical distance of the target resource is determined according to the probability density function.
[0072] In step S1075 , the resource index of the target resource is calculated according to the quantile determined in step S1073 .
[0073] According to some embodiments of the present application, the resource index of the target resource is calculated using formula (3).
[0074] CI i =1-α i (3)
[0075] Among them, CI i is the resource index, the α i The quantile of the logical distance to the target resource.
[0076] In step S109, the target resource is recommended according to the resource index calculated in step S107.
[0077] according to Figure 1 A target resource search method shown in the figure recommends target resources by calculating the resource index of each grid, which reduces the computational complexity and time consumption.
[0078] According to some other embodiments, the resource index calculated in step S107 is displayed on an electronic map, so that the user can intuitively compare the recommended target resources.
[0079] Let's take a rental housing search as an example. Using the user's workplace as the preset reference location, the search range is divided into multiple grids based on the user's preset distances. The search determines whether there are neighborhoods with rental listings within each grid. Based on this, the logical distance between the workplace and each neighborhood with rental listings within the grid is calculated. Based on this logical distance, the neighborhood's resource index is calculated, and housing recommendations are made based on this resource index.
[0080] Figure 4 A schematic diagram of a search range division based on an electronic map according to an exemplary embodiment of the present application is shown below. Figure 4 , a target resource search method provided in this application is specifically described.
[0081] First, if Figure 4 As shown, the search range is determined with the work location pre-selected by the user as the center and a side length of twice the preset distance, and then the length and width of the search range are divided into eight equal parts, resulting in 64 small squares with a side length of one-fourth of the preset distance.
[0082] Assuming the preset distance is 1 km, the side length of the search range is determined to be 2 km, and the side length of the square is divided into eighths, that is, Figure 4Each side of the search area is divided into eight equal parts, thus dividing the search area into 64 small squares. The side length of each small square is 2 / 8 = 0.25 kilometers.
[0083] With the user's pre-selected work location as the origin, draw the X-axis and Y-axis from west to east and from south to north respectively. The first quadrant of the grid contains 16 small squares. The four small squares closest to the X-axis are named a i , i=1, 2, 3, 4, the next four small squares are named a i , i=5, 6, 7, 8, and so on. The 16 small squares in the second quadrant of the grid are named b i , i = 1, 2, ..., 16, the specific marking order is the mirror image of the small squares in the first quadrant with the Y axis as the symmetry axis. The 16 small squares in the third quadrant of the grid are named c i , i = 1, 2, ..., 16, the specific marking order is the mirror image of the small squares in the second quadrant with the X axis as the symmetry axis. The 16 small squares in the fourth quadrant of the grid are named d i , i = 1, 2, ..., 16, the specific marking order is the mirror image of the small square in the third quadrant with the Y axis as the symmetry axis.
[0084] Then, it is determined whether there are communities with rental housing within each grid. The specific process is as follows.
[0085] Determine whether there is a community with rental housing in the small square grid a1 in the first quadrant. If there is a rental housing, the resource logic value of the small square grid a1 is I 1-1 Recorded as 1, otherwise, recorded as 0. In the first quadrant, the three small squares a2, a5, and a6 are adjacent to a1 and are located in an outer circle. It is determined whether there is a community with rental housing in each small square grid. If there is a rental housing, the resource logic value of the small square area is I 1-j , where j = 2, 5, 6 is recorded as 1, and vice versa. The five small squares a3, a7, a6 in the first quadrant are adjacent to a2, a5, a6 and are located in a circle outside. 11 , a 10 , a9, determine whether there is a community with rental housing in each small square area. If there is a community with rental housing, the resource logic value of the small square area is I 1-j , where j=3, 7, 11, 10, 9 is recorded as 1, otherwise it is recorded as 0.
[0086] Judge a1, a2, a5, a6, a3, a7, a 11 , a 10, a9, whether the resource logic values of each small square grid are all 0, if so, then the resource logic values of other small squares in the outermost circle of the first quadrant will no longer be judged; if not, then the resource logic values of the outermost a4, a8, a 12 , a 16 , a 15 , a 14 , a 13 Is there a community with rental housing in each small square area? If so, the resource logic value of the small square area is I 1-j , where j=4, 8, 12, 16, 16, 15, 14, 13 is recorded as 1, otherwise it is recorded as 0.
[0087] The calculation method of the resource logic values of the grids in the second quadrant, the third quadrant, and the fourth quadrant is the same as that of the first quadrant, and will not be repeated here.
[0088] According to some embodiments, the resource logic value of each small square grid is calculated with reference to formula (5).
[0089]
[0090] Then, starting from the longitude and latitude coordinates of the community i with rental housing in the small square grid and ending at the longitude and latitude coordinates of the user's pre-selected work location, draw a straight line l i Connect two points. The straight-line distance between the two points is d. i .
[0091] Straight line l i The number of small square grids passed is n i , n i ≥1. Among them, the number of resource logic values being 0 is o i , then the number of resource logical values 1 is n i -o i , refer to formula (1) to calculate the logical distance of cell i.
[0092] According to some other embodiments, when using formula (1) to calculate the logical distance of cell i, if the straight line l i If the small square grid passed by includes a community or social resources, such as a shop, supermarket or hospital, the resource logic value of the grid is recorded as 1, otherwise it is recorded as 0.
[0093] Finally, based on the logical distances of all the communities with rental housing in the small square grid, the kernel density method is used to estimate the continuous distribution of the grid, thereby determining the quantile of the logical distance of community i in the continuous distribution, which is recorded as α iFor example, the Gaussian kernel function shown in formula (2) is used to estimate its continuous distribution. The resource index of cell i is calculated using formula (3), thereby recommending rental resources to users with less computational effort. By displaying the resource index of each cell on an electronic map, users can intuitively compare the recommended target resources.
[0094] Figure 5 A block diagram of a target resource search device according to an exemplary embodiment of the present application is shown. Figure 5 The search device shown includes a search range determination unit 501, a grid division unit 503, a logical distance calculation unit 505, a resource index calculation unit 507, and a target resource recommendation unit 509. The search range determination unit 501 is configured to determine a search range for a target resource on an electronic map based on a preset reference location and search distance; the grid division unit 503 is configured to divide the search range into a plurality of grids; the logical distance calculation unit 505 is configured to calculate a logical distance of the target resource in the grids containing the target resource; the resource index calculation unit 507 is configured to calculate a resource index of the target resource based on the logical distance; and the target resource recommendation unit is configured to recommend the target resource based on the resource index.
[0095] Figure 6 An electronic device according to an exemplary embodiment of the present application is shown. Figure 6 hereinafter, an electronic device 200 according to this embodiment of the present application is described. Figure 6 The electronic device 200 shown is merely an example and should not limit the functions and scope of use of the embodiments of the present application.
[0096] like Figure 6 As shown, electronic device 200 is implemented as a general-purpose computing device. Components of electronic device 200 may include, but are not limited to, at least one processing unit 210, at least one storage unit 220, a bus 230 connecting various system components (including storage unit 220 and processing unit 210), a display unit 240, and the like.
[0097] The storage unit stores program codes, which can be executed by the processing unit 210, so that the processing unit 210 executes the methods described in this specification according to various exemplary embodiments of the present application. For example, the processing unit 210 can execute the following Figure 1 The method shown in .
[0098] The storage unit 220 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 2201 and / or a cache memory unit 2202 , and may further include a read-only memory unit (ROM) 2203 .
[0099] The storage unit 220 may also include a program / utility 2204 having a set (at least one) of program modules 2205, such program modules 2205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0100] Bus 230 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0101] The electronic device 200 can also communicate with one or more external devices 300 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 200, and / or any device that enables the electronic device 200 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication can occur via an input / output (I / O) interface 250. Furthermore, the electronic device 200 can communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network such as the Internet) via a network adapter 260. The network adapter 260 can communicate with other modules of the electronic device 200 via the bus 230. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device 200, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0102] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software or by combining software with necessary hardware. The technical solution according to the embodiment of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, or a network device, etc.) to execute the above method according to the embodiment of the present application.
[0103] The software product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, a system, device or component of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0104] Computer-readable storage media may include a data signal propagated in baseband or as part of a carrier wave, which carries readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The readable storage medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination thereof.
[0105] The program code for performing the operations of the present application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and the like, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0106] The computer-readable medium carries one or more programs. When the one or more programs are executed by the device, the computer-readable medium implements the aforementioned functions.
[0107] Those skilled in the art will appreciate that the modules described above can be distributed in the device according to the description of the embodiment, or can be modified accordingly to be used in one or more devices that are different from the embodiment. The modules of the above embodiment can be combined into one module or further divided into multiple submodules.
[0108] According to an embodiment of the present application, a method for searching for target resources is proposed. Based on a preset reference location and search distance, a search range for target resources is determined on an electronic map and divided into multiple grids. Target resources are recommended by calculating a resource index for each grid. This method reduces computational complexity and time consumption, and the resource index can be displayed on the electronic map, allowing users to intuitively compare recommended target resources.
[0109] The embodiments of the present application are described in detail above. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only intended to help understand the method and core ideas of the present application. At the same time, changes or modifications made by those skilled in the art based on the ideas of the present application, the specific implementation methods, and the scope of application of the present application, all fall within the scope of protection of the present application. In summary, the contents of this specification should not be construed as limiting the present application.
Claims
1. A method for searching a target resource, characterized in that: The search method includes: Determining a search range for the target resource on an electronic map based on a preset reference position and search distance; and dividing the search range into a plurality of grids; Calculating a logical distance of the target resource in a grid including the target resource; wherein calculating the logical distance of the target resource in the grid including the target resource comprises: Determine the resource logic value of each grid; Determining a grid including the target resource according to the resource logical value; Calculating a logical distance of the target resource in the determined grid; The calculated logical distance of the target resource in the grid includes: Taking the location of the target resource as the starting point and the preset reference location as the end point; A straight line connects the starting point and the end point; Determining the grid through which the straight line passes; Calculating resource logic values of the grids that the straight line passes through; Calculating the logical distance of the target resource according to the resource logical value; The logical distance to the target resource is calculated using the following formula: in, is the logical distance to the target resource, is the length of the straight line, is the number of grids that the straight line passes through, is the number of resource logic values of zero in the grids that the straight line passes through; Calculating a resource index of the target resource according to the logical distance; The target resource is recommended according to the resource index.
2. The search method according to claim 1, wherein: Determining the search range of the target resource on the electronic map according to the preset reference position and search distance includes: The search range of the target resource is determined with the preset reference position as the center and an even multiple of the search distance as the side length.
3. The search method according to claim 2, characterized in that The step of dividing the search range into a plurality of grids comprises: Dividing the search range into a plurality of search areas using a horizontal line and a vertical line passing through the preset reference position as symmetry axes; Divide each search area into grids with equal side lengths.
4. The search method according to claim 3, wherein: Determining the resource logic value of each grid includes: Determine whether the target resource exists in each grid; If it exists, the resource logic value of the grid is 1; Otherwise, the resource logic value of the grid is 0.
5. The search method according to claim 4, characterized in that The calculating the resource index of the target resource according to the logical distance includes: Fitting a probability density function using the logical distances of all target resources included in the grid where the target resource is located; Determining the quantile of the logical distance according to the probability density function; A resource index of the target resource is calculated according to the quantile.
6. The search method according to claim 5, characterized in that The resource index of the target resource is calculated by the following formula: in, is the resource index, The quantile of the logical distance to the target resource.
7. The search method according to claim 6, characterized in that The probability density function satisfies the following formula: Where e is the natural logarithm, , window width =1.06s / n^(1 / 5), s is the standard deviation of the logical distances of all target resources included in the grid where the target resource is located, and n is the number of all target resources included in the grid where the target resource is located. It is the logical distance of all communities with rental properties.
8. The search method according to claim 3, wherein: The calculating includes a logical distance of the target resource in a grid of the target resource, comprising: The logical distance of the target resource in the grids including the target resource is calculated in order from near to far according to the distance between each grid and the reference position.
9. The search method according to claim 8, characterized in that: Before calculating the logical distance of the grid farthest from the reference position, the search method further includes: Determine whether the target resource exists in a grid whose distance from the reference position is less than the maximum distance; If the target resource exists, calculating the logical distance of the grid farthest from the reference position; Otherwise, the logical distance of the grid farthest from the reference position is not calculated.
10. The search method according to claim 4, wherein: The calculating of the resource logic value of the grid through which the straight line passes includes: Determine whether each grid through which the straight line passes is connected; According to the judgment result of each grid, the resource logic value of the grid through which the straight line passes is calculated.
11. A target resource search device, characterized in that: The search device comprises: A search range determination unit, configured to determine a search range for the target resource on an electronic map according to a preset reference position and search distance; A grid division unit, used to divide the search range into a plurality of grids; A logical distance calculation unit, configured to calculate a logical distance of the target resource in a grid including the target resource; wherein the calculation of the logical distance of the target resource in the grid including the target resource comprises: Determine the resource logic value of each grid; Determining a grid including the target resource according to the resource logical value; Calculating a logical distance of the target resource in the determined grid; The calculated logical distance of the target resource in the grid includes: Taking the location of the target resource as the starting point and the preset reference location as the end point; A straight line connects the starting point and the end point; Determining the grid through which the straight line passes; Calculating resource logic values of the grids that the straight line passes through; Calculating the logical distance of the target resource according to the resource logical value; The logical distance to the target resource is calculated using the following formula: in, is the logical distance to the target resource, is the length of the straight line, is the number of grids that the straight line passes through, is the number of resource logic values of zero in the grids that the straight line passes through; a resource index calculation unit, configured to calculate a resource index of the target resource according to the logical distance; The target resource recommendation unit is configured to recommend the target resource according to the resource index.
12. An electronic device, characterized in that: The electronic device comprises: one or more processing units; a storage unit for storing one or more programs; When the one or more programs are executed by the one or more processing units, the one or more processing units implement the search method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Interest point acquisition method and device, electronic equipment and storage medium
CN111651685A