User residence point identification method and device, electronic equipment and storage medium
By combining graph data model and graph computing technology, the resident segments in user signaling data are identified and offset calibration is performed, and the accuracy of user resident point recognition is improved.
Patent Information
- Application Number
- CN202411679064.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-21
AI Technical Summary
The existing user resident point recognition technology has insufficient accuracy, especially when dealing with dynamic user behavior and data sparse or high noise, it is difficult to adapt to changes in user behavior and generate practical trajectory clusters.
By combining graph data model and graph calculation technology, user signaling data is obtained and target signaling is added. The recursive algorithm is used to identify the resident segment based on the distance threshold and time threshold, and offset calibration is performed through signaling time allocation weights, and finally the resident point is output.
It improves the accuracy of user resident state recognition, solves the inaccuracy of traditional algorithms based on the average position of geometric space as the resident point, and enhances the ability to adapt to dynamic changes in user behavior.
Smart Images

Figure CN119521138A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of information technology support, and in particular, relates to a method, device, electronic device and storage medium for identifying a user residence point. Background Art
[0002] In recent years, mobile phone signaling data has become increasingly unique in the study of user behavior patterns and traffic surveys due to its large sample size, short sampling period, long observation period, wide coverage, and high information value. Researching traffic travel characteristics based on mobile phone signaling data can solve the defects of insufficient sample size and high labor costs in traditional urban traffic surveys, traffic development strategy formulation, and traffic plan evaluation. As an important part of converting user activity patterns into recognizable traffic semantics, stop point recognition is of great significance for using mobile phone signaling as spatiotemporal big data to analyze urban traffic travel and grasp user behavior patterns.
[0003] Existing user stay point recognition technologies have some common shortcomings. First, algorithms based on spatiotemporal rules rely on fixed time and space thresholds, which are difficult to adapt to the dynamic changes of user behavior, and the rule settings may not meet the needs of all scenarios. Second, clustering-based algorithms are very sensitive to parameter selection when processing data, and are prone to generating meaningless trajectory clusters, especially when the data is sparse or noisy, which will affect the accuracy of stay point recognition. Overall, these technologies have certain shortcomings in accuracy and need further improvement and optimization. Summary of the invention
[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for identifying user residence points, which can improve the accuracy and efficiency of network abnormal behavior detection by combining graph data models and graph computing technology.
[0005] In a first aspect, an embodiment of the present application provides a method for identifying a user residence point, which may include:
[0006] Acquire first user signaling data, where the first user signaling data includes at least one day of continuous signaling data of at least one user;
[0007] Adding target signaling to each of the users in the first user signaling data to obtain second user signaling data, wherein the target signaling is a signaling whose start time and end time are both maximum timestamps and whose longitude and latitude are both invalid values;
[0008] Recursively calculating the second user signaling data by a recursive algorithm, and identifying a plurality of resident segments corresponding to each of the users according to a distance threshold and a time threshold;
[0009] According to the signaling duration of each signaling in each of the dwelling segments, a corresponding weight is assigned to each of the signaling, and an offset calibration dwelling point of each of the dwelling segments is calculated;
[0010] The offset calibration dwell point of each dwell segment and the second user signaling data are judged by a recursive algorithm, and the corresponding dwell points of the multiple dwell segments of each user are output.
[0011] In one embodiment, the adding target signaling to each user in the first user signaling data to obtain second user signaling data includes:
[0012] Sorting the first user signaling data according to user order and signaling start time to obtain sorted first user signaling data;
[0013] Based on a preset field in the signaling data, the sorted first user signaling data is cleaned and removed to obtain third user signaling data;
[0014] The adding target signaling to each of the users in the first user signaling data to obtain second user signaling data includes:
[0015] Add target signaling to each of the users in the third user signaling data to obtain second user signaling data.
[0016] In one embodiment, the recursive calculation of the second user signaling data by a recursive algorithm is performed, and multiple resident segments corresponding to each user are obtained according to the distance threshold and the time threshold identification, including:
[0017] According to the second user signaling data, calculate the spherical distance between base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data;
[0018] In order of the signaling start time of the users, the spherical distances of the base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data are compared according to the distance threshold, and a plurality of possible resident segments that meet the distance threshold are obtained;
[0019] The multiple possible residence segments are judged according to the time threshold to obtain multiple residence segments corresponding to each of the users.
[0020] In one embodiment, the above-mentioned step of calculating, according to the second user signaling data, the spherical distance between base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data includes:
[0021] The spherical distance between base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data is calculated by formula 1 and formula 2;
[0022]
[0023] Among them, lat i is the latitude of the base station associated with the i-th signaling record of the user, distance is the distance between the i-th signaling record of the user and / or the base station location of the j-th signaling record, the unit of distance is km, and 6371000 is the radius of the earth.
[0024] In one embodiment, the above-mentioned allocating a corresponding weight to each signaling according to the signaling duration of each signaling in each of the dwelling segments, and calculating the offset calibration dwelling point of each of the dwelling segments, includes:
[0025] According to the signaling data of the target resident segment and the target user, the signaling duration of each signaling in the target resident segment is calculated, the target resident segment is any one of the multiple resident segments, and the target user is a user corresponding to the target resident segment;
[0026] Calculate the time weight of each signaling according to the signaling duration of each signaling in the target dwelling segment and the signaling data of the target user;
[0027] An offset calibration dwell point of the target user in the target dwell segment is calculated according to the signaling data of the target user, the signaling duration of each signaling in the target dwell segment, and the time weight.
[0028] In one embodiment, the above-mentioned method of determining the offset calibration dwell point of each dwell segment and the second user signaling data by a recursive algorithm and outputting the user dwell point result includes:
[0029] Sorting and arranging the offset calibration dwell point and the second user signaling data of each dwell segment according to the signaling time and the user to obtain a user signaling data set;
[0030] The user signaling data set is input into the recursive algorithm, and the corresponding dwelling points of the multiple dwelling segments of each user are identified according to the distance threshold and the time threshold.
[0031] In a second aspect, an embodiment of the present application provides a user residence point identification device, which may include:
[0032] An acquisition module, configured to acquire first user signaling data, wherein the first user signaling data includes at least one day of continuous signaling data of at least one user;
[0033] An adding module, configured to add a target signaling to each of the users in the first user signaling data to obtain second user signaling data, wherein the target signaling is a signaling whose start time and end time are both maximum timestamps and whose longitude and latitude are both invalid values;
[0034] A first calculation module, configured to perform recursive calculation on the second user signaling data by a recursive algorithm, and obtain a plurality of resident segments corresponding to each of the users according to a distance threshold and a time threshold identification;
[0035] A second calculation module is used to assign a corresponding weight to each signaling according to the signaling duration of each signaling in each of the resident segments, and calculate the offset calibration resident point of each of the resident segments;
[0036] The judgment module is used to judge the offset calibration dwelling point of each dwelling segment and the second user signaling data through a recursive algorithm, and output the corresponding dwelling points of the multiple dwelling segments of each user.
[0037] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising:
[0038] processor;
[0039] a memory for storing processor-executable instructions;
[0040] The processor is configured to execute instructions to implement the user residence point identification method as shown in any one of the embodiments of the first aspect.
[0041] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, a method for identifying a user residence point as shown in any one of the embodiments of the first aspect is implemented.
[0042] In the fifth aspect, an embodiment of the present application further provides a computer program product, which includes a computer program stored in a readable storage medium, and at least one processor of the device reads and executes the computer program from the storage medium, so that the device executes the user residence point identification method shown in any embodiment of the first aspect.
[0043] The embodiments of the present application provide a method, device, electronic device and storage medium for identifying a user's residence point. Compared with the prior art, the present application has the following beneficial effects:
[0044] The embodiment of the present application provides a user residence point identification method, device, electronic device and storage medium, which adds a target signaling to each user in the acquired first user signaling data to obtain second user signaling data, wherein the target signaling is a signaling whose start time and end time are both maximum timestamps and whose longitude and latitude are both invalid values, and recursively calculates the second user signaling data through a recursive algorithm, and obtains multiple residence segments corresponding to each user according to the distance threshold and time threshold identification. According to the signaling duration of each signaling in each of the residence segments, a corresponding weight is assigned to each signaling, and the offset calibration residence point of each of the residence segments is calculated. Finally, the offset calibration residence point of each of the residence segments and the second user signaling data are judged through a recursive algorithm, and the corresponding residence points of the multiple residence segments of each of the users are output.
[0045] Therefore, different weights are assigned to the longitude and latitude of different signaling points according to the signaling duration of the residence segment. The longer the signaling time is, the closer the actual residence point of the user is to the target base station. This solves the inaccuracy of the traditional algorithm based on the average position of the geometric space as the residence point, and can improve the accuracy of identifying the user's residence status. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0047] Figure 1 It is a flowchart of a method for identifying a user residence point provided in an embodiment of the present application;
[0048] Figure 2 It is a flowchart of another method for identifying a user residence point provided in an embodiment of the present application;
[0049] Figure 3 It is a schematic diagram of user dwell point offset calibration provided in an embodiment of the present application;
[0050] Figure 4 It is a structural schematic diagram of a user residence point identification device provided in an embodiment of the present application;
[0051] Figure 5 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0053] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0054] Based on the background technology, it can be seen that the existing technical solutions have some common shortcomings. First, the algorithms based on spatiotemporal rules rely on fixed time and space thresholds, which are difficult to adapt to the dynamic changes of user behavior, and the rule settings may not meet the needs of all scenarios. Secondly, the clustering-based algorithms are very sensitive to parameter selection when processing data, and are prone to generating meaningless trajectory clusters, especially when the data is sparse or noisy, which will affect the accuracy of stay point identification.
[0055] In order to solve the problems existing in the prior art, the embodiments of the present application provide a method, device, electronic device and storage medium for identifying user residence points. A target signaling is added to each user in the acquired first user signaling data to obtain second user signaling data. The target signaling is a signaling whose start time and end time are both maximum timestamps and whose longitude and latitude are both invalid values. The second user signaling data is recursively calculated by a recursive algorithm, and multiple residence segments corresponding to each user are obtained according to the distance threshold and time threshold identification. According to the signaling duration of each signaling in each of the residence segments, a corresponding weight is assigned to each signaling, and the offset calibration residence point of each of the residence segments is calculated. Finally, the offset calibration residence point of each of the residence segments and the second user signaling data are judged by a recursive algorithm, and the corresponding residence points of the multiple residence segments of each user are output.
[0056] Therefore, different weights are assigned to the longitude and latitude of different signaling points according to the signaling duration of the residence segment. The longer the signaling time is, the closer the actual residence point of the user is to the target base station. This solves the inaccuracy of the traditional algorithm based on the average position of the geometric space as the residence point, and can improve the accuracy of identifying the user's residence status.
[0057] The present application embodiment provides a user residence point identification method, device, electronic device and storage medium. The following first introduces the user residence point identification method provided by the present application embodiment. Figure 1 As shown, the user residence point identification method provided in the embodiment of the present application includes the following steps:
[0058] S101: Acquire first user signaling data, where the first user signaling data includes at least one day of continuous signaling data of at least one user;
[0059] S102: Add target signaling to each of the users in the first user signaling data to obtain second user signaling data, wherein the target signaling is a signaling whose start time and end time are both maximum timestamps and whose longitude and latitude are both invalid values;
[0060] S103: recursively calculating the second user signaling data by a recursive algorithm, and obtaining a plurality of resident segments corresponding to each of the users according to a distance threshold and a time threshold identification;
[0061] S104: assigning a corresponding weight to each signaling according to the signaling duration of each signaling in each of the dwelling segments, and calculating an offset calibration dwelling point of each of the dwelling segments;
[0062] S105: judging the offset calibration dwelling point of each dwelling segment and the second user signaling data through a recursive algorithm, and outputting corresponding dwelling points of the multiple dwelling segments of each user.
[0063] The embodiment of the present application provides a method, device, electronic device and storage medium for identifying user residence points. A target signaling is added to each user in the acquired first user signaling data to obtain second user signaling data. The target signaling is a signaling whose start time and end time are both maximum timestamps and whose longitude and latitude are both invalid values. The second user signaling data is recursively calculated by a recursive algorithm, and multiple residence segments corresponding to each user are obtained according to the distance threshold and time threshold identification. According to the signaling duration of each signaling in each of the residence segments, a corresponding weight is assigned to each signaling, and the offset calibration residence point of each of the residence segments is calculated. Finally, the offset calibration residence point of each of the residence segments and the second user signaling data are judged by a recursive algorithm, and the corresponding residence points of the multiple residence segments of each user are output.
[0064] In S101, user signaling data is obtained and grouped and sorted. The continuous signaling data of the user on a single day or multiple days is obtained, and the detailed information of the signaling data is shown in Table 1;
[0065] Table 1: Detailed information of signaling data
[0066]
[0067]
[0068] In one example, the adding target signaling to each of the users in the first user signaling data to obtain second user signaling data includes:
[0069] Sorting the first user signaling data according to user order and signaling start time to obtain sorted first user signaling data;
[0070] Based on a preset field in the signaling data, the sorted first user signaling data is cleaned and removed to obtain third user signaling data;
[0071] The adding target signaling to each of the users in the first user signaling data to obtain second user signaling data includes:
[0072] Add target signaling to each of the users in the third user signaling data to obtain second user signaling data.
[0073] In the above embodiment, the signaling start time is sorted for each user according to the user sorting, and the sorted first user signaling data is obtained. Then, the sorted first user signaling data is cleaned. This may include screening samples in which the "UID", "longitude" and "latitude" fields in the signaling records are all invalid values, and these are manually removed as abnormal values in the first user signaling data to obtain the third user signaling data.
[0074] In S102, a line of signaling is added for each user in the first user signaling data, in which the signaling start time and end time are both the maximum timestamp (for example, the maximum time that the system can represent), and the longitude and latitude are both invalid values, so as to solve the problem that the recursive algorithm cannot identify the continuity or discontinuity of the resident segment of the last signaling in the user's original signaling. It should be noted that the invalid value here can be -1, indicating that this is an invalid geographical location, and the algorithm will not process it as an actual geographical location, which is not limited here. In this way, it can be ensured that the target signaling is always at the end of all signaling. The target signaling mainly has the following functions: when the algorithm processes the last valid signaling of the user, due to the existence of this virtual signaling, the algorithm can continue to execute without worrying about not being able to judge the end condition of the resident segment because there is no next signaling. Through this virtual signaling, the algorithm can force the triggering of the judgment of the last valid signaling, ensuring that any possible resident segment will not be missed due to the lack of subsequent signaling.
[0075] In S103, the acquired signaling data of the second user is first sorted according to the signaling time, and then a recursive algorithm is used to traverse the user's signaling data according to the distance threshold and the time threshold, and the distance and the stay time between the signals are calculated one by one to determine whether the distance threshold and the time threshold are met. It should be noted that the distance threshold and the time threshold can be set according to actual needs and are not limited here. For example, assume that the distance threshold is set to 0.5 kilometers. This means that if the distance between two signaling records is less than 0.5 kilometers, the system will consider them to belong to the same residence segment. Similarly, assume that the time threshold is set to 30 minutes. This means that if the user stays at a certain place for more than 30 minutes, the place is identified as a residence point.
[0076] The logic of the recursive algorithm may include: after grouping by user, sorting in order by the user's signaling start time, searching for subsequent signaling in sequence, until the first signaling exceeding the distance threshold (0.5km) is retrieved, at which time the previous signaling of the signaling is within the distance threshold (0.5km), and in this way, the goal of dividing the maximum possible residence segment is achieved when controlling the distance threshold; when the distance threshold is met, judging whether the residence time meets the time threshold (30min), that is, whether the end time of the signaling - the start time of the first signaling is greater than or equal to 30min. It should be noted that due to the possible discontinuity of the signaling, when judging the time threshold, even if the duration of the next signaling exceeds the time threshold, its previous signaling may not meet the time threshold, and this feature has a more obvious impact on the tail-end signaling. For example, according to the user's activity patterns, the user's last signal is generally between 23:00 and 0:00 at night. When the last signal is a dwell segment, the possible dwell time of some users does not meet the 30-minute time threshold. Therefore, it is necessary to additionally judge whether the previous signal of the detected possible end signal of the dwell segment meets the 30-minute dwell time.
[0077] In one example, recursively calculating the second user signaling data by a recursive algorithm, and identifying and obtaining multiple resident segments corresponding to each of the users according to a distance threshold and a time threshold, includes:
[0078] According to the second user signaling data, calculate the spherical distance between base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data;
[0079] In order of the signaling start time of the users, the spherical distances of the base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data are compared according to the distance threshold, and a plurality of possible resident segments that meet the distance threshold are obtained;
[0080] The multiple possible residence segments are judged according to the time threshold to obtain multiple residence segments corresponding to each of the users.
[0081] In the above embodiment, the step of calculating, according to the second user signaling data, the spherical distance between base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data may include:
[0082] The spherical distance between base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data is calculated by formula 1 and formula 2;
[0083]
[0084] Among them, lat iis the latitude of the base station associated with the i-th signaling record of the user, distance is the distance between the i-th signaling record of the user and / or the base station location of the j-th signaling record, the unit of distance is km, and 6371000 is the radius of the earth.
[0085] Then, the algorithm logic of the recursive algorithm that defines the resident segment is as follows:
[0086] Input parameter: user's signaling data bs i ={countyId i ,latitude i ,longitude i ,procedureStartTime i ,procedureEndTimegeohash i}, distance threshold distThreh (0.5km), time threshold timeThreh (30min);
[0087] Output parameter: The set of stationary points formed by SP = {S}, where S i ={UID,countyId i ,orderedStart i ,orderedEnd i ,latitude_loc i ,longitude_loc i ,arriveTime i ,leaveTime i}, the detailed information of the resident data is shown in Table 2 below:
[0088] Table 2: Details of the resident data
[0089]
[0090]
[0091] Recursive logic: After grouping by user, sort in order by the user's signaling start time, and search for subsequent signaling in sequence until the first signaling that exceeds the distance threshold (0.5km) is retrieved. At this time, the previous signaling of this signaling is within the distance threshold (0.5km). In this way, the goal of dividing the maximum possible residence segment is achieved when controlling the distance threshold; when the distance threshold is met, determine whether the residence time meets the time threshold (30min), that is, whether the end time of this signaling - the start time of the first signaling is greater than or equal to 30min.
[0092] Supplementary logic: It should be noted that due to the possible discontinuity of signaling, when judging the time threshold, even if the duration of the next signaling exceeds the time threshold, its previous signaling may not meet the time threshold. This feature has a more obvious impact on the tail-end signaling. For example, according to the user's activity pattern, the user's last signaling is generally between 23:00 and 0:00 at night. When the last signaling is a dwell segment, the possible dwelling duration of some users may not meet the 30-minute time threshold, so it is necessary to additionally judge whether the previous signaling of the possible end signaling of the detected dwell segment meets the 30-minute dwelling duration.
[0093] In S104, according to the signaling data of each user, the signaling duration of each signaling, the time weight of each signaling and the predicted dwelling point of the user in the dwelling segment between signaling (i.e., the offset calibration dwelling point) are calculated to obtain the latitude and longitude of the dwelling segment. That is, different weights are assigned to the longitude and latitude of each signaling according to the signaling duration of different signaling between the first signaling and the tail signaling in the dwelling segment, and the dwelling point of the dwelling segment is calculated to achieve the offset calibration of the dwelling point.
[0094] In one example, the assigning a corresponding weight to each signaling according to the signaling duration of each signaling in each of the dwelling segments, and calculating the offset calibration dwelling point of each of the dwelling segments, includes:
[0095] According to the signaling data of the target resident segment and the target user, the signaling duration of each signaling in the target resident segment is calculated, the target resident segment is any one of the multiple resident segments, and the target user is a user corresponding to the target resident segment;
[0096] Calculate the time weight of each signaling according to the signaling duration of each signaling in the target dwelling segment and the signaling data of the target user;
[0097] An offset calibration dwell point of the target user in the target dwell segment is calculated according to the signaling data of the target user, the signaling duration of each signaling in the target dwell segment, and the time weight.
[0098] In the above embodiment, in the above recursive steps, the possible signaling start index i and end index j of the resident segment have been obtained through the distance threshold (0.5 km) and the time threshold (30 min). In such a resident segment interval, according to the signaling data bS of each user, i ={countyId i ,latitude i ,longitude i ,procedureStartTime i
[0099] ,procedureEndTime i}, calculate the following three indicators:
[0100] 1. The signaling duration of each signaling is calculated as follows:
[0101] duration k =procedureStartTime k -procedureEndTime k
[0102] Add it to the user's signaling data bS i In
[0103] B i ={countyId i ,latitude i ,longitude i ,procedureStartTime i ,
[0104] procedureEndTime i ,duration i}
[0105] 2. The time weight of each signal is calculated as follows:
[0106]
[0107] bS k [5] represents the signaling duration of the kth signaling;
[0108] 3. The predicted dwell point of the user in the dwell segment between signaling i and j-1:
[0109]
[0110] According to bS i ={countyId i ,latitude i ,longitude i ,procedureStartTime i ,procedureEndTime i ,duration i}, where bS k [1],bS k [2] represents the latitude and longitude of the signal; S i ={UID,countyIdi ,orderedStart i ,orderedEnd i ,latitude_loc i ,longitude_loc i ,arriveTime i ,leaveTime i},S i {[4],[5]} represent the resident segment S respectively. i The latitude and longitude of the station. That is, the signaling time W of different signaling between the first signaling and the tail signaling in the resident segment k , for each signaling longitude and latitude {bS k [1],bS k [2]} Assign different weights and calculate the residence point S of the residence segment i {[4],[5]}, realize the offset calibration of the dwelling point. The dwelling point can be shifted closer to the dwelling position of the actual residence by the time weighting method, thereby realizing the offset calibration of the dwelling point in the dwelling area.
[0111] In S105, the signaling data of each user is obtained from the system, which includes the daily base station communication records. Each record contains information such as the base station ID, longitude and latitude, and the start and end time of the signaling. The signaling records of each user are sorted according to the signaling start time to ensure that the data is arranged in chronological order for subsequent processing. The sorted signaling data is passed to the recursive algorithm. The algorithm identifies the resident segment based on the preset distance threshold and time threshold. The algorithm checks the signaling records one by one to determine whether the distance and time conditions are met to determine the resident segment. After being processed by the recursive algorithm, the identification result of each user is output, including the user's multiple resident segment information. This information includes data such as the time range and resident point of each resident segment.
[0112] In one embodiment, the method of determining the offset calibration dwell point of each dwell segment and the second user signaling data by a recursive algorithm and outputting a user dwell point result includes:
[0113] Sorting and arranging the offset calibration dwell point and the second user signaling data of each dwell segment according to the signaling time and the user to obtain a user signaling data set;
[0114] The user signaling data set is input into the recursive algorithm, and the corresponding dwelling points of the multiple dwelling segments of each user are identified according to the distance threshold and the time threshold.
[0115] In the above embodiment, the signaling data of the user is transmitted. Each user communicates with the base station every day, so the communication base station set of each user every day is Where u∈UID is used to index the user, t∈T is the distribution date of the user signaling data, and N {u,t} represents the number of handovers between user u and the base station during the target time interval on date t, bs i (1≤i≤N) represents the base station information of each handover, which is bs i ={countyId i ,latitude i ,longitude i ,procedureStartTime i ,procedureEndTimegeohash i All the sorted signaling data of each user (ie, the user signaling data set) are passed into the recursive algorithm for identifying the resident segment to obtain the identified resident result.
[0116] In order to better illustrate the method provided by the embodiment of the present application, the following is an introduction based on a specific embodiment. Figure 2 The flowchart of the method for identifying a user's residence point is shown in FIG. 1 , and the scheme includes:
[0117] Step 1: Obtain user signaling data and sort by groups. Obtain the continuous signaling data of the user on a single day or multiple days, and sort the signaling start time for each user after sorting the users. The detailed information of the signaling data is shown in Table 2 above.
[0118] Step 2: Data cleaning. Filter the samples in which the "UID", "longitude" and "latitude" fields in the signaling records are all invalid values, and manually remove them as outliers in the user signaling data.
[0119] Step 3: Data processing. For each user, add a line of signaling with the start and end times both being the maximum timestamp and the longitude and latitude both being -1, to solve the problem that the recursive algorithm cannot identify the continuity or discontinuity of the last signaling segment in the user's original signaling.
[0120] Step 4: Define a function to calculate the spherical distance between two points. The calculation formula is as follows:
[0121]
[0122] (Unit: km)
[0123] where lat iis the latitude of the base station location associated with the i-th signaling of the user, distance is the distance between the i-th signaling record of the user and / or the base station location of the j-th signaling record, and 6371000 is the radius of the earth.
[0124] Step 5: Define a recursive algorithm for identifying resident segments. The algorithm logic is as follows:
[0125] Input parameter: user's signaling data bs i ={countyId i ,latitude i ,longitude i ,procedureStartTime i ,procedureEndTimegeohash i}, distance threshold distThreh (0.5km), time threshold timeThreh (30min);
[0126] Output parameter: The set of stationary points formed by SP = {S}, where S i ={UID,countyId i ,orderedStart i ,orderedEnd i ,latitude_loc i ,longitude_loc i ,arriveTime i ,leaveTime i}, the detailed information of the resident data is shown in the above Table 2.
[0127] Recursive logic: After grouping by user, sort in order by the user's signaling start time, and search for subsequent signaling in sequence until the first signaling that exceeds the distance threshold (0.5km) is retrieved. At this time, the previous signaling of this signaling is within the distance threshold (0.5km). In this way, the goal of dividing the maximum possible residence segment is achieved when controlling the distance threshold; when the distance threshold is met, determine whether the residence time meets the time threshold (30min), that is, whether the end time of this signaling - the start time of the first signaling is greater than or equal to 30min.
[0128] Supplementary logic: It should be noted that due to the possible discontinuity of signaling, when judging the time threshold, even if the duration of the next signaling exceeds the time threshold, its previous signaling may not meet the time threshold. This feature has a more obvious impact on the tail-end signaling. For example, according to the user's activity pattern, the user's last signaling is generally between 23:00 and 0:00 at night. When the last signaling is a residence segment, the possible residence duration of some users does not meet the 30-minute time threshold. Therefore, it is necessary to supplement the judgment of whether the previous signaling of the possible end signaling of the detected residence segment meets the 30-minute residence duration. The pseudo code of the recursive algorithm is as follows:
[0129]
[0130]
[0131] Offset calibration logic: In the above recursive steps, the possible signaling start index i and end index j of the dwell segment have been obtained through the distance threshold (0.5km) and time threshold (30min). In such a dwell segment interval, according to the signaling data bS of each user, i ={countyId i ,latitude i ,longitude i ,procedureStartTime i
[0132] ,procedureEndTime i}, calculate the following three indicators:
[0133] 1. The signaling duration of each signaling is calculated as follows:
[0134] duration k =procedureStartTime k -procedureEndTime k
[0135] Add it to the user's signaling data bS i In
[0136] B i ={countyId i ,latitude i ,longitude i ,procedureStartTime i ,
[0137] procedureEndTime i,duration i}
[0138] 2. The time weight of each signal is calculated as follows:
[0139]
[0140] bS k [5] represents the signaling duration of the kth signaling;
[0141] 3. The predicted dwell point of the user in the dwell segment between signaling i and j-1:
[0142]
[0143] According to bS i ={countyId i ,latitude i ,longitude i ,procedureStartTime i ,procedureEndTime i ,duration i}, where bS k [1],bS k [2] represents the latitude and longitude of the signal; S i ={UID,countyId i ,orderedStart i ,orderedEnd i ,latitude_loc i ,longitude_loc i ,arriveTime i ,leaveTime i},S i {[4],[5]} represent the resident segment S respectively. i The latitude and longitude of the station. That is, the signaling time W of different signaling between the first signaling and the tail signaling in the resident segment k , for each signaling longitude and latitude {bS k [1],bS k [2]} Assign different weights and calculate the residence point S of the residence segment i {[4],[5]}, realize the offset calibration of the dwelling point. The dwelling point can be shifted closer to the dwelling position of the actual residence by the time weighting method, thereby realizing the offset calibration of the dwelling point in the dwelling area.
[0144] See Figure 3It can be known that the dwelling point can be shifted closer to the dwelling position of the actual residence through the time weighting method, thereby realizing the offset calibration of the dwelling point in the dwelling area.
[0145] Step 6: Incoming user signaling data. Each user communicates with the base station every day, so the set of base stations that each user communicates with every day is Where u∈UID is used to index the user, t∈T is the distribution date of the user signaling data, and N {u,t} represents the number of handovers between user u and the base station during the target time interval on date t, bs i (1≤i≤N) represents the base station information of each handover, which is bs i ={countyId i ,latitude i ,longitude i ,procedureStartTime i ,procedureEndTimegeohash i All the sorted signaling data of each user are passed into the recursive algorithm for identifying the resident segment to obtain the identified resident result.
[0146] Based on a user residence point identification method provided in the above embodiment, accordingly, Figure 4 As shown, the embodiment of the present application provides a user residence point identification device 400, which may include:
[0147] An acquisition module 401 is configured to acquire first user signaling data, where the first user signaling data includes at least one day of continuous signaling data of at least one user;
[0148] An adding module 402 is used to add a target signaling to each of the users in the first user signaling data to obtain second user signaling data, wherein the target signaling is a signaling whose start time and end time are both maximum timestamps and whose longitude and latitude are both invalid values;
[0149] A first calculation module 403 is used to perform recursive calculation on the second user signaling data through a recursive algorithm, and obtain multiple resident segments corresponding to each of the users according to the distance threshold and the time threshold identification;
[0150] The second calculation module 404 is used to assign a corresponding weight to each signaling according to the signaling duration of each signaling in each of the dwelling segments, and calculate the offset calibration dwelling point of each of the dwelling segments;
[0151] The judgment module 405 is used to judge the offset calibration dwelling point of each dwelling segment and the second user signaling data through a recursive algorithm, and output the corresponding dwelling points of the multiple dwelling segments of each user.
[0152] In one embodiment, adding a module may include:
[0153] A sorting module, used to sort the first user signaling data according to user sorting and signaling start time to obtain sorted first user signaling data;
[0154] A cleaning module, configured to clean and remove the sorted first user signaling data based on a preset field in the signaling data to obtain third user signaling data;
[0155] The adding module can also be specifically used for:
[0156] Add target signaling to each of the users in the third user signaling data to obtain second user signaling data.
[0157] In one embodiment, the first calculation module may include:
[0158] A first calculation unit, configured to calculate, according to the second user signaling data, a spherical distance between base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data;
[0159] A first comparison unit is used to compare the spherical distances of base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data according to the distance threshold in the order of the signaling start time of the user, and divide them into multiple possible resident segments that meet the distance threshold;
[0160] The first judgment unit is used to judge the multiple possible residence segments according to the time threshold to obtain multiple residence segments corresponding to each of the users.
[0161] In one embodiment, the first computing unit may be specifically configured to:
[0162] The spherical distance between base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data is calculated by formula 1 and formula 2;
[0163]
[0164] Among them, lat i is the latitude of the base station associated with the i-th signaling of the user, distance is the distance between the i-th signaling record and / or the j-th signaling record of the user and the base station, the unit of distance is km, and 6371000 is the radius of the earth.
[0165] In one embodiment, the second calculation module may be specifically used for:
[0166] According to the signaling data of the target resident segment and the target user, the signaling duration of each signaling in the target resident segment is calculated, the target resident segment is any one of the multiple resident segments, and the target user is a user corresponding to the target resident segment;
[0167] Calculate the time weight of each signaling according to the signaling duration of each signaling in the target dwelling segment and the signaling data of the target user;
[0168] An offset calibration dwell point of the target user in the target dwell segment is calculated according to the signaling data of the target user, the signaling duration of each signaling in the target dwell segment, and the time weight.
[0169] In one embodiment, the determination module may be specifically used for:
[0170] Sorting and arranging the offset calibration dwell point and the second user signaling data of each dwell segment according to the signaling time and the user to obtain a user signaling data set;
[0171] The user signaling data set is input into the recursive algorithm, and the corresponding dwelling points of the multiple dwelling segments of each user are identified according to the distance threshold and the time threshold.
[0172] Based on the user residence point identification method and device provided in the above embodiments, the embodiment of the present application further provides an electronic device 500, such as Figure 5 As shown:
[0173] The invention comprises a processor 501, a memory 502, and a computer program stored in the memory 502 and executable on the processor 501. When the computer program is executed by the processor 501, each process of the above-mentioned user residence point identification method embodiment is implemented, and the same technical effect can be achieved.
[0174] Specifically, the processor 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0175] The memory 502 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 502 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 502 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 502 is a non-volatile solid-state memory.
[0176] In certain embodiments, the memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of the present application.
[0177] The processor 501 reads and executes the computer program instructions stored in the memory 502 to implement any one of the user residence point identification methods in the above embodiments.
[0178] In one example, the electronic device may further include a communication interface 503 and a bus 510. As an example, Figure 5 As shown, the processor 501, the memory 502, and the communication interface 503 are connected via a bus 510 and communicate with each other.
[0179] The communication interface 503 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0180] Bus 510 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 510 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0181] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned user residence point identification method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0182] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0183] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0184] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0185] The above reference is according to the flowchart and / or block diagram of the method, device and computer program product of the embodiment of the present application to describe various aspects of the present application.It should be understood that each square block in the flowchart and / or block diagram and the combination of each square block in the flowchart and / or block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square blocks of the flowchart and / or block diagram.Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square block in the block diagram and / or flowchart and the combination of square blocks in the block diagram and / or flowchart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.
[0186] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A method for identifying a user's residence point, characterized in that: include: Acquire first user signaling data, where the first user signaling data includes at least one day of continuous signaling data of at least one user; Adding target signaling to each of the users in the first user signaling data to obtain second user signaling data, wherein the target signaling is a signaling whose start time and end time are both maximum timestamps and whose longitude and latitude are both invalid values; Recursively calculating the second user signaling data by a recursive algorithm, and identifying a plurality of resident segments corresponding to each of the users according to a distance threshold and a time threshold; According to the signaling duration of each signaling in each of the dwelling segments, a corresponding weight is assigned to each of the signaling, and an offset calibration dwelling point of each of the dwelling segments is calculated; The offset calibration dwell point of each dwell segment and the second user signaling data are judged by a recursive algorithm, and the corresponding dwell points of the multiple dwell segments of each user are output.
2. The method according to claim 1, characterized in that The adding target signaling to each of the users in the first user signaling data to obtain second user signaling data includes: Sorting the first user signaling data according to user order and signaling start time to obtain sorted first user signaling data; Based on a preset field in the signaling data, the sorted first user signaling data is cleaned and removed to obtain third user signaling data; The adding target signaling to each of the users in the first user signaling data to obtain second user signaling data includes: Add target signaling to each of the users in the third user signaling data to obtain second user signaling data.
3. The method according to claim 2, characterized in that The recursive calculation of the second user signaling data by a recursive algorithm, and obtaining a plurality of resident segments corresponding to each of the users according to a distance threshold and a time threshold identification, includes: According to the second user signaling data, calculate the spherical distance between base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data; In order of the signaling start time of the users, the spherical distances of the base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data are compared according to the distance threshold, and a plurality of possible resident segments that meet the distance threshold are obtained; The multiple possible residence segments are judged according to the time threshold to obtain multiple residence segments corresponding to each of the users.
4. The method according to claim 3, characterized in that The calculating, according to the second user signaling data, a spherical distance between base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data comprises: The spherical distance between base stations corresponding to each two adjacent signalings corresponding to each user in the second user signaling data is calculated by formula 1 and formula 2; Among them, lat i is the latitude of the base station associated with the i-th signaling record of the user, distance is the distance between the i-th signaling record and the j-th signaling record of the user, the unit of distance is km, and 6371000 is the radius of the earth.
5. The method according to claim 1, characterized in that The allocating a corresponding weight to each signaling according to the signaling duration of each signaling in each of the resident segments, and calculating the offset calibration resident point of each of the resident segments, comprises: According to the signaling data of the target resident segment and the target user, the signaling duration of each signaling in the target resident segment is calculated, the target resident segment is any one of the multiple resident segments, and the target user is a user corresponding to the target resident segment; Calculate the time weight of each signaling according to the signaling duration of each signaling in the target dwelling segment and the signaling data of the target user; An offset calibration dwell point of the target user in the target dwell segment is calculated based on the signaling data of the target user, the signaling duration of each signaling in the target dwell segment, and the time weight.
6. The method according to claim 5, characterized in that The method of judging the offset calibration dwell point of each dwell segment and the second user signaling data by a recursive algorithm and outputting a user dwell point result includes: Sorting and arranging the dwell point and the second user signaling data of each dwell segment according to the signaling time and the user to obtain a user signaling data set; The user signaling data set is input into the recursive algorithm, and the corresponding dwelling points of the multiple dwelling segments of each user are identified according to the distance threshold and the time threshold.
7. A user residence point identification device, characterized in that: The device comprises: An acquisition module, configured to acquire first user signaling data, wherein the first user signaling data includes at least one day of continuous signaling data of at least one user; An adding module, configured to add a target signaling to each of the users in the first user signaling data to obtain second user signaling data, wherein the target signaling is a signaling whose start time and end time are both maximum timestamps and whose longitude and latitude are both invalid values; A first calculation module, configured to perform recursive calculation on the second user signaling data by a recursive algorithm, and obtain a plurality of resident segments corresponding to each of the users according to a distance threshold and a time threshold identification; A second calculation module is used to assign a corresponding weight to each signaling according to the signaling duration of each signaling in each of the resident segments, and calculate the offset calibration resident point of each of the resident segments; The judgment module is used to judge the offset calibration dwelling point of each dwelling segment and the second user signaling data through a recursive algorithm, and output the corresponding dwelling points of the multiple dwelling segments of each user.
8. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for identifying a user residence point according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method for identifying a user residence point according to any one of claims 1 to 6 is implemented.
10. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the user residence point identification method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Traveler home-work location identification and trip chain depicting method based on mobile phone signaling data
CN105142106A
User residing location identification method based on mobile signaling data
CN105682025A
Population identifying method based on cellular signal data
CN107133318A
Vehicle travel common stop point mining method and device based on vehicle passing data
CN110851490A
Mobile phone signaling stay point identification method based on personal travel trajectory characteristics
CN111770452A