User permanent location identification method, device, electronic device and readable storage medium
By aggregating the location area clusters based on the type of resident point and the length of residence time, determining the central coordinates of the user's permanent residence, the instability and difference analysis problems caused by relying on the order of resident points in the prior art are solved, and more accurate and stable are achieved user resident identification.
Patent Information
- Application Number
- CN202210703372.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-21
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2042-06-21
AI Technical Summary
The existing user job and residence analysis schemes depend on the order of residency points, and the results are unstable and the differences in workplace or residence are not considered, resulting in inaccurate analysis results.
According to the type of permanent resident to be identified, the resident point within the matching time period is obtained from all resident points of the user, the position area is determined based on the coordinates and residence time of the resident point, and the target position area is determined by aggregating the position area clusters. , and determine the center coordinate of the permanent residence based on its central position and cumulative residence time.
The accuracy and stability of the user's resident identification results are improved, ensuring that the results are in line with the actual situation, and avoiding instability and difference analysis caused by changes in the order of resident points.
Smart Images

Figure CN115103315B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of big data analysis, and in particular to a method, device, electronic device and readable storage medium for identifying a user's permanent location. Background Art
[0002] With the popularization of smart devices and the advent of the mobile Internet era, smart devices cover an increasing number of users, and users' use of smart devices also generates massive signaling data. These signaling data are used to analyze users' work and residence locations.
[0003] Existing user job and residence analysis solutions usually cluster the user's stay points within a period of time according to the time sequence of the stay points and a certain distance, and then determine whether it is a workplace or residence based on the length of stay determined by each cluster. This analysis method has the following defects: it depends on the order of the stay points, and the analysis results are unstable; it does not consider the differences in workplaces or residences, resulting in inaccurate aggregation results.
[0004] Therefore, how to provide a stable and highly accurate method for identifying a workplace or residence is a technical problem that needs to be solved. Summary of the invention
[0005] One of the purposes of the present invention is to provide a method, device, electronic device and readable storage medium for identifying a user's permanent location, so as to improve the accuracy and stability of the user's permanent location identification result. The embodiments of the present invention can be implemented as follows:
[0006] In a first aspect, the present invention provides a method for identifying a user's permanent location, the method comprising:
[0007] According to the type of the permanent place to be identified, from all the user's residence points, a plurality of residence points within a time period matching the type are obtained;
[0008] Based on the coordinates and the dwell time of each of the dwell points, determining the location area corresponding to each of the dwell points and the accumulated dwell time corresponding to each of the location areas;
[0009] Aggregating all the location areas according to the accumulated stay time and the central location corresponding to each of the location areas, and determining at least one target location area based on the obtained location area cluster;
[0010] Based on the central position of the at least one target location area and the accumulated stay duration, the central coordinates of the permanent place to be identified are obtained.
[0011] In a second aspect, the present invention provides a user residence identification device, comprising:
[0012] An acquisition module, configured to acquire, according to the type of the permanent place to be identified, a plurality of residence points within a time period matching the type from all residence points of the user;
[0013] A determination module, configured to determine a location area corresponding to each of the residence points and a cumulative residence time corresponding to each of the location areas based on the coordinates and residence time of each of the residence points;
[0014] an aggregation module, aggregating all the location areas according to the accumulated stay time and the center position corresponding to each of the location areas, and determining at least one target location area based on the obtained location area cluster;
[0015] The identification module is used to obtain the central coordinates of the permanent place to be identified based on the central position of the at least one target location area and the accumulated stay time.
[0016] In a third aspect, the present invention provides an electronic device, including a processor and a memory, wherein the memory stores a computer program executable by the processor, and the processor can execute the computer program to implement the user permanent location identification method described in the first aspect.
[0017] In a fourth aspect, the present invention provides a readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the user permanent location identification method described in the first aspect.
[0018] The present invention provides a user permanent residence identification method, device, electronic device and readable storage medium, the method comprising: according to the type of the permanent residence to be identified, obtaining multiple residence points within a time period matching the type from all the user's residence points; based on the coordinates and residence duration of each residence point, determining the location area corresponding to each residence point and the cumulative residence duration corresponding to each location area; according to the cumulative residence duration and center position corresponding to each location area, aggregating all the location areas, and determining at least one target location area based on the obtained location area cluster; based on the center position and cumulative residence duration of the at least one target location area, obtaining the center coordinates of the permanent residence to be identified. When acquiring the residence points, the embodiment of the present invention takes into account the differences between different types of permanent residences, and acquires residence points that match the type of permanent residence to be identified, so that the subsequent results have a certain degree of credibility and accuracy. Furthermore, after acquiring the residence points, the embodiment of the present invention aggregates the location areas corresponding to the residence points, and does not rely on the sequence order of each residence point, thereby solving the instability problem. In addition, in the aggregation process, the accumulated stay time of each location area is taken into account, so that the center coordinates of the permanent residence to be identified are consistent with the actual situation. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0020] Figure 1 A structural block diagram of an electronic device provided by an embodiment of the present invention;
[0021] Figure 2 A schematic flow chart of a method for identifying a user's permanent location provided in an embodiment of the present invention;
[0022] Figure 3 A schematic flow chart of step S202 provided in an embodiment of the present invention;
[0023] Figure 4 A schematic flowchart of the first step S203 provided in an embodiment of the present invention;
[0024] Figure 5 A schematic flow chart of the second step S203 provided in an embodiment of the present invention;
[0025] Figure 6 A diagram showing the comparative effect of the user residence identification method provided by an embodiment of the present invention and the prior art;
[0026] Figure 7 This is a functional module diagram of a user residence identification device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0028] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0029] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0030] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear to indicate an orientation or position relationship, they are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship in which the product of the invention is usually placed when used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0031] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.
[0032] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.
[0033] Existing user job and residence analysis solutions usually cluster the user's stay points within a period of time according to the time sequence of the stay points and at a certain distance, and then determine whether it is a workplace or residence based on the length of stay determined for each cluster.
[0034] For example, suppose multiple dwell point sequences are recorded as a1, a2, a3...an, and the dwell point sequences are aggregated according to a certain distance (for example, 250 meters):
[0035] Step 1: Starting from point a1, search for dwelling points within 250m of point a1, and aggregate these dwelling points into a cluster; if the dwelling point found is already an aggregated point, it will not be used, and so on, find all the dwelling points that meet the conditions of the last dwelling point an, until all points are aggregated.
[0036] Step 2: After obtaining multiple clusters, calculate the corresponding working period duration in each cluster, and obtain the location of the work place based on the cluster with the longest working period.
[0037] Step 4: Calculate the duration of non-workday nights in each cluster and determine the location of the residence based on the cluster with the longest night duration.
[0038] It can be seen that the above processing method has the following defects:
[0039] a. It depends on the order of the retention points. If the order of the retention points in the retention point sequence is disrupted, the aggregation results will be different and the analysis results will be unstable.
[0040] b. Failing to consider differences in work locations or residences leads to inaccurate aggregation results. For example, the final cluster contains both work-hour stays and night-time stays. However, in reality, the work location should only be related to the work hours, thus causing cognitive differences.
[0041] Therefore, in order to provide a stable and highly accurate method for identifying a workplace or residence, an embodiment of the present invention provides a method for identifying a user's permanent residence. The identification method provided by the embodiment of the present invention uses the dwelling points during the working hours (recorded as dwellsWeekDay), that is, the dwelling points during the daytime of working days to determine the workplace, and uses the dwelling points during the night hours (recorded as dwellsEve), that is, the dwelling points every night, to determine the residence. If more types of permanent residences are to be identified, the dwelling points that match the permanent residence can be screened out from the user's dwelling points for aggregation.
[0042] In order to implement the user residence identification method provided by the embodiment of the present invention, the embodiment of the present invention first provides an electronic device, see Figure 1 , Figure 1 This is a structural block diagram of an electronic device provided by an embodiment of the present invention.
[0043] like Figure 1 As shown, the electronic device 100 includes a memory 101, a processor 102 and a communication interface 103, and the memory 101, the processor 102 and the communication interface 103 are directly or indirectly electrically connected to each other to achieve data transmission or interaction. For example, these elements can be electrically connected to each other through one or more communication buses or signal lines.
[0044] The memory 101 can be used to store software programs and modules, such as the instructions / modules of the user permanent location identification device 300 provided in the embodiment of the present invention, which can be stored in the memory 101 in the form of software or firmware or fixed in the operating system (OS) of the electronic device 100. The processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 101. The communication interface 103 can be used to communicate signaling or data with other node devices.
[0045] Among them, the memory 101 can be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable read-only memory (EEPROM), etc.
[0046] The processor 102 may be an integrated circuit chip with signal processing capability. The processor 102 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0047] Understandably, Figure 1 The structure shown is for illustration only. The electronic device 100 may also include more or fewer components than those shown in FIG. 1 , or may have the same Figure 1 Different configurations shown. Figure 1 The components shown may be implemented in hardware, software or a combination thereof.
[0048] See also Figure 2 , Figure 2 A schematic flow chart of a method for identifying a user's permanent location provided by an embodiment of the present invention. The execution subject of the method may be Figure 1 The electronic device shown, the method may include the following steps:
[0049] S201, according to the type of the permanent place to be identified, from all the user's residence points, obtain multiple residence points within a time period matching the type;
[0050] S202, based on the coordinates and dwell time of each dwell point, determining the location area corresponding to each dwell point and the accumulated dwell time corresponding to each location area;
[0051] S203, aggregating all location areas according to the accumulated stay time and the central location corresponding to each location area, and determining at least one target location area based on the obtained location area cluster;
[0052] S204: Based on the central position of at least one target location area and the accumulated stay duration, obtain the central coordinates of the permanent place to be identified.
[0053] According to the user permanent residence identification method provided by the embodiment of the present invention, first, according to the type of the permanent residence to be identified, the residence points matching the type are obtained, and then based on the coordinates and residence duration of these residence points, multiple location areas and the cumulative residence duration corresponding to each location area can be obtained, and finally these location areas are aggregated to obtain the target location area, and then based on the coordinates and cumulative residence duration of the target location area, the center coordinates of the permanent residence to be identified are obtained. It can be seen that when obtaining the residence points, the embodiment of the present invention takes into account the differences between different types of permanent residences, and obtains the residence points matching the type of the permanent residence to be identified, so that the subsequent results have a certain degree of credibility and accuracy. Furthermore, after obtaining the residence points, the embodiment of the present invention aggregates the location areas corresponding to the residence points, and does not rely on the sequence order of each residence point, thereby solving the instability problem. In addition, in the aggregation process, the cumulative residence duration of each location area is considered, so that the obtained center coordinates of the permanent residence to be identified conform to the actual situation.
[0054] The above steps S201 to S204 are described in detail below in conjunction with the relevant drawings.
[0055] In step S201, according to the type of the permanent place to be identified, a plurality of residence points within a time period matching the type are obtained from all residence points of the user.
[0056] In the embodiment of the present application, the permanent place to be identified may be but is not limited to a workplace, a residence, etc., wherein the time period corresponding to the workplace can be set to the working time period on weekdays, i.e., from 6:00 a.m. to 8:00 p.m. on weekdays. Similarly, the time period corresponding to the residence is the non-working time period on weekdays, i.e., from 8:00 p.m. to 6:00 a.m. the next day. For other types of permanent places, in order to ensure stability, time periods that match them can be customized on weekdays and non-working days, which are not limited here.
[0057] Before executing step S301, the embodiment of the present invention may first obtain all the user's residence points within a preset time window, and then extract the residence points within a time period matching the type from all the residence points as the residence points for subsequent determination of the permanent place to be identified.
[0058] In an optional implementation, the time length of the preset time window is a first preset time length. For example, the first preset time length may be 30 days or 31 days, which is not limited here.
[0059] Through the above processing method, the embodiment of the present invention can use the residence point that matches the permanent place to be identified to identify the location of the residence to be identified, and can eliminate the influence of the unmatched residence point on the identification result, making the identification result more reliable and accurate.
[0060] In step S202, based on the coordinates and the dwell time of each dwell point, the location area corresponding to each dwell point and the accumulated dwell time corresponding to each location area are determined.
[0061] In an embodiment of the present application, the location information of each residence point can be obtained, and the location information includes the coordinates of the residence point, and the start time and end time corresponding to the residence point. The stay duration of each residence point can be obtained according to the time interval between the start time and the end time.
[0062] In an embodiment of the present invention, according to the spatial index algorithm, the distribution of multiple residence points can be seen. The embodiment of the present invention can obtain the location area (also referred to as geohash) where each residence point is located based on the coordinates of each residence point, wherein at least one residence point can be distributed in a location area, then the cumulative residence time corresponding to each location area can be obtained based on the residence time corresponding to each residence point distributed in each location area.
[0063] Therefore, in a possible implementation manner, the present invention provides an implementation manner of step S202, see Figure 3 , Figure 3 A schematic flow chart of step S202 provided in an embodiment of the present invention:
[0064] S202-1, calculating a spatial index value corresponding to each resident point according to the coordinates of each resident point, and determining a location area based on the spatial index value;
[0065] In the embodiment of the present application, one location area corresponds to at least one dwell point. The precision of each spatial index value can be 7 bits, and the width of the location area can be set to 150 meters.
[0066] S202-2: For each location area, based on the stay times of all the stay points corresponding to the location area, determine the accumulated stay time corresponding to the location area.
[0067] For example, if there are 10 stay points distributed in one location area, then the stay times corresponding to the 10 stay points are accumulated, and the accumulated value can be used as the cumulative stay time corresponding to the one location area.
[0068] In the embodiment of the present invention, the accumulated residence time may be used to determine the location of the permanent place to be identified, and may also be used to determine whether the obtained location of the permanent place to be identified is reasonable.
[0069] In step S203, all location areas are aggregated according to the accumulated stay time and the central location corresponding to each location area, and at least one target location area is determined based on the obtained location area cluster.
[0070] In the embodiment of the present application, the center position of each geohash can be obtained according to any existing center position calculation method, which is not limited here.
[0071] For the above step S203, the present application embodiment provides two different implementation methods:
[0072] See also Figure 4 , Figure 4 The schematic flowchart of the first step S203 provided in the embodiment of the present invention, step S203 may include:
[0073] S203-1a, determining the arrangement order of all location areas according to the accumulated stay time.
[0074] In the embodiment of the present application, the arrangement order can be determined according to the cumulative stay time from small to large; or, the arrangement order can be determined according to the cumulative stay time from large to small, which is not limited here.
[0075] S203-2a, starting from the first location area corresponding to the maximum accumulated stay time, traversing the remaining location areas in sequence along the direction of decreasing accumulated stay time in the arrangement sequence.
[0076] In the embodiment of the present application, the location area corresponding to the maximum cumulative stay time is recorded as the first location area. It is considered here that the geohash with the longest daytime on weekdays should be at or near the permanent residence to be identified, which is a reasonable aggregation starting point.
[0077] In the above arrangement order, the first position area is located at the head or tail of the arrangement order, that is, when sorting from small to large according to the cumulative stay time, the first position area is located at the tail; when sorting from large to small according to the cumulative stay time, the first position area is located at the head. In the traversal process, the first position area is taken as the starting point and traversed in the direction of decreasing cumulative stay time.
[0078] For example, assume there are n geohashes, sorted in ascending order as: T(geohash_1) < T(geohash_2) < … < T(geohash_n). Then geohash_n is the first location area, and traverse from geohash_n towards the head direction; assume sorted in ascending order as: T(geohash_n) > T(geohash_2) > … > T(geohash_1). Then geohash_n is the first location area, and traverse from geohash_n towards the tail direction.
[0079] S203-3a, if there is a remaining location area within the preset distance range from the first location area, then determine the remaining location area as the target remaining location area until there is a remaining location area outside the preset distance range from the first location area, and stop traversing.
[0080] In the embodiments of the present application, the remaining location area is the location area other than the first location area. During the traversal process, the location areas that meet the above conditions and the first location area are aggregated into a location area cluster, and each location area in this cluster is a target location area.
[0081] In the embodiments of the present application, the above preset distance range can be defined according to actual needs. In the embodiments of the present application, the preset distance range is preferably 500 meters. Through testing, using 500m can separate these aggregated location area clusters.
[0082] S203-4a, determine the first location area and all target remaining location areas as the target location areas.
[0083] For ease of understanding, assume the above preset distance range is 500 meters. Assume the sequence of location areas obtained in descending order of cumulative stay duration is: EFDSA...BK, and assume each letter represents a location area.
[0084] It can be seen that E is the location area with the longest cumulative stay duration. Then, centered on E, fuse the location areas within 500 meters until a location area beyond 500 meters is encountered, and stop fusing. Assume F and D are within 500m, S is outside 500m, A is within 500m, and other points are outside 500m. Then the obtained aggregation cluster is EFD, and EFD are all target location areas.
[0085] In an embodiment of the present application, once a location area whose distance from the first location area is outside the preset distance range appears during the traversal process, the traversal is stopped, that is, the remaining location areas after this location area will no longer execute the traversal process. For example, in the above example, S is the first location area outside the range of 500m, and after S, A is within the range of 500m. Then A is not used as the target location area. The reason is: although A is within the range of 500m, the cumulative stay time of A is shorter than that of S which is 500m away. At this time, it can be considered that A has actually exceeded the permanent residence to be identified in a broad sense.
[0086] See also Figure 5 , Figure 5 A schematic flowchart of the second step S203 provided in an embodiment of the present invention, step S203 may include:
[0087] S203-1b, based on the central position corresponding to each location area and according to preset clustering parameters, cluster all location areas to obtain a plurality of location area clusters.
[0088] In the embodiment of the present application, the clustering method can be but is not limited to the DBSCAN algorithm, and the preset clustering parameters include the minimum number of resident points for each cluster, the cluster radius, etc. Among them, the minimum number of points can be set to 1 or other values, but in the setting process, it should be avoided that the time on a geohash is very long and there are no other points around that cannot be clustered; Regarding the cluster radius: by adjusting different cluster radii, observe the clusters near each cluster. If the clusters are relatively close, then the radius can be increased. For example, 500m can be used to separate these clusters. If it is found through the graph display that the cluster centers are relatively close, and the work sites can be covered in a broad sense from an intuitive understanding, then the cluster radius needs to be increased.
[0089] S203-2b: For each location area cluster, based on the accumulated stay time corresponding to each location area, obtain the accumulated stay time corresponding to the location area cluster.
[0090] In the embodiment of the present invention, since the accumulated stay time corresponding to each location area is known, the accumulated stay time corresponding to the location areas included in each cluster can be accumulated again, and the accumulated value obtained can be used as the accumulated stay time of a location area cluster.
[0091] S203-3b, determining all location areas in the location area cluster corresponding to the maximum accumulated stay duration as target location areas.
[0092] Through the above Figure 4 and Figure 5 Both of the illustrated implementations can determine a target location area, and then obtain the location of the permanent place to be identified based on the target location area.
[0093] In the specific implementation process, the locations of the permanent places to be identified obtained by the above two implementation methods provided in the embodiment of the present application may be different. It can be found through actual case testing that Figure 5 The implementation shown is more in line with business needs, and the differences between the two implementations are also reflected in: Figure 4 In the illustrated implementation, the time period corresponding to the cluster found by the geohash corresponding to the maximum cumulative dwell time is not the longest. For example, during the working hours, there are interactions of a certain duration on multiple geohashes at location A, while there is basically only one geohash at location B. The longest geohash duration appears at location B, while multiple geohashes at location A can be aggregated together to become the location with the longest duration. Since this difference provides a direction for discovering people who adjust their day and night shifts, a second work location and a second home are added to the original business needs.
[0094] The embodiment of the present invention will also Figure 5 The embodiment shown is compared with the prior art. For example, the embodiment of the present invention obtains the residence point data of 5 million users whose homes, workplaces or jobs and residences overlap within two days and analyzes the Figure 5 See the difference between the embodiment shown and the prior art. Figure 6 , Figure 6 This is a comparison diagram of the user residence identification method provided by an embodiment of the present invention and the prior art.
[0095] It can be seen that the aggregation effect of the method provided by the implementation of the present invention is more stable, and the difference between work and residence is basically stable within the range of 300m, among which, within 100m of the residence: the embodiment of the present invention can achieve basic accuracy for 99.15% of users, while the prior art can only achieve accuracy for 95.26% of users; within 100m of the workplace, the embodiment of the present invention can achieve accuracy for 96.69% of users, while the prior art can only achieve accuracy for 96.29% of users.
[0096] In step S204, based on the central position of at least one target location area and the accumulated stay duration, the central coordinates of the permanent place to be identified are obtained.
[0097] Continuing with the above example, assume that the obtained cluster is EFD, where the geohash center positions corresponding to E, F, and D are expressed in longitude and latitude as: (latE, lonE), (latF, lonF), (latD, lonD); the cumulative stay durations are lenE, lenF, and lenD respectively, and a center point is weighted by the duration to be aggregated as the center position C of the workplace. The longitude of the aggregated center position C is expressed as: latE*lenE+latF*lenF+latD*lenD) / (lenE+lenF+lenD), and the latitude is expressed as: (lonE*lenE+lonF*lenF+lonD*lenD) / (lenE+lenF+lenD).
[0098] It should be noted that the residence to be identified in the embodiment of the present invention, whether it is a residence or a workplace, is a residence or a workplace in a broad sense. This is because: if only one geohash is used as the workplace, the real workplace may be ignored due to the strength of the signaling itself. For example, if there is a base station with a very strong signal but it is very far away, the location of the residence point calculated by the signaling will be biased towards this base station, but the distance is farther; moreover, the workplace in a broad sense is aggregated according to time periods, which can compensate for this situation as much as possible, that is, the real workplace is most likely in the workplace in a broad sense.
[0099] In the embodiment of the present application, the user permanent location identification method provided above can be used to identify the workplace and residence. For other types of permanent locations, existing technologies can be selected for identification, or the method implemented in the present invention can be used for identification, which is not limited here.
[0100] In an optional implementation, in order to determine whether the permanent place to be identified in a broad sense is normal, the embodiment of the present invention also provides a possible implementation: if the sum of the accumulated stay time corresponding to all target location areas is greater than the preset threshold, the center coordinates of the permanent place to be identified are determined to be normal. For example, if the working time is theoretically considered to be 8 hours, then the corresponding daytime is 14 hours, then the preset threshold can be set to 57%. If it does not exceed the preset threshold, it may be a daytime shift or an irregular work place.
[0101] In order to implement the various steps in the above embodiments to achieve the corresponding technical effects, the user permanent location identification method provided in the embodiment of the present application can be executed in a hardware device or in the form of a software module. When the user permanent location identification method is implemented in the form of a software module, the embodiment of the present application also provides a user permanent location identification device, see Figure 7 , Figure 7This is a functional module diagram of a user permanent location identification device provided in an embodiment of the present application. The user permanent location identification device 300 may include:
[0102] An acquisition module 310 is used to acquire, according to the type of the permanent place to be identified, a plurality of residence points within a time period matching the type from all residence points of the user;
[0103] A determination module 320, for determining a location area corresponding to each residence point and a cumulative residence time corresponding to each location area based on the coordinates and residence time of each residence point;
[0104] Aggregation module 330 aggregates all location areas according to the accumulated stay time and the center location corresponding to each location area, and determines at least one target location area based on the obtained location area cluster;
[0105] The identification module 340 is used to obtain the central coordinates of the permanent place to be identified based on the central position of at least one target location area and the accumulated stay time.
[0106] It is understandable that the acquisition module 310, the determination module 320, the aggregation module 330 and the identification module 340 can be executed in a coordinated manner. Figure 2 Each step in the process is performed to achieve the corresponding technical effect.
[0107] In an optional embodiment, the determination module 320 is specifically configured to Figure 3 Each step in the process is performed to achieve the corresponding technical effect.
[0108] In an optional embodiment, the aggregation module 330 is specifically used to Figure 4 or Figure 5 Each step in the process is performed to achieve the corresponding technical effect.
[0109] In an optional implementation, the identification module 340 is further used to: if the sum of the accumulated stay times corresponding to all the target location areas is greater than a preset threshold, determine that the center coordinates of the permanent place to be identified are normal.
[0110] In an optional implementation, the acquisition module 310 is further used to acquire all the user's dwelling points according to a preset time window, and the time length of the preset time window is equal to the first preset time length.
[0111] In an optional implementation, the determination module 320 is further configured to determine the center coordinates of each of the location areas.
[0112] The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A method for identifying a user's permanent location, characterized in that: The method comprises: According to the type of the permanent place to be identified, from all the user's residence points, a plurality of residence points within a time period matching the type are obtained; Based on the coordinates and the dwell time of each of the dwell points, determining the location area corresponding to each of the dwell points and the accumulated dwell time corresponding to each of the location areas; According to the accumulated stay time and the center position corresponding to each of the location areas, all the location areas are aggregated, and based on the obtained location area cluster, at least one target location area is determined, including: determining the arrangement order of all the location areas according to the accumulated stay time; starting from the first location area corresponding to the maximum accumulated stay time, traversing the remaining location areas in sequence along the direction of decreasing accumulated stay time in the arrangement order; if there are remaining location areas whose distance from the first location area is within a preset distance range, determining the remaining location areas as target remaining location areas, until there are remaining location areas whose distance from the first location area is outside the preset distance range, stopping the traversal; determining the first location area and all the target remaining location areas as the target location areas; Based on the central position of the at least one target location area and the accumulated stay time, the central coordinates of the permanent place to be identified are obtained; the central coordinates are obtained by weighting the central position of the target location area according to the accumulated stay time.
2. The method for identifying a user's permanent location according to claim 1, characterized in that: The method further comprises: If the sum of the accumulated stay times corresponding to all the target location areas is greater than a preset threshold, it is determined that the central coordinates of the permanent place to be identified are normal.
3. The method for identifying a user's permanent location according to claim 1, characterized in that: Based on the coordinates and the dwell time of each of the dwell points, determining the location area corresponding to each of the dwell points and the accumulated dwell time corresponding to each of the location areas comprises: According to the coordinates of each of the resident points, a spatial index value corresponding to the resident point is calculated, and the location area is determined based on the spatial index value; wherein one location area corresponds to at least one resident point; For each of the location areas, based on the stay times of all the stay points corresponding to the location area, the accumulated stay time corresponding to the location area is determined.
4. The method for identifying a user's permanent location according to claim 1, characterized in that: Before aggregating all the location areas according to the accumulated stay time and the central location corresponding to each of the location areas to determine at least one target location area, the method further includes: The center coordinates of each of the location areas are determined.
5. The method for identifying a user's permanent location according to claim 1, characterized in that: Before acquiring, according to the type of the permanent place to be identified, a plurality of residence points within a time period matching the type from all residence points of the user, the method further comprises: According to a preset time window, all the user's dwelling points are obtained, and the time length of the preset time window is equal to the first preset time length.
6. A user permanent location identification device, characterized in that: include: An acquisition module, configured to acquire, according to the type of the permanent place to be identified, a plurality of residence points within a time period matching the type from all residence points of the user; A determination module, configured to determine a location area corresponding to each of the residence points and a cumulative residence time corresponding to each of the location areas based on the coordinates and residence time of each of the residence points; An aggregation module is used to aggregate all the location areas according to the cumulative stay time and the center position corresponding to each of the location areas, and determine at least one target location area based on the obtained location area cluster, including: determining the arrangement order of all the location areas according to the cumulative stay time; starting from the first location area corresponding to the maximum cumulative stay time, and traversing the remaining location areas in sequence along the direction of decreasing cumulative stay time in the arrangement order; if there are remaining location areas whose distance from the first location area is within a preset distance range, determining the remaining location areas as target remaining location areas, until there are remaining location areas whose distance from the first location area is outside the preset distance range, stopping the traversal; determining the first location area and all the target remaining location areas as the target location areas; The identification module is used to obtain the central coordinates of the permanent place to be identified based on the central position of at least one target location area and the accumulated residence time; the central coordinates are obtained by weighting the central position of the target location area according to the accumulated residence time.
7. An electronic device, characterized in that: The invention comprises a processor and a memory, wherein the memory stores a computer program executable by the processor, and the processor can execute the computer program to implement the user permanent location identification method according to any one of claims 1 to 5.
8. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for identifying a user's permanent location as claimed in any one of claims 1 to 5 is implemented.
