Addressing method, device, electronic device and storage medium
By obtaining user location information during multiple festivals and using the geohash encoding method, sorting according to time and frequency indicators, the problem of location information error in the existing technology is solved, and more accurate user hometown address positioning is achieved.
Patent Information
- Application Number
- CN202011383071.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-01
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2040-12-01
AI Technical Summary
The existing technology fails to effectively consider the error caused by the reporting frequency when obtaining the user's home address, resulting in inaccuracy of location information, especially when location information is reported quickly in a short period of time.
By obtaining the user's location information during multiple target festivals, the location information is converted into rectangular areas using the geohash encoding method, and sorted according to the time indicators and frequency indicators of these areas, and gradually refined to obtain a more accurate user's home address.
It overcomes the location information error caused by the frequency error reported by mobile phones, improves the accuracy of addressing, and can more accurately locate the user's home address.
Smart Images

Figure CN114579612B
Abstract
Description
Technical Field
[0001] The present disclosure generally relates to the field of addressing technology, and in particular to a geohash-based addressing method, device, electronic device, and storage medium. Background Art
[0002] In some addressing application scenarios, in order to obtain the user's hometown address, the IP address or location information reported by the user's mobile phone IMEI is generally used on special holidays, such as the Spring Festival and Qingming Festival, and the one reported the most times will be used as the user's hometown address.
[0003] The prior art does not take into account the errors caused by the reporting frequency, such as the errors caused by quickly reporting the location information in a very short time. Therefore, the prior art has certain errors in addressing the user's hometown address.
[0004] Therefore, a more efficient addressing method is desired to solve the problems existing in the prior art. Summary of the invention
[0005] In view of the above-mentioned defects or deficiencies in the prior art, it is desired to provide an addressing method, device, electronic device and storage medium that can meet the current specific addressing requirements.
[0006] According to one aspect of an embodiment of the present invention, an embodiment of the present application provides an addressing method, the method comprising:
[0007] Acquire the location information of the user during multiple target holidays, where the location information is the continuous location information of the user during the target holidays;
[0008] According to the location information, obtaining a geohash-coded rectangular area where the location information is located;
[0009] Get the user's hometown address based on the rectangular area of the geohash code
[0010] In one embodiment, obtaining the user's location information during multiple target holidays includes:
[0011] Obtaining a statistical period and a statistical target festival for the location information, wherein the statistical period is a plurality of natural years, and the statistical target festival includes at least the Spring Festival;
[0012] According to the statistical period and the statistical target holiday, the location information of the user during the statistical period and the statistical target holiday is obtained.
[0013] In one embodiment, obtaining the geohash-coded rectangular area where the location information is located according to the location information includes:
[0014] Obtaining the longitude and latitude corresponding to the location information;
[0015] According to the longitude and latitude, geohash encoding is performed on the location information;
[0016] Get the geohash-coded rectangular area where each location information is located.
[0017] In one embodiment, obtaining the home address of the addressed user according to the rectangular area includes:
[0018] Get the rectangular area of the 5-bit geohash code for each location information;
[0019] Obtaining a rectangular area of a 5-digit geohash code where the user's hometown address is located, wherein the rectangular area of a 5-digit geohash code where the user's hometown address is located is a first target area;
[0020] According to the first target area, perform 6-bit geohash encoding on the first target area to obtain a rectangular area of the 6-bit geohash encoding of the first target area;
[0021] Acquire a rectangular area of the 6-digit geohash code where the user's hometown address is located, where the rectangular area of the 6-digit geohash code where the user's hometown address is located is the second target area;
[0022] According to the second target area, aggregating the position information of the second target area with set longitude and latitude lengths, and obtaining an aggregated area block of the second target area;
[0023] The aggregation area block where the user's hometown address is located is obtained, and the aggregation area block where the user's hometown address is located is used as the user's hometown address.
[0024] In one embodiment, the obtaining of the rectangular area of the 5-digit geohash code where each location information is located, obtaining the rectangular area of the 5-digit geohash code where the user's hometown address is located, the rectangular area of the 5-digit geohash code where the user's hometown address is located being the first target area, includes:
[0025] Perform 5-bit geohash encoding on each piece of location information to obtain a 5-bit geohash-coded rectangular area where each piece of location information is located;
[0026] Obtain the distribution of the location information during the Spring Festival in the rectangular area of the 5-bit geohash code;
[0027] If there is a rectangular area with a 5-bit geohash code that has location information during no less than two Spring Festivals, the rectangular area with the 5-bit geohash code is used as the first target area;
[0028] If the 5-bit geohash coded rectangular areas containing the location information during each Spring Festival are different, or there are multiple 5-bit geohash coded rectangular areas containing no less than two pieces of location information during the Spring Festival, then the location information during the Spring Festival in the 5-bit geohash coded rectangular areas containing the location information during each Spring Festival will be collided with the location information during the remaining target festivals, and the 5-bit geohash coded rectangular area with the largest number of collisions will be obtained as the first target area.
[0029] In one embodiment, the 6-bit geohash encoding is performed on the first target area according to the first target area to obtain a rectangular area of the 6-bit geohash encoding of the first target area; the 6-bit geohash encoding rectangular area of the user's hometown address is obtained, and the 6-bit geohash encoding rectangular area of the user's hometown address is the second target area, including:
[0030] Perform 6-bit geohash encoding on the first target area to obtain a rectangular area of the 6-bit geohash encoding of the first target area;
[0031] Sort the time index and the number index of occurrence of the location information in the rectangular area of the 6-bit geohash code;
[0032] Get the highest-ranked 6-bit geohash-coded rectangular area as the second target area.
[0033] In one embodiment, the step of aggregating the location information of the second target area according to the set longitude and latitude to obtain an aggregated area block of the second target area; and obtaining the aggregated area block where the user's hometown address is located, and taking the aggregated area block where the user's hometown address is located as the user's hometown address, includes:
[0034] According to the second target area, setting the latitude and longitude lengths of the aggregation area block;
[0035] According to the longitude and latitude lengths, the location information of the second target area is aggregated with the set longitude and latitude lengths to obtain an aggregated area block with the set longitude and latitude lengths;
[0036] sorting the time index and the number index of occurrence of the location information in the aggregation area block;
[0037] Get the highest ranked aggregation area block as the user's hometown address.
[0038] According to another aspect of an embodiment of the present invention, an addressing device is disclosed, the device comprising:
[0039] An acquisition module, used to acquire location information of a user during multiple target holidays, wherein the location information is continuous location information of the user during the target holidays;
[0040] An encoding module, used to perform geohash encoding of the location information according to the location information, and obtain a geohash-coded rectangular area where the location information is located;
[0041] The addressing module is used to obtain the user's hometown address based on the rectangular area of the geohash code.
[0042] Based on another aspect of an embodiment of the present invention, an electronic device is disclosed, which includes one or more processors and a memory, wherein the memory is used to store one or more programs; when the one or more programs are executed by the processor, the processor implements the addressing method provided by each embodiment of the present invention.
[0043] According to another aspect of the embodiments of the present invention, a computer-readable storage medium storing a computer program is disclosed. When the computer program is executed, the addressing method provided by the embodiments of the present invention is implemented.
[0044] In the embodiment of the present application, the user's location information during multiple target holidays is obtained; and based on the location information, the rectangular area of the geohash code where the location information is located is obtained; and the user's hometown address is obtained through the rectangular area. The present application can overcome the location information error caused by the frequency error reported by the mobile phone in the prior art, and can obtain more accurate addressing information by sorting the time index and the number index of the location information in the rectangular area corresponding to the geohash code. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0046] Figure 1 is a flow chart of an addressing method provided by an embodiment of the present application;
[0047] Figure 2 Another exemplary flow chart of an addressing method according to an embodiment of the present application;
[0048] Figure 3 It is a schematic diagram of the structure of an addressing device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0049] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It is also necessary to explain that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.
[0050] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0051] First of all, it should be noted that the user’s hometown address mentioned in this application is the user’s hometown address.
[0052] Please refer to Figure 1 , which shows an exemplary process of the addressing method of the embodiment of the present application.
[0053] like Figure 1 As shown, in step 110, the location information of the user during multiple target holidays is obtained, and the location information is the continuous location information of the user during the target holidays.
[0054] Specifically, in the embodiment of the present application, the user's location information is automatically reported by the user when using the mobile phone. When the user uses the mobile phone, the mobile phone IMEI (International Mobile Equipment Identity) can report the real-time location information of the mobile phone in real time through the connected mobile network. If the user's location information is obtained, the user's hometown address can be determined based on the location of the mobile phone during the festival. For example, during the Spring Festival, most people will return to their hometowns, and the mobile phone location information at this time is also likely to be the user's hometown location. However, since users may also carry mobile phones to visit relatives and friends or go out for travel during the Spring Festival, the mobile phone location information during the Spring Festival in a natural year cannot guarantee that the mobile phone location information is the user's hometown. Therefore, it is necessary to obtain the location information of multiple festivals, such as New Year's Day, Qingming Festival, Dragon Boat Festival, National Day, Mid-Autumn Festival, etc. It is undeniable that during these festivals, users may not return to their hometowns. Therefore, it is necessary to obtain the mobile phone location information of multiple target festivals in multiple natural years.
[0055] Specifically, in one embodiment of the present application, the step of obtaining the location information of the user during multiple target holidays includes:
[0056] The statistical period and statistical target festivals of the location information are obtained, wherein the statistical period is a plurality of natural years, and the statistical target festivals include at least the Spring Festival.
[0057] Specifically, there is no limit on the number of natural years in the statistical cycle of this application. However, in actual implementation, there is such a situation: for example, if the user does not return to his hometown during a Spring Festival and travels, then the location information may be far away from the actual user's hometown address. If he still does not return to his hometown but travels during another Spring Festival, then this location information is likely to be non-overlapping with the previous location information. If the location information during the Spring Festival of more natural years is collected, then there must be more times during the Spring Festival at the actual user's hometown address than in other places, because other places are irregular, and after returning to his hometown, his location information is regular. For example, we obtained the user's location information during 10 Spring Festivals and found that 8 of them were in different places and two were in the same place. There is a pattern in the location information of these 8 different places, that is, these location information will be very scattered according to time, and the positions between them may span a large range, but the location information of these two times in the same place is very concentrated. These location information will be relatively concentrated according to time, because when people travel, they will cross many tourist attractions and areas, but when they return to their hometowns, they will be relatively fixed in a certain area.
[0058] According to the statistical period and the statistical target holiday, the location information of the user during the statistical period and the statistical target holiday is obtained.
[0059] Specifically, the embodiment of the present application takes the use of a mobile phone to report location information as an example. During the holidays, if a user uses a mobile phone, the mobile phone will report its location based on the situation of connecting to the mobile network. The user's location information reported by the mobile phone IMEI can report location information based on the base station to which the mobile phone is connected. These location information include the coordinates of the base station and the length of time the mobile phone is connected to the base station. The mobile phone can also report location information based on its own positioning software.
[0060] In step 120, based on the location information, a geohash-coded rectangular area where the location information is located is obtained.
[0061] Specifically, after obtaining the location information, the location information can be divided into blocks according to the geohash code. Geohash is an address coding method. It can encode the two-dimensional spatial longitude and latitude data into a string. Geohash uses a string to represent the two coordinates of longitude and latitude. It represents a rectangular area. Therefore, the geographical area corresponding to a geohash code is fixed. For example, a 5-bit geohash code can represent a rectangular area with a range of 10 square kilometers. That is, if any point in the rectangular area with a range of 10 square kilometers is represented by a 5-bit geohash code, the geohash code is the same. A 6-bit geohash code can represent a rectangular area of 0.34 square kilometers. Therefore, a rectangular area with a 5-bit geohash code can be divided into about 30 rectangular areas with a 6-bit geohash code, and a point in a rectangular area with a 5-bit geohash code can be distinguished into 30 rectangular areas with a 6-bit geohash code.
[0062] Specifically, in one embodiment of the present application, obtaining the geohash-coded rectangular area where the location information is located according to the location information includes:
[0063] Obtain the longitude and latitude corresponding to the location information.
[0064] Specifically, since the geohash code is the longitude and latitude code of the geographic location, it is necessary to first convert the location information into longitude and latitude information. Converting Gaussian coordinates into longitude and latitude coordinates is an existing technology and is not introduced in this application. At the same time, the real-time location information reported by the mobile phone IMEI is the longitude and latitude information.
[0065] The location information is geohash encoded according to the longitude and latitude.
[0066] Specifically, after obtaining the longitude and latitude values of the location information, the longitude and latitude values can be geohash encoded according to the geohash encoding method. The geohash encoding can be 1-bit geohash encoding, 2-bit geohash encoding, 3-bit geohash encoding, 4-bit, 5-bit, or 6-bit geohash encoding. According to actual conditions and in order to improve addressing efficiency, this application first uses 5-bit geohash encoding to obtain a rectangular area of a larger geographical location, and then after selecting a large rectangular area, 6-bit geohash encoding is performed to reduce the rectangular area. Finally, within the rectangular area of the 6-bit geohash encoding, the final user hometown address is obtained by further setting the longitude and latitude length.
[0067] Get the geohash-coded rectangular area where each location information is located.
[0068] Specifically, after the specific number of geohash code bits is determined, the geohash coded rectangular area corresponding to each location information when geohash coding is performed can be obtained.
[0069] In step 130, the user's hometown address is obtained based on the rectangular area of the geohash code.
[0070] Specifically, by analyzing and refining the rectangular area of the geohash code, the user's hometown address can be obtained.
[0071] Specifically, in one embodiment of the present application, obtaining the home address of the addressed user according to the rectangular area includes:
[0072] Get the rectangular area of the 5-bit geohash code for each location information;
[0073] A rectangular area of the 5-digit geohash code where the user's hometown address is located is obtained, and the rectangular area of the 5-digit geohash code where the user's hometown address is located is the first target area.
[0074] Specifically, by performing 5-bit geohash encoding on each location information, the 5-bit geohash coded rectangular area where each location information is located can be obtained. Since the 5-bit geohash coded rectangular area is 10 square kilometers, all location information within the 10 square kilometers will be in a 5-bit geohash coded rectangular area. It can be known that the more location information in a 5-bit geohash coded rectangular area, the more times or time the user is active at this location. If combined with the target holiday information, the activity location information of a certain holiday in a 5-bit geohash coded rectangular area can be obtained. For example, during the Spring Festival, the user is active 100 times in a 5-bit geohash coded rectangular area numbered 001. By statistically analyzing the distribution and frequency of location areas of different target holidays in different 5-bit geohash coded rectangular areas, the 5-bit geohash coded rectangular area where the user's hometown address is located can be obtained. Here, the 5-bit geohash coded rectangular area where the user's hometown address is located is defined as the first target area.
[0075] According to the first target area, perform 6-bit geohash encoding on the first target area to obtain a rectangular area of the 6-bit geohash encoding of the first target area;
[0076] The rectangular area of the 6-digit geohash code where the user's hometown address is located is obtained, and the rectangular area of the 6-digit geohash code where the user's hometown address is located is the second target area.
[0077] Specifically, after obtaining the rectangular area of the 5-digit geohash code where the user's hometown address is located, the 6-digit geohash code rectangular area of the smaller range where the user's hometown address is located can be obtained in a more subdivided manner. The 6-digit geohash code rectangular area is obtained by dividing the 5-digit geohash code rectangular area. Since the 6-digit geohash code rectangular area is 0.34 square kilometers, the user's hometown address obtained is more accurate than the 5-digit geohash code rectangular area. By statistically analyzing the distribution and frequency of location areas of different target festivals in different 6-digit geohash code rectangular areas, the 6-digit geohash code rectangular area where the user's hometown address is located can be obtained. Here, the 6-digit geohash code rectangular area where the user's hometown address is located is defined as the second target area.
[0078] According to the second target area, aggregating the position information of the second target area with set longitude and latitude lengths, and obtaining an aggregated area block of the second target area;
[0079] The aggregation area block where the user's hometown address is located is obtained, and the aggregation area block where the user's hometown address is located is used as the user's hometown address.
[0080] Specifically, since the rectangular area of the 6-bit geohash code is relatively broad, in order to provide a more accurate user hometown address, the embodiment of the present application further refines the rectangular area of the 6-bit geohash code, and divides the rectangular area of the 6-bit geohash code into aggregation area blocks according to the set longitude and latitude length. By statistically analyzing the distribution and frequency of location areas in different aggregation area blocks, the aggregation area block where the user's hometown address is located can be obtained. Here, the aggregation area block where the user's hometown address is located is defined as the user's hometown address. In actual use, since the obtained user location information will have certain errors, the latitude and longitude length division cannot be too small. If it is too small, it is impossible to compare the various aggregation area blocks. If it is too large, it affects the accuracy of the user's hometown address. Therefore, it needs to be considered in an overall manner.
[0081] In one embodiment of the present application, Figure 2As shown, the 5-digit geohash coded rectangular area where each location information is located is obtained, and the 5-digit geohash coded rectangular area where the user's hometown address is located is obtained. The 5-digit geohash coded rectangular area where the user's hometown address is located is the first target area, including:
[0082] In step 201, each piece of the location information is coded with 5 bits of geohash, and a rectangular area containing the 5 bits of geohash code where each piece of the location information is located is obtained.
[0083] Specifically, each of the location information is encoded with 5 bits of geohash, and the rectangular area with the 5 bits of geohash code where each of the location information is located is obtained, that is, each of the location information is placed in a rectangular area with 5 bits of geohash code. According to the rectangular area corresponding to the 5-bit geohash code, a rectangular area with 5 bits of geohash code will contain multiple location information.
[0084] In step 202, the distribution of the location information during the Spring Festival in the target holiday in a rectangular area of 5-bit geohash code is obtained.
[0085] Specifically, since the user chooses a holiday to return to his hometown, the holiday is most likely the Spring Festival. Therefore, it is typical to select the Spring Festival in the target holiday as the basis for first analyzing the user's hometown location. By obtaining the rectangular area of the 5-bit geohash code where the user's location information in the target holiday is located, the user's location distribution during the Spring Festival in the rectangular area of the 5-bit geohash code can be obtained.
[0086] In step 203, if there is a rectangular area with a 5-bit geohash code that has location information during no less than two Spring Festivals, the rectangular area with the 5-bit geohash code is used as the first target area;
[0087] Specifically, if there are more than two identical rectangular areas of 5-bit geohash code containing location information during the Spring Festival, it means that the user has been to the same area during at least two Spring Festivals. Therefore, it is highly likely that the user's hometown address is within the same rectangular area of 5-bit geohash code. In particular, if there are two rectangular areas of 5-bit geohash code that simultaneously satisfy the condition that there are at least two identical rectangular areas of 5-bit geohash code containing location information during the Spring Festival, a specific analysis is required. For example, the user's hometown address is area A, and the user returned to area A three times in 10 Spring Festivals. However, the user also went to a certain place B for vacation in the 10 Spring Festivals. That is, the rectangular area of 5-bit geohash code containing area A has location information records during three Spring Festivals, and the rectangular area of 5-bit geohash code containing area B also has location information records during three Spring Festivals. At this time, the following analysis is required.
[0088] In step 204, if the 5-bit geohash coded rectangular areas containing the location information during each Spring Festival are different, or there are multiple 5-bit geohash coded rectangular areas containing no less than two pieces of location information during the Spring Festival, the location information during the Spring Festival in the 5-bit geohash coded rectangular areas containing the location information during each Spring Festival is collided with the location information during the remaining target festivals, and the 5-bit geohash coded rectangular area with the largest number of collisions is obtained as the first target area.
[0089] Specifically, if the rectangular area of the 5-bit geohash code where the user's location information during each Spring Festival is different, for example, the user went to different places during 10 Spring Festivals, then the rectangular area of the 5-bit geohash code where his location information during the 10 Spring Festivals is also different, then it will be impossible to determine the rectangular area of the 5-bit geohash code where the user's hometown address is located according to the user's location information during the Spring Festival. At the same time, there is also such a special case. If the user went to three places A, B, and C during three Spring Festivals during 10 Spring Festivals, then the rectangular area of the 5-bit geohash code where the three places A, B, and C are located has location information during three Spring Festivals, so it is also impossible to determine the rectangular area of the 5-bit geohash code where the user's hometown address is located. At this time, it is necessary to collide the location information during the Spring Festival in the 5-bit geohash-coded rectangular area where the location information during each Spring Festival is located with the location information during other target festivals. The collision here is to obtain the number of times the location information during other target festivals appears in the 5-bit geohash-coded rectangular area where the location information during each Spring Festival is located. For example, within 10 years, the location information of users during the five target festivals of Spring Festival, Dragon Boat Festival, Qingming Festival, Mid-Autumn Festival and National Day is collected. There are 10 5-bit geohash-coded rectangular areas where the location information during 10 Spring Festivals is located. Then it is necessary to compare the number of times the location information during the four target festivals of Dragon Boat Festival, Qingming Festival, Mid-Autumn Festival and National Day appears in these 10 5-bit geohash-coded rectangular areas within 10 years. For example, the 5-bit geohash-coded rectangular area of the first Spring Festival appears 0 times for Dragon Boat Festival, 0 times for Qingming Festival, 0 times for Mid-Autumn Festival, and 4 times for National Day, and the 5-bit geohash-coded rectangular area of the second Spring Festival appears In the rectangular area, there are Dragon Boat Festival 3 times, Qingming Festival 2 times, Mid-Autumn Festival 3 times, and National Day 2 times. In the rectangular area of the 5-digit geohash code of the third Spring Festival, there are Dragon Boat Festival 0 times, Qingming Festival 0 times, Mid-Autumn Festival 1 time, and National Day 1 time. In the rectangular area of the 5-digit geohash code of the fourth Spring Festival, there are Dragon Boat Festival 1 time, Qingming Festival 0 times, Mid-Autumn Festival 1 time, and National Day 0 times. In the rectangular area of the 5-digit geohash code of the fifth Spring Festival, there are Dragon Boat Festival 0 times, Qingming Festival 0 times, Mid-Autumn Festival 0 times, and National Day 0 times, and so on. There must be such a rule that the place where the location information during these festivals appears most is the rectangular area where the user's hometown address is located. There is also a situation that multiple rectangular areas may be visited during a festival. However, it must be the case. If it is tourism, the location information during the target festival must involve multiple irregular rectangular areas. If it is not tourism, then these rectangular areas must include a rectangular area with a 5-digit geohash code where the user's hometown address is located.Through the above collisions, a rectangular area containing 5-bit geohash codes of location information during the Spring Festival with the largest number of collisions can be obtained as the first target area.
[0090] In one embodiment of the present application, the first target area is 6-bit geohash encoded according to the first target area to obtain a rectangular area of the 6-bit geohash encoding of the first target area; the 6-bit geohash encoded rectangular area of the user's hometown address is obtained, and the 6-bit geohash encoded rectangular area of the user's hometown address is the second target area, including:
[0091] The first target area is coded by 6-bit geohash to obtain a rectangular area of the 6-bit geohash code of the first target area.
[0092] Specifically, 6-bit geohash encoding of the first target area is to divide the rectangular area of 5-bit geohash encoding into rectangular areas of 6-bit geohash encoding. Since the rectangular area corresponding to the rectangular area of 5-bit geohash encoding is 10 square kilometers, and the rectangular area corresponding to the rectangular area of 6-bit geohash encoding is 0.34 square kilometers, it is more accurate to judge the user's hometown location through the rectangular area of 6-bit geohash encoding.
[0093] The time index and the number index of occurrence of the location information in the rectangular area of the 6-bit geohash code are sorted.
[0094] Specifically, the time indicator is to count the cumulative time length of the location information of all target festivals in the rectangular area of 6-bit geohash code; the number indicator is to count the cumulative number of times the location information of all target festivals in the rectangular area of 6-bit geohash code appears. By sorting the two indicators, we can get an area with the longest time and the most times the location information of the target festival appears in all the rectangular areas of 6-bit geohash code.
[0095] Get the highest-ranked 6-bit geohash-coded rectangular area as the second target area.
[0096] Specifically, through sorting, it is found that the user's location information appears most frequently and has the longest cumulative time in a 6-digit geohash coded rectangular area, then this 6-digit geohash coded rectangular area is the rectangular area of the user's hometown address that needs to be found, so the user's hometown address is more accurately narrowed down to a rectangular area of 0.34 square kilometers. 0.34 square kilometers is equivalent to the area of a medium-sized community, which is also equivalent to the size of a medium-sized village.
[0097] In one embodiment of the present application, the step of aggregating the location information of the second target area according to the set longitude and latitude length to obtain an aggregated area block of the second target area; and obtaining the aggregated area block where the user's hometown address is located, and taking the aggregated area block where the user's hometown address is located as the user's hometown address, includes:
[0098] According to the second target area, the longitude and latitude lengths of the aggregation area block are set.
[0099] In order to obtain the user's hometown address more accurately, multiple aggregated area blocks are obtained by further refining the rectangular area of the 6-bit geohash code. In the embodiment of the present application, the setting of the aggregated area block no longer uses the geohash coding method, but aggregates the location information according to the set longitude and latitude length. In the embodiment of the present application, the longitude and latitude length is set to 50 meters, that is, a circle is drawn with a longitude and latitude length of 50 meters as the radius, so that a 6-bit geohash coded rectangular area can be further refined into 40 parts, with an area of about 0.008 square kilometers.
[0100] According to the longitude and latitude lengths, the location information of the second target area with the set longitude and latitude lengths is aggregated to obtain an aggregated area block with the set longitude and latitude lengths.
[0101] Specifically, as mentioned above, the area of this aggregation area block is approximately 0.008 square kilometers, a circle with a radius of 50 meters.
[0102] The time index and the number index of occurrence of the location information in the aggregation area block are sorted.
[0103] Specifically, the time indicator is to count the cumulative time length of the appearance of the location information of all target festivals in the aggregation area block; the number indicator is to count the cumulative number of times the location information of all target festivals in the aggregation area block appears. By sorting the two indicators, we can get an area in all the aggregation area blocks where the location information of the target festival appears for the longest time and the largest number of times.
[0104] Get the highest ranked aggregation area block as the user's hometown address.
[0105] Specifically, through sorting, there is a user's location information that appears most frequently in an aggregated area block and has the longest cumulative time. Then this aggregated area block is the user's hometown address that needs to be found. In this way, the user's hometown address is more precise and narrowed down to a rectangular area of 0.008 square kilometers. 0.008 square kilometers is equivalent to the area of a playground, and is also equivalent to the area where a building is located.
[0106] In the embodiment of the present application, the user's location information during multiple target holidays is obtained; and based on the location information, the rectangular area of the geohash code where the location information is located is obtained; and the user's hometown address is obtained through the rectangular area. The present application can overcome the location information error caused by the frequency error reported by the mobile phone in the prior art, and can obtain more accurate addressing information by sorting the time index and the number index of the location information in the rectangular area corresponding to the geohash code.
[0107] It should be understood that although Figure 1-2 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-2 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0108] Figure 3 is a schematic diagram of the structure of an addressing device provided by an embodiment of the present application, such as Figure 3 As shown, the addressing device includes: an acquisition module, an encoding module, and an addressing module.
[0109] An acquisition module, used to acquire location information of a user during multiple target holidays, wherein the location information is continuous location information of the user during the target holidays;
[0110] An encoding module, used to perform geohash encoding of the location information according to the location information, and obtain a geohash-coded rectangular area where the location information is located;
[0111] The addressing module is used to obtain the user's hometown address based on the rectangular area of the geohash code.
[0112] In particular, according to an embodiment of the present disclosure, the present invention discloses an electronic device, which includes one or more processors and a memory, wherein the memory is used to store one or more programs; when the one or more programs are executed by the processor, the processor implements the addressing method described in the embodiment of the present invention.
[0113] In particular, according to an embodiment of the present disclosure, the addressing method described in any of the above embodiments can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes a program code for executing the addressing method. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium.
[0114] The one or more programs are stored in a read-only memory ROM or a random access memory RAM to perform various appropriate actions and processes. The random access memory RAM includes software programs for the server to complete corresponding services, as well as various programs and data required for vehicle driving operations. The server and its controlled hardware devices, read-only memory ROM, and random access memory RAM are connected to each other through a bus, and various input / output interfaces are also connected to the bus.
[0115] The following components are connected to the input / output interface: an input part including a keyboard, a mouse, etc.; an output part including a cathode ray tube CRT, a liquid crystal display LCD, etc., and a speaker, etc.; and a communication part including a network interface card such as a LAN card, a modem, etc. The communication part performs communication processing via a network such as the Internet. A drive is also connected to the input / output interface as needed. Removable media, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., are installed on the drive as needed so that a computer program read therefrom is installed into the memory as needed.
[0116] In particular, according to an embodiment of the present disclosure, the addressing method described in any of the above embodiments can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program tangibly contained on a machine-readable medium, and the computer program includes a program code for executing the addressing method. In such an embodiment, the computer program can be downloaded and installed from a network through a communication part, and / or installed from a removable medium.
[0117] The units or modules involved in the embodiments described in the present application may be implemented by software or hardware. The units or modules described may also be arranged in a processor. The names of these units or modules do not constitute limitations on the units or modules themselves in certain circumstances.
[0118] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the above features are replaced with (but not limited to) technical features with similar functions disclosed in the present application.
Claims
1. An addressing method, characterized in that: The method comprises: Acquire the location information of the user during multiple target holidays, where the location information is the continuous location information of the user during the target holidays; According to the location information, obtaining a geohash-coded rectangular area where the location information is located; Obtain the user's hometown address based on the rectangular area of the geohash code; The obtaining of the user's hometown address based on the rectangular area of the geohash code includes: Get the rectangular area of the 5-bit geohash code for each location information; Obtaining a rectangular area of a 5-digit geohash code where the user's hometown address is located, wherein the rectangular area of a 5-digit geohash code where the user's hometown address is located is a first target area; According to the first target area, perform 6-bit geohash encoding on the first target area to obtain a rectangular area of the 6-bit geohash encoding of the first target area; Acquire a rectangular area of the 6-digit geohash code where the user's hometown address is located, where the rectangular area of the 6-digit geohash code where the user's hometown address is located is the second target area; According to the second target area, aggregating the position information of the second target area with set longitude and latitude lengths, and obtaining an aggregated area block of the second target area; Obtaining an aggregated area block where the user's hometown address is located, and taking the aggregated area block where the user's hometown address is located as the user's hometown address; The step of obtaining a rectangular area of a 5-digit geohash code where each location information is located, obtaining a rectangular area of a 5-digit geohash code where the user's hometown address is located, wherein the rectangular area of a 5-digit geohash code where the user's hometown address is located is the first target area, includes: Perform 5-bit geohash encoding on each piece of location information to obtain a 5-bit geohash-coded rectangular area where each piece of location information is located; Obtain the distribution of the location information during the Spring Festival in the rectangular area of the 5-bit geohash code; If there is a rectangular area with a 5-bit geohash code that has location information during no less than two Spring Festivals, the rectangular area with the 5-bit geohash code is used as the first target area; If the 5-bit geohash coded rectangular areas containing the location information during each Spring Festival are different, or there are multiple 5-bit geohash coded rectangular areas containing no less than two pieces of location information during the Spring Festival, then the location information during the Spring Festival in the 5-bit geohash coded rectangular areas containing the location information during each Spring Festival will be collided with the location information during the remaining target festivals, and the 5-bit geohash coded rectangular area with the largest number of collisions will be obtained as the first target area.
2. The method according to claim 1, characterized in that The obtaining of the user's location information during multiple target holidays includes: Obtaining a statistical period and a statistical target festival for the location information, wherein the statistical period is a plurality of natural years, and the statistical target festival includes at least the Spring Festival; According to the statistical period and the statistical target holiday, the location information of the user during the statistical period and the statistical target holiday is obtained.
3. The method according to claim 1, characterized in that: The obtaining, based on the location information, a geohash-coded rectangular area where the location information is located comprises: Obtaining the longitude and latitude corresponding to the location information; According to the longitude and latitude, geohash encoding is performed on the location information; Get the geohash-coded rectangular area where each location information is located.
4. The method according to claim 1, characterized in that According to the first target area, the first target area is 6-bit geohash encoded to obtain a rectangular area of the first target area with 6-bit geohash encoding; and the rectangular area of the 6-bit geohash encoding of the user's hometown address is obtained, and the rectangular area of the 6-bit geohash encoding of the user's hometown address is the second target area, including: Perform 6-bit geohash encoding on the first target area to obtain a rectangular area of the 6-bit geohash encoding of the first target area; Sort the time index and the number index of occurrence of the location information in the rectangular area of the 6-bit geohash code; Get the highest-ranked 6-bit geohash-coded rectangular area as the second target area.
5. The method according to claim 1, characterized in that aggregating the location information of the second target area by a set latitude and longitude according to the second target area to obtain an aggregated area block of the second target area; Obtaining the aggregated area block where the user's home address is located, and taking the aggregated area block where the user's home address is located as the user's home address, includes: According to the second target area, setting the latitude and longitude lengths of the aggregation area block; According to the longitude and latitude lengths, the location information of the second target area is aggregated with the set longitude and latitude lengths to obtain an aggregated area block with the set longitude and latitude lengths; sorting the time index and the number index of occurrence of the location information in the aggregation area block; Get the highest ranked aggregation area block as the user's hometown address.
6. An addressing device, characterized in that: The device comprises: An acquisition module, used to acquire location information of a user during multiple target holidays, wherein the location information is continuous location information of the user during the target holidays; An encoding module, used to perform geohash encoding of the location information according to the location information, and obtain a geohash-coded rectangular area where the location information is located; An addressing module, used to obtain the user's hometown address based on the rectangular area of the geohash code; The addressing module is specifically used to obtain the rectangular area of the 5-bit geohash code where each location information is located; Obtaining a rectangular area of a 5-digit geohash code where the user's hometown address is located, wherein the rectangular area of a 5-digit geohash code where the user's hometown address is located is a first target area; According to the first target area, perform 6-bit geohash encoding on the first target area to obtain a rectangular area of the 6-bit geohash encoding of the first target area; Acquire a rectangular area of the 6-digit geohash code where the user's hometown address is located, where the rectangular area of the 6-digit geohash code where the user's hometown address is located is the second target area; According to the second target area, aggregating the position information of the second target area with set longitude and latitude lengths, and obtaining an aggregated area block of the second target area; Obtaining an aggregated area block where the user's hometown address is located, and taking the aggregated area block where the user's hometown address is located as the user's hometown address; The addressing module is further used to perform 5-bit geohash encoding on each piece of the location information, and obtain a rectangular area of the 5-bit geohash encoding where each piece of the location information is located; Obtain the distribution of the location information during the Spring Festival in the rectangular area of the 5-bit geohash code; If there is a rectangular area with a 5-bit geohash code that has location information during no less than two Spring Festivals, the rectangular area with the 5-bit geohash code is used as the first target area; If the 5-bit geohash coded rectangular areas containing the location information during each Spring Festival are different, or there are multiple 5-bit geohash coded rectangular areas containing no less than two pieces of location information during the Spring Festival, then the location information during the Spring Festival in the 5-bit geohash coded rectangular areas containing the location information during each Spring Festival will be collided with the location information during the remaining target festivals, and the 5-bit geohash coded rectangular area with the largest number of collisions will be obtained as the first target area.
7. An electronic device, characterized in that: The device includes one or more processors and a memory, the memory being used to store one or more programs; When the one or more programs are executed by the processor, the processor is caused to implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed, the method according to any one of claims 1 to 5 is implemented.
