User query method and device, electronic device and computer storage medium
By dividing the user's movement trajectory information into blocks and analyzing base station location signaling, the problem of difficulty in obtaining GPS data in the existing technology is solved, efficient and accurate query of peer users is achieved, and the probability of missed detection is reduced.
Patent Information
- Application Number
- CN202011503605.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-17
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2040-12-17
AI Technical Summary
The existing peer passenger query method requires obtaining user GPS data, which makes the query difficult to implement and affects the accuracy of the results.
By determining the user's movement trajectory information and the movement trajectory information of the user to be analyzed, block division is performed, and based on the base station location signaling without obtaining GPS data, it is determined whether the users have the same itinerary.
It realizes querying peer users without obtaining GPS data, reduces the probability of missed detection caused by location signal drift, and improves the integrity of query results.
Smart Images

Figure CN114650502B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a user query method and device, electronic equipment and computer storage medium. Background Art
[0002] With the rapid development of rail transit, people's long-distance travel has become more and more convenient and frequent. There are more and more demand scenarios for querying fellow passengers to realize person-association analysis. For example, during an outbreak of a highly infectious virus, find passengers who have taken the same means of transportation as infected users or suspected infected users in order to notify them or implement relevant prevention and control measures; for example, operators establish close relationships with users based on multiple travel records to help improve customer portraits, etc.
[0003] However, existing methods for querying fellow passengers require obtaining the user's GPS data, which makes the query difficult to implement and also affects the accuracy of the query results. Summary of the invention
[0004] In view of this, embodiments of the present invention are intended to provide a user query method and device, an electronic device, and a computer storage medium.
[0005] In a first aspect, an embodiment of the present invention provides a user query method, comprising:
[0006] Determining first movement trajectory information of a first user;
[0007] Determining, according to the first movement trajectory information, a user to be analyzed that meets a similarity condition with the first movement trajectory of the first user;
[0008] The first movement trajectory information and the position information of the second movement trajectory information of the user to be analyzed are respectively divided into blocks to obtain a first block time series of the first user and a second block time series of the user to be analyzed, wherein the first block time series includes: a time series of blocks passed by the first movement trajectory; the second block time series includes: a time series of blocks passed by the second movement trajectory of the user to be analyzed;
[0009] Determine, according to the first block time series and the second block time series, the number of times that the location information of the first user and the user to be analyzed meets a location similarity condition within the same time period;
[0010] According to the number of times the location similarity condition is satisfied, users who have the same itinerary as the first user are queried from the users to be analyzed.
[0011] Preferably, determining the number of times that the location information of the first user and the user to be analyzed meets the location similarity condition within the same time period according to the first block time series and the second block time series includes:
[0012] Determine, according to the first block time series and the second block time series, the number of first times that the first user and the user to be analyzed appear in the same block in the same time period;
[0013] and / or,
[0014] According to the first block time series and the second block time series, a second number of times that the first user and the user to be analyzed appear in different blocks within the same time period and the distance between them is less than a distance threshold is determined.
[0015] Preferably, querying the users who have the same itinerary as the first user from the users to be analyzed according to the number of times the location similarity condition is satisfied includes:
[0016] determining a first trip similarity value according to the first number of times and a first weight corresponding to the first number of times;
[0017] determining the second trip similarity value according to the second number of times and a second weight corresponding to the second number of times; wherein the second weight is less than the first weight;
[0018] According to the first itinerary similarity value and the second itinerary similarity value, it is determined whether the user to be analyzed is a user who has the same itinerary as the first user.
[0019] Preferably, the determining, based on the first movement trajectory information, a user to be analyzed that satisfies a similarity condition with the first movement trajectory of the first user includes:
[0020] Determine, according to the first movement trajectory information, a set of first users that appear in the same time period as the first user within the coverage area of the base station where the starting point position in the first movement trajectory is located;
[0021] Determine, according to the first movement trajectory information, a set of second users that appear in the same time period as the first user and are within the coverage area of the base station where the end point position in the first movement trajectory is located;
[0022] The intersection of the first user set and the second user set is obtained to obtain the user to be analyzed.
[0023] Preferably, the first block time sequence of the first user includes:
[0024] A plurality of location time elements arranged in chronological order, wherein one of the location time elements comprises: block information to which a base station accessed by a first user belongs and time information of accessing the corresponding base station;
[0025] The second block time series includes:
[0026] A plurality of location time elements are arranged in chronological order, wherein one of the location time elements comprises: block information to which the base station accessed by the user to be analyzed belongs and time information of accessing the corresponding base station.
[0027] Preferably, before determining the number of times that the location information of the first user and the user to be analyzed meets the location similarity condition within the same time period according to the first block time series and the second block time series, the method further includes:
[0028] At least two adjacent location time elements of the first block time sequence and / or the second block time sequence with the same block information to which the location of the base station belongs are merged into one location time element.
[0029] Preferably, the step of merging at least two adjacent location time elements of the first block time sequence and / or the second block time sequence having the same block information to which the location of the base station belongs into one location time element comprises:
[0030] Acquire first time information of a first position time element and second time information of a last position time element of the at least two adjacent position time elements;
[0031] The average value of the first time information and the second time information is used as the time information of the merged location time element, and the block information to which the base stations of the at least two adjacent location time elements belong is used as the block information of the merged location time element.
[0032] Preferably, before determining the number of times that the location information of the first user and the user to be analyzed meets the location similarity condition within the same time period according to the first block time series and the second block time series, the method further includes:
[0033] Obtaining a coding sequence according to the block information in the position time element;
[0034] The number of times that the location information of the first user and the user to be analyzed meets the location similarity condition within the same time period includes:
[0035] The first number of times that the position similarity condition is satisfied; wherein the first number of times that the position similarity condition is satisfied is: in the first block time sequence and the second block time sequence, the logarithm of the position time elements whose coding sequences are the same and the time difference indicated by the time information is within a preset time range.
[0036] Preferably, obtaining the coding sequence according to the block information in the position time element comprises:
[0037] Encoding the block information into a first part of the encoding sequence;
[0038] Encoding the location information of the base station into the second part of the coding sequence;
[0039] The number of times that the location information of the first user and the user to be analyzed meets the location similarity condition within the same time period includes:
[0040] The second number of times the position similarity condition is satisfied, wherein the second number of times the position similarity condition is satisfied is: in the first block time sequence and the second block time sequence, the first part of the coding sequence is different, the distance corresponding to the second part of the coding sequence is less than a distance threshold, and the time information indicates the logarithm of the position time element whose time difference is within a preset time range.
[0041] In a second aspect, an embodiment of the present invention provides a user query device, including:
[0042] A first determining module, used to determine first movement track information of a first user;
[0043] A second determining module, configured to determine, based on the first movement trajectory information, a user to be analyzed that meets a similarity condition with the first movement trajectory of the first user;
[0044] a block division module, configured to divide the position information of the first movement trajectory information and the second movement trajectory information of the user to be analyzed into blocks respectively, to obtain a first block time series of the first user and a second block time series of the user to be analyzed, wherein the first block time series includes: a time series of blocks passed by the first movement trajectory; and the second block time series includes: a time series of blocks passed by the second movement trajectory of the user to be analyzed;
[0045] A third determination module, configured to determine, according to the first block time series and the second block time series, the number of times that the location information of the first user and the user to be analyzed satisfies a location similarity condition within the same time period;
[0046] The fourth determining module is used to query users who have the same itinerary as the first user from the users to be analyzed according to the number of times the location similarity condition is met.
[0047] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory, a processor, and an information processing program stored in the memory and executable on the processor, wherein the processor can implement any of the methods provided above when executing the information processing program.
[0048] In a fourth aspect, an embodiment of the present invention provides a computer storage medium, wherein the computer storage medium stores computer executable instructions; after the computer executable instructions are executed, any of the methods provided above can be implemented.
[0049] In the user query method of the embodiment of the present invention, first, the first mobile trajectory information of the first user is determined based on the base station location signaling, and the user to be analyzed that meets the similarity condition is determined; then, the location information of the mobile trajectory information of the first user and the user to be analyzed is divided into blocks to determine the block time series of the user; finally, based on the block time series of the user, by judging the number of times the first user and the user to be analyzed meet the location similarity condition, it is determined whether the user to be analyzed has the same itinerary as the first user. The user query method of the embodiment of the present invention, on the one hand, can query the user's co-travel users according to the block time series of the user determined by the base station location signaling, without obtaining the user's GPS data; on the other hand, by dividing the location information of the user's mobile trajectory information into blocks, the first user's co-travel users are determined based on the blocks. Compared with determining the first user's co-travel users based on an accurate single location, the users to be analyzed within a certain range from the first user can also be determined as co-travel users, which reduces the probability of missing co-travel users due to position signal drift and improves the integrity of the query result. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic diagram of a flow chart of a first user query method provided by an embodiment of the present invention;
[0051] Figure 2 A schematic diagram of a flow chart of a second user query method provided by an embodiment of the present invention;
[0052] Figure 3 A schematic diagram of a flow chart of a third user query method provided by an embodiment of the present invention;
[0053] Figure 4 A schematic diagram of a fourth user query method provided by an embodiment of the present invention;
[0054] Figure 5A schematic diagram of a fifth user query method provided by an embodiment of the present invention;
[0055] Figure 6 A schematic diagram of a sixth user query method provided by an embodiment of the present invention;
[0056] Figure 7 A flowchart of a seventh user query method provided by an embodiment of the present invention;
[0057] Figure 8 A schematic diagram of the structure of a user query device provided by an embodiment of the present invention;
[0058] Fig. 9 A specific example of a user query method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0059] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments.
[0060] like Figure 1 As shown, a user query method according to an embodiment of the present invention includes:
[0061] Step S101: determining first movement track information of a first user;
[0062] Step S102: determining, according to the first movement trajectory information, a user to be analyzed whose first movement trajectory satisfies a similarity condition with the first user;
[0063] Step S103: dividing the first movement trajectory information and the position information of the second movement trajectory information of the to-be-analyzed user into blocks respectively, to obtain a first block time series of the first user and a second block time series of the to-be-analyzed user;
[0064] Step S105: determining the number of times that the location information of the first user and the user to be analyzed meets the location similarity condition within the same time period according to the first block time series and the second block time series;
[0065] Step S106: According to the number of times the location similarity condition is satisfied, users who have the same itinerary as the first user are queried from the users to be analyzed.
[0066] In the step S101, based on the base station location signaling, such as location update signaling, according to the user identification of the first user, the information of all base stations accessed by the first user is determined, and the information may include the time information of the first user accessing the base station, the time information of leaving the base station, the identification of the base station and / or the location information of the base station, etc. Finally, the information of all the determined base stations is arranged in chronological order to form the first mobile trajectory information with the base station accessed by the first user during the movement as the dimension. It should be pointed out here that the access involved in this application includes: the residence of idle UE, the access of connected UE, or the switching between base stations of connected UE.
[0067] For example, during the movement, the first user passes through the coverage of multiple base stations identified as BTS1, BTS2..., BTSn in turn. According to the location update signaling, the access status of the first user under BTS1, BTS2..., BTSn can be determined. For example, the time information of the first user's access to BTS1, BTS2..., BTSn respectively (including any one or more times after accessing the base station, such as the start time, the middle time and / or the end time, etc.), and finally, according to the order of the first user's access time under each base station, BTS1, BTS2..., BTSn are sorted, and the first movement trajectory information of the first user is formed in combination with the location information and time information of each base station. The first movement trajectory information is specifically shown in Table 1 below:
[0068] Table 1 First moving trajectory information
[0069] Base station identification BTS1 BTS2 … BTS Time Information <![CDATA[t1]]> <![CDATA[t2]]> … <![CDATA[t n <!-- 4 -->]]> Location Information <![CDATA[loc1]]> <![CDATA[loc2]]> … <![CDATA[loc n ]]>
[0070] It can be understood that the second movement trajectory information of the user to be analyzed can also be determined by using the above method for determining the first movement trajectory information of the first user.
[0071] In step S102, based on the first movement trajectory information determined in step S101, a user to be analyzed that meets the similarity condition with the first movement trajectory of the first user is determined. Here, by determining that the user to be analyzed meets the similarity condition with the first movement trajectory of the first user, it is ensured that the user to be analyzed is more likely to be a user who has the same itinerary as the first user.
[0072] The similarity condition satisfied by the first movement trajectory of the first user may include but is not limited to at least one of the following:
[0073] The number of times that the user to be analyzed and the first user access the same base station in the same time period reaches a certain threshold;
[0074] The total duration of the user to be analyzed and the first user accessing the same base station in the same time period reaches a certain threshold;
[0075] One or more designated base stations accessed by the user to be analyzed and the first user in the same time period.
[0076] In the step S103, the location information of the first movement trajectory information and the second movement trajectory information of the user to be analyzed are divided into blocks respectively, so as to obtain a first block time series of the first user and a second block time series of the user to be analyzed. The first block time series includes: a time series of blocks passed by the first movement trajectory, which is determined according to the time of the blocks passed by the first movement trajectory of the first user; the second block time series includes: a time series of blocks passed by the second movement trajectory of the user to be analyzed, which is determined according to the time of the blocks passed by the second movement trajectory of the user to be analyzed.
[0077] In this embodiment, by dividing the first movement trajectory and the second movement trajectory into a plurality of blocks, the location information of the first movement trajectory information and the second movement trajectory information is divided into blocks, forming a first block time series including information of all blocks of the first movement trajectory, and a second block time series including information of all blocks of the second movement trajectory. Here, the plurality of blocks can be set to blocks of the same shape, and each block is identified by a different block identifier.
[0078] Through block division, the first movement trajectory and the second movement trajectory are respectively mapped to multiple blocks based on the position, and the first block time series of the first user and the second block time series of the user to be analyzed with the block as the granularity are obtained, so as to determine the movement trajectory similarity of the first movement trajectory and the second movement trajectory. At the same time, by controlling the granularity of the block, it is also possible to control the different similarity requirements of the movement trajectory. For example, if the granularity of the block is designed to be larger, the similarity of the two trajectories is determined at a larger block granularity. If the first movement trajectory of the first user and the second movement trajectory of the user to be analyzed have positions belonging to the same block of a larger granularity, that is, it is judged that the two are similar, then the similarity degree requirement is lower.
[0079] In the step S105, the number of times that the location information of the first user and the user to be analyzed meets the location similarity condition within the same time period is determined according to the first block time series and the second block time series.
[0080] In this embodiment, according to the first block time series of the first user and the second block time series of the user to be analyzed, it is compared whether the position information corresponding to the first block time series and the second block time series in the same time period meets the position information similarity condition, and the number of times the position similarity condition is met is determined.
[0081] Here, whether the position information similarity condition is satisfied may be determined based on the distance between the position information corresponding to the first block time series and the second block time series in the same time period, and / or the blocks to which the position information corresponding to the first block time series and the second block time series in the same time period belongs. For example, the distance between the position information corresponding to the first block time series and the second block time series in the same time period is less than a preset distance threshold, and / or the ratio of the number of identical blocks to which the position information corresponding to the first block time series and the second block time series in the same time period belongs to the total number exceeds a preset ratio.
[0082] In the step S106, whether the user to be analyzed is a user who has the same itinerary as the first user is determined according to the number of times the location similarity condition is satisfied, thereby searching for users who have the same itinerary as the first user from the users to be analyzed.
[0083] Here, according to the number of times the location similarity condition is satisfied, such as whether the number of times the location similarity condition is satisfied is greater than a preset number threshold, it is determined whether the user to be analyzed is a user who has the same itinerary as the first user.
[0084] In the user query method of the embodiment of the present invention, first, the first movement trajectory information of the first user is determined based on the base station location signaling, and the user to be analyzed that meets the similarity condition is determined; then, the location information of the movement trajectory information of the first user and the user to be analyzed is divided into blocks to determine the block time series of the user; finally, based on the block time series of the user, by judging the number of times the first user and the user to be analyzed meet the location similarity condition, it is determined whether the user to be analyzed has the same itinerary as the first user. Therefore, through the user query method of the embodiment of the present invention, it is possible to query the user's fellow users without obtaining the user's GPS data.
[0085] In some embodiments, the step S105 includes:
[0086] Step S1051: determining the first number appearing in the same block after segmentation in the same time period according to the first block time series and the second block time series;
[0087] and / or,
[0088] Step S1052: determining a second number of times that the first block time series and the second block time series appear in different blocks within the same time period and the distance is less than a distance threshold.
[0089] In this embodiment, on the one hand, according to the first block time series and the second block time series, the first number of times that the base stations accessed by the first user and the user to be analyzed belong to the same block after blockification in the same time period is determined; on the other hand, according to the first block time series and the second block time series, the second number of times that the base stations accessed by the first user and the user to be analyzed do not belong to the same block after blockification, but the distance between the base stations accessed by the two is less than the distance threshold in the same time period is determined. Thus, based on the division of blocks, the first number of times that the base stations accessed by the first user and the user to be analyzed belong to the same block is used as a judgment factor for the first user and the user to be analyzed to meet the location similarity condition; at the same time, the second number of times that the distance between the base stations accessed by the first user and the user to be analyzed is less than the distance threshold in the scenario where the base stations accessed by the first user and the user to be analyzed belong to different blocks is used as another judgment factor for the first user and the user to be analyzed to meet the location similarity condition.
[0090] In this embodiment, according to the needs of actual applications, the block can be set to a rectangular block, a square block, a hexagonal block, an irregular block, etc. The length and width of the block can be determined according to the distance between base stations, so that one block can include the coverage of at least 2 base stations, and preferably one block is set to include the coverage of 3-5 base stations.
[0091] In some embodiments, Figure 2 As shown, the step S106 includes:
[0092] Step S1061: determining a first trip similarity value according to the first number of times and a first weight corresponding to the first number of times;
[0093] Step S1062: determining the second trip similarity value according to the second number of times and a second weight corresponding to the second number of times; wherein the second weight is less than the first weight;
[0094] Step S1063: Determine, based on the first itinerary similarity value and the second itinerary similarity value, whether the user to be analyzed is a user who has the same itinerary as the first user.
[0095] In this embodiment, a first weight and a second weight are further introduced to distinguish the degree of influence of the first number and the second number on the judgment result that the first user and the user to be analyzed meet the location similarity condition; and in this embodiment, the second weight is made smaller than the first weight, for example, the second weight is set to 0.5 and the first weight is set to 1, so that the influence of the first number on the judgment result that the first user and the user to be analyzed meet the location similarity condition is greater than the influence of the second number on the judgment result that the first user and the user to be analyzed meet the location similarity condition.
[0096] Finally, based on the first trip similarity value jointly determined by the first number and the first weight, and the second trip similarity value jointly determined by the second number and the second weight, it is jointly determined whether the user to be analyzed is a user who has the same trip as the first user.
[0097] In some embodiments, Figure 3 As shown, the step S102 includes:
[0098] S1021: Determine, based on the first movement trajectory information, a set of first users that appear in the same time period as the first user and are within the coverage area of the base station where the starting point of the first movement trajectory is located;
[0099] S1022: Determine, based on the first movement trajectory information, a set of second users that appear in the same time period as the first user and are within the coverage area of the base station where the end point of the first movement trajectory is located;
[0100] S1023: Obtain the intersection of the first user set and the second user set to obtain the user to be analyzed.
[0101] Specifically, in combination with the above Table 1, the following is explained: First, according to the first mobile trajectory information, the base station (BTS1) where the first user is located at the starting point of the first mobile trajectory and the base station (BTSn) where the first user is located at the end point are determined, and the time period of the first user under BTS1 is t 11 to 12 , the time period of the first user under BTSn is t n1 to n2 Then, based on the base station location signaling, determine the first time period (the first time period at least includes a time period of t 11 to 12 The set of users accessing BTS1 within a certain time period (t) is recorded as the first user set, and the second time period (the second time period at least includes the time period t n1 to n2 The set of users accessing BTSn within a certain time (a moment) is recorded as the second user set; finally, the intersection of the first user set and the second user set is obtained, and the users in the intersection are all users to be analyzed.
[0102] Through the above-mentioned step of obtaining the intersection, the user who has appeared with the first user at both the base station at the starting position and the base station at the ending position is determined as the user to be analyzed.
[0103] It can be understood that when determining the users to be analyzed, in addition to selecting the starting position and the end position in the first moving trajectory to determine the intersection of the user set, the intersection of the user sets of the base stations where the users are located can also be determined based on any two positions specified by the user, thereby determining the users in the intersection as the users to be analyzed.
[0104] In some embodiments, the first block time sequence of the first user includes:
[0105] A plurality of location time elements arranged in chronological order, wherein one of the location time elements comprises: block information to which a base station accessed by a first user belongs and time information of accessing the corresponding base station;
[0106] The second block time series includes:
[0107] A plurality of location time elements are arranged in chronological order, wherein one of the location time elements comprises: block information to which the base station accessed by the user to be analyzed belongs and time information of accessing the corresponding base station.
[0108] In this embodiment, after the block division, the first block time series of the first user can be divided into multiple blocks, each block corresponds to a location time element, and the location time element may include block information and time information of the block, wherein the block information may be the block to which the base station accessed by the first user belongs, the block information includes a block identifier, and the time information may be the time when the first user accessed the base station.
[0109] Similarly, after the block division, the second block time series of the user to be analyzed can be divided into multiple blocks, each block corresponds to a location time element, and the location time element may include the block information and time information of the block, wherein the block information may be the block to which the base station accessed by the user to be analyzed belongs, the block information includes the block identifier, and the time information may be the time when the user to be analyzed accesses the base station.
[0110] After the position information of the first movement trajectory information and the second movement trajectory information of the user to be analyzed are divided into blocks, that is, after the position information of the first movement trajectory information and the second movement trajectory information of the user to be analyzed are respectively corresponded to block identifiers of different blocks, a first block time series of the first user and a second block time series of the user to be analyzed are obtained.
[0111] Specifically, a location time element is generated based on the information of each base station accessed by the user in the first mobile trajectory information, and the block information to which the location of the base station accessed by the first user of the location time element belongs is set to: the block identifier of the block corresponding to the location information of the base station accessed by the first user, and the time information of access corresponding to the base station of the location time element is set to: the time information of the first user accessing the base station.
[0112] As an example, by continuing to combine the first movement trajectory information shown in Table 1 above, after performing block division, a first block time series as shown in Table 2 below can be obtained:
[0113] Table 2 Time series of the first block
[0114]
[0115] In Table 2 above, the first block time sequence includes n position time elements, which are (b1, t1), (b2, t2), ..., (b n , t n ).
[0116] In some embodiments, Figure 4 As shown, before step S105, the method further includes:
[0117] Step S104: merge at least two adjacent location time elements of the first block time sequence and / or the second block time sequence that have the same block information to which the base station location belongs into one location time element.
[0118] In this embodiment, if there are at least two adjacent position-time elements in the first block time sequence, and the block information to which the base station locations of the at least two adjacent position-time elements belong is the same, it can be considered that within the corresponding time period, even if the base station accessed by the first user multiple times has changed, the block information to which the locations of the accessed base stations belong is the same. Therefore, from the perspective of block granularity, multiple accesses to different base stations in the same block are converted into one block access by merging position-time elements, thereby reducing the number of calculations that meet the position similarity condition and reducing the amount of calculations in the information query process.
[0119] Specifically, Figure 5 As shown, in the above step S104, merging at least two adjacent position time elements having the same block information to which the base station location of the first block time sequence and / or the second block time sequence belongs into one position time element includes:
[0120] Step S1041: Acquire the first time information of the first position time element and the second time information of the last position time element of the at least two adjacent position time elements;
[0121] Step S1042: Use the average value of the first time information and the second time information as the time information of the merged location time element, and use the block information to which the base stations of the at least two adjacent location time elements belong as the block information of the merged location time element.
[0122] Here, based on the first block time sequence in Table 2 above, the merging of the at least two adjacent position time elements into one position time element is described:
[0123] Assume that, in the first block time sequence, the adjacent position time element 8 (b8, t8), position time element 9 (b9, t9) and position time element 10 (b 10 , t 10 ) have the same block information as the base station locations, i.e., block identifiers b8, b9 and b 10 The same, therefore, the position time element 8 (b8, t8), the position time element 9 (b9, t9) and the position time element 10 (b 10 , t 10 ) are merged into a new position time element, the block information of the new position time element remains unchanged, and the time information is the average of the time information of the first position time element 8 and the left next position time element 10 in the adjacent position time elements. Therefore, the new position time element is
[0124] As shown in Table 3 below, it is an example of the first block time sequence after the position time elements are merged:
[0125] Table 3 Time series of the first block after merging
[0126]
[0127] In Table 3 above, the first block time series after merging includes n-3 position time elements, which are (b1, t1), (b2, t2), ..., (b7, t7), (b 11 , t 11 )、…、(b n , t n ).
[0128] In some embodiments, Figure 6 As shown, before step S105, the method further includes:
[0129] Step S104 ′: Obtain a coding sequence from the block information in the position time element.
[0130] Then, the step S105 includes:
[0131] The first number of times that the position similarity condition is satisfied; wherein the first number of times that the position similarity condition is satisfied is: in the first block time sequence and the second block time sequence, the logarithm of the position time elements whose coding sequences are the same and the time difference indicated by the time information is within a preset time range.
[0132] In this embodiment, the block information in the position time element is encoded to obtain a code sequence.
[0133] When determining the first number of times that the location similarity condition is met, first, the location time elements of the first block time series and the second block time series are determined respectively; secondly, for each location time element, the block information to which the location of the base station accessed by the user belongs and the time information of accessing the corresponding base station are determined; finally, the location time elements of the first block time series and the second block time series are compared to determine the logarithm of the location time elements that simultaneously meet the following conditions:
[0134] a. The time difference between the time indicated by the time information corresponding to the access of the first user to the base station and the time information corresponding to the access of the user to be analyzed indicates that the time difference is within a preset duration range;
[0135] b. The coding sequence corresponding to the block information to which the base station accessed by the first user belongs is the same as the coding sequence corresponding to the block information to which the base station accessed by the user to be analyzed belongs.
[0136] Specifically, when determining the block information to which the base station accessed by the user belongs, the coding sequence corresponding to the base station is determined according to the location of the base station accessed by the user, and compared with the coding sequences corresponding to each predetermined block to determine the block information to which the base station accessed by the user belongs.
[0137] As an example, based on the geohash algorithm, the location information of the first movement trajectory information and the second movement trajectory information of the user to be analyzed are divided into blocks. For example, according to the longitude and latitude of each position in the designated area, the designated area is block-processed based on the geohash algorithm, so that each rectangular area (i.e., block) corresponds to a coding sequence. The designated area at least covers the first movement trajectory and the second movement trajectory.
[0138] When determining the block information to which the base station accessed by the user belongs, the coding sequence corresponding to the base station is determined based on the geohash algorithm according to the location information of the base station accessed by the user, including longitude and latitude. Thus, the block information to which the base station accessed by the user belongs can be determined by comparison.
[0139] For example, the location information of the base station accessed by the user is loc i Including longitude lng i and latitude lat i , calculate the corresponding geohash value (i.e., encoding sequence) g of the location information through the geohash algorithm i , that is: g i=geohash(lng i ,lat i ), after determining the geohash value of the location information, the location information can be mapped to the geohash value used to identify different blocks.
[0140] In some embodiments, Figure 7 As shown, the step S104′ includes:
[0141] Step S1041′: Encode the block information into the first part of the encoding sequence;
[0142] Step S1042′: Encode the location information of the base station into the second part of the coding sequence;
[0143] The step S105 comprises:
[0144] The second number of times the position similarity condition is satisfied, wherein the second number of times the position similarity condition is satisfied is: in the first block time sequence and the second block time sequence, the first part of the coding sequence is different, the distance corresponding to the second part of the coding sequence is less than a distance threshold, and the time information indicates the logarithm of the position time element whose time difference is within a preset time range.
[0145] In this embodiment, the coding sequence includes two parts: a first part of the coding sequence is encoded by the block information, and a second part of the coding sequence is encoded by the location information of the base station. When determining the second number of times that the location similarity condition is met, the location time elements of the first block time sequence and the second block time sequence are compared to determine the number of logarithms of the location time elements that simultaneously meet the following conditions:
[0146] a′. The time difference between the time corresponding to the time information indicating the first user access to the base station and the time information indicating the time corresponding to the time information indicating the first user access to the base station to be analyzed is within a preset duration;
[0147] b'. The first user accesses the base station location belonging to the block information corresponding to the coding sequence and the base station location belonging to the user to be analyzed accesses the base station location corresponding to the coding sequence is different;
[0148] c′. The distance between the location of the base station accessed by the first user and the location of the base station accessed by the user to be analyzed is less than the distance threshold.
[0149] like Figure 8 As shown, an embodiment of the present invention provides a user query device, including:
[0150] A first determining module 110, configured to determine first movement track information of a first user;
[0151] A second determining module 120, configured to determine, based on the first movement trajectory information, a user to be analyzed that meets a similarity condition with the first movement trajectory of the first user;
[0152] The block division module 130 is used to divide the position information of the first movement trajectory information and the second movement trajectory information of the user to be analyzed into blocks, respectively, to obtain a first block time series of the first user and a second block time series of the user to be analyzed;
[0153] A third determination module 140 is used to determine the number of times that the location information of the first user and the user to be analyzed meets the location similarity condition within the same time period according to the first block time series and the second block time series;
[0154] The fourth determining module 150 is used to query the users who have the same itinerary as the first user from the users to be analyzed according to the number of times the location similarity condition is met.
[0155] In some embodiments, the third determination module 140 includes:
[0156] a first number determining unit, configured to determine, according to the first block time series and the second block time series, the first number of times that the first user and the user to be analyzed appear in the same block within the same time period;
[0157] and / or,
[0158] The second number determination unit is used to determine, according to the first block time series and the second block time series, a second number of times that the first user and the user to be analyzed appear in different blocks within the same time period and the distance is less than a distance threshold.
[0159] In some embodiments, the fourth determining module 150 includes:
[0160] a first trip similarity value determining unit, configured to determine a first trip similarity value according to the first number of times and a first weight corresponding to the first number of times;
[0161] A second trip similarity value determining unit, configured to determine the second trip similarity value according to the second number of times and a second weight corresponding to the second number of times; wherein the second weight is less than the first weight;
[0162] A traveling user determining unit is used to determine whether the user to be analyzed is a user who has the same itinerary as the first user according to the first itinerary similarity value and the second itinerary similarity value.
[0163] In some embodiments, the second determining module 120 includes:
[0164] A first user set determining unit, configured to determine, according to the first moving trajectory information, a first user set that appears in the same time period as the first user and is within the coverage area of the base station where the starting point position in the first moving trajectory is located;
[0165] A second user set determining unit, configured to determine, according to the first movement trajectory information, a second user set that appears in the same time period as the first user and is within the coverage area of the base station where the end point position in the first movement trajectory is located;
[0166] The to-be-analyzed user determination unit is configured to obtain the intersection of the first user set and the second user set to obtain the to-be-analyzed user.
[0167] In some embodiments, the user query device further includes:
[0168] The location time element merging module is used to merge at least two adjacent location time elements with the same block information to which the base station location of the first block time sequence and / or the second block time sequence belongs into one location time element.
[0169] In some embodiments, the position time element merging module includes:
[0170] An acquiring unit, used for acquiring first time information of a first position time element and second time information of a last position time element of the at least two adjacent position time elements;
[0171] A merging unit is used to use the average value of the first time information and the second time information as the time information of the merged location time element, and use the block information to which the base station locations of the at least two adjacent location time elements belong as the block information of the merged location time element.
[0172] In some embodiments, the user query device further includes:
[0173] An encoding module, used for obtaining an encoding sequence according to the block information in the position time element;
[0174] The first number determination unit is used to determine the first number that satisfies the position similarity condition; wherein the first number that satisfies the position similarity condition is: in the first block time sequence and the second block time sequence, the coding sequence is the same and the logarithm of the position time element whose time difference indicated by the time information is within a preset time length range.
[0175] In some embodiments, the encoding module includes:
[0176] A first encoding unit, configured to encode the block information into a first part of the encoding sequence;
[0177] A second encoding unit, configured to encode the location information of the base station into a second part of the encoding sequence;
[0178] The second number determination unit is used to determine the second number of times that satisfy the position similarity condition, wherein the second number of times that satisfy the position similarity condition is: in the first block time sequence and the second block time sequence, the first part of the coding sequence is different, the distance corresponding to the second part of the coding sequence is less than a distance threshold, and the time information indicates the logarithm of the position time element whose time difference is within a preset time length range.
[0179] An embodiment of the present invention also provides an electronic device, comprising: a memory, a processor, and an information processing program stored in the memory and executable on the processor, wherein the processor can implement the user query method provided by one or more of the aforementioned technical solutions when executing the information processing program.
[0180] An embodiment of the present invention further provides a computer storage medium storing computer executable instructions; after the computer executable instructions are executed by a processor, the user query method provided by one or more of the above-mentioned technical solutions can be implemented.
[0181] The computer storage medium may be a mobile storage device, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, or other medium that can store program codes, and may be a non-transient storage medium.
[0182] The following, such as Fig. 9 As shown, a specific example is used to illustrate the user query method of the embodiment of the present invention:
[0183] Step 1: extracting the user to be analyzed and the user movement trajectory information according to the first user;
[0184] Step 1-1: Specify the trajectory segment U of the first user s The starting district and the ending district correspond to specific base stations. Assume that the base stations corresponding to the specified starting district and the ending district are County1 and County n , the first user's movement trajectory is formed into the first movement trajectory information according to time, and the last time the first user appeared in County1, Hour1, and the last time the first user appeared in County1, Hour2, and Hour3 are obtained from the sequence. nThe earliest time n ;
[0185] Step 1-2: Filter out the first user set Us1 of users who appear in County1 at Hour1 or the hour before Hour1 from the location signaling data, and filter out the first user set Us1 of users who appear in County1 at Hour1 or the hour before Hour1 from the location signaling data. n or Hour n Appeared in County in the last hour n The second user set Us n , find the first user set Us1 and the second user set Us n The intersection of Us k , intersection Us k All users in the table are to be analyzed, that is, users who have the same starting district and ending district as the first user at the same time (or adjacent time) are to be analyzed;
[0186] Step 1-3: Extract the intersection Us from the location signaling data k All users to be analyzed from one hour before Hour1 to Hour n The user movement trajectory L of the users to be analyzed in time order in the last hour k , where k = 1, 2, 3 ... m, m is the intersection Us k The number of users to be analyzed in ;
[0187] The above-mentioned location signaling data includes the following data fields: user ID, base station longitude, base station latitude, and timestamp.
[0188] Step 2: Grid the user trajectory;
[0189] Step 2-1: Convert the trajectories of the first user and the user to be analyzed based on the geohash algorithm respectively;
[0190] L k The user's moving trajectory is L i The user to be analyzed U i Take the following example to illustrate: i The moving trajectory L i , is the base station longitude and latitude time series (C1, C2, ..., C i , ...), where the position point C i Contains longitude lng i , latitude lat i , timestamp t i Information, based on the longitude and latitude of each location point, calculate its corresponding geohash value g i , that is: g i = Geohash(lngi ,lat i ), where "Geohash" in the formula represents the geohash algorithm. When the length of the geohash value is 6, according to the corresponding relationship between the length of the geohash value and the distance accuracy shown in Table 4 below, the length and width of the grid is about 600m. After gridding, the base station longitude and latitude time series (C1, C2, ..., C i , ...) into a sequence of geohash locations (G1, G2, ..., G i , ...), where the transformed position point G i Contains geohash code g i , timestamp t i information.
[0191] Table 4 Correspondence between geohash value length and distance accuracy
[0192] Geohash length Distance longitude (km) 4 ±20 5 ±2.4 6 ±0.61
[0193] Step 2-2: Merge the stop points of the geohash location point sequence;
[0194] In the geohash location point sequence, the consecutive location points G with the same geohash code are s -G e Merge into one location point, the geohash code remains unchanged after merging, and the timestamp is t = (t s +t e ) / 2.
[0195] Step 3: Calculate the number of times the location similarity condition is satisfied between the user to be analyzed and the first user based on the grid coding;
[0196] Step 3-1: Calculate the number of times that the location point sequence of each user to be analyzed and the location point sequence of the first user meet the location similarity condition;
[0197] Assume that the user to be analyzed is U k The position point sequence S k For (G k1 , G k2 , ..., G ki , ...), the first user U s The position point sequence S s For (G s1 , G s2 , ..., G si , ...); User U to be analyzed k With the first user U s The number of times the position similarity condition is met is calculated as follows:
[0198] ·In a certain period of time, U k with U s The geohash codes of the locations are the same, that is, when |t ki -t si |<=t 阈值 At the same time, satisfy g ki =g si , where the time period length threshold t 阈值 If it is set to 2 minutes, add 1 to the first count.
[0199] In a certain period of time, U k with U s The geohash codes of the locations are different, but their 5-bit prefixes are the same, i.e., U k with U s Although they are not in the same 600m long and wide regional grid range, they are in the same 2.4km long and wide regional grid range. In this case, calculate U k with U s If the distance between two points is less than a distance threshold (e.g., 1.2 km), the second digit is increased by 0.5.
[0200] Step 3-2: Sum the first number and the second number to obtain the number of times the user to be analyzed and the first user meet the location similarity condition.
[0201] Step 4: Determine whether the user to be analyzed is a user who has the same itinerary as the first user;
[0202] For the users to be analyzed whose number of times satisfying the location similarity condition is greater than the set threshold T, that is, the users who are in County 1 and County 2 with the first user, n Users with the same itinerary between them.
[0203] The threshold T is set to N s ×P s , N s is the location point sequence S of the first user s The length, P s For similar proportions, generally P s Set to
[0204] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some ports, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0205] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
[0206] In addition, all functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0207] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium, which, when executed, executes the steps including the above method embodiment.
[0208] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A user query method, characterized in that: The method comprises: Determining first movement trajectory information of a first user; Determining, according to the first movement trajectory information, a user to be analyzed that meets a similarity condition with the first movement trajectory of the first user; The first movement trajectory information and the position information of the second movement trajectory information of the user to be analyzed are respectively divided into blocks to obtain a first block time series of the first user and a second block time series of the user to be analyzed, wherein the first block time series includes: a time series of blocks passed by the first movement trajectory; the second block time series includes: a time series of blocks passed by the second movement trajectory of the user to be analyzed; Determine, according to the first block time series and the second block time series, the number of times that the location information of the first user and the user to be analyzed meets a location similarity condition within the same time period; According to the number of times the location similarity condition is met, searching for users who have the same itinerary as the first user from the users to be analyzed; The determining, according to the first block time series and the second block time series, the number of times that the location information of the first user and the user to be analyzed meets the location similarity condition within the same time period includes: Determine, according to the first block time series and the second block time series, the number of first times that the first user and the user to be analyzed appear in the same block in the same time period; and / or, Determine, according to the first block time series and the second block time series, a second number of times that the first user and the user to be analyzed appear in different blocks within the same time period and the distance between them is less than a distance threshold; The querying, from the users to be analyzed, for users who have the same itinerary as the first user according to the number of times the location similarity condition is satisfied includes: determining a first trip similarity value according to the first number of times and a first weight corresponding to the first number of times; determining a second trip similarity value according to the second number of times and a second weight corresponding to the second number of times; wherein the second weight is less than the first weight; According to the first itinerary similarity value and the second itinerary similarity value, it is determined whether the user to be analyzed is a user who has the same itinerary as the first user.
2. The user query method according to claim 1, characterized in that: The determining, according to the first movement trajectory information, a user to be analyzed that satisfies a similarity condition with the first movement trajectory of the first user includes: Determine, according to the first movement trajectory information, a set of first users that appear in the same time period as the first user within the coverage area of the base station where the starting point position in the first movement trajectory is located; Determine, according to the first movement trajectory information, a set of second users that appear in the same time period as the first user and are within the coverage area of the base station where the end point position in the first movement trajectory is located; The intersection of the first user set and the second user set is obtained to obtain the user to be analyzed.
3. The user query method according to claim 1, characterized in that: The first block time sequence of the first user includes: A plurality of location time elements arranged in chronological order, wherein one of the location time elements comprises: block information to which a base station accessed by a first user belongs and time information of accessing the corresponding base station; The second block time series includes: A plurality of location time elements are arranged in chronological order, wherein one of the location time elements comprises: block information to which the base station accessed by the user to be analyzed belongs and time information of accessing the corresponding base station.
4. The user query method according to claim 3, characterized in that: Before determining the number of times that the location information of the first user and the user to be analyzed meets the location similarity condition within the same time period according to the first block time series and the second block time series, the method further includes: At least two adjacent location time elements of the first block time sequence and / or the second block time sequence with the same block information to which the location of the base station belongs are merged into one location time element.
5. The user query method according to claim 4, characterized in that: The step of merging at least two adjacent location time elements of the first block time sequence and / or the second block time sequence, which have the same block information to which the location of the base station belongs, into one location time element comprises: Acquire first time information of a first position time element and second time information of a last position time element of the at least two adjacent position time elements; The average value of the first time information and the second time information is used as the time information of the merged location time element, and the block information to which the base stations of the at least two adjacent location time elements belong is used as the block information of the merged location time element.
6. The user query method according to claim 3, characterized in that: Before determining the number of times that the location information of the first user and the user to be analyzed meets the location similarity condition within the same time period according to the first block time series and the second block time series, the method further includes: Obtaining a coding sequence according to the block information in the position time element; The number of times that the location information of the first user and the user to be analyzed meets the location similarity condition within the same time period includes: The first number of times that the position similarity condition is satisfied; wherein the first number of times that the position similarity condition is satisfied is: in the first block time sequence and the second block time sequence, the code sequence is the same and the logarithm of the position time element in which the time difference indicated by the time information is within a preset time range.
7. The user query method according to claim 6, characterized in that: The obtaining a coding sequence according to the block information in the position time element comprises: Encoding the block information into a first part of the encoding sequence; Encoding the location information of the base station into the second part of the coding sequence; The number of times that the location information of the first user and the user to be analyzed meets the location similarity condition within the same time period includes: The second number of times the position similarity condition is satisfied, wherein the second number of times the position similarity condition is satisfied is: in the first block time sequence and the second block time sequence, the first part of the coding sequence is different, the distance corresponding to the second part of the coding sequence is less than a distance threshold, and the time information indicates the logarithm of the position time element whose time difference is within a preset time range.
8. A user query device, characterized in that: include: A first determining module, used to determine first movement track information of a first user; A second determining module, configured to determine, based on the first movement trajectory information, a user to be analyzed that meets a similarity condition with the first movement trajectory of the first user; a block division module, configured to divide the position information of the first movement trajectory information and the second movement trajectory information of the user to be analyzed into blocks respectively, to obtain a first block time series of the first user and a second block time series of the user to be analyzed, wherein the first block time series includes: a time series of blocks passed by the first movement trajectory; and the second block time series includes: a time series of blocks passed by the second movement trajectory of the user to be analyzed; A third determination module, configured to determine, according to the first block time series and the second block time series, the number of times that the location information of the first user and the user to be analyzed satisfies a location similarity condition within the same time period; A fourth determination module, configured to query, from the users to be analyzed, users who have the same itinerary as the first user according to the number of times the location similarity condition is satisfied; The third determination module comprises: a first number determining unit, configured to determine, according to the first block time series and the second block time series, the first number of times that the first user and the user to be analyzed appear in the same block within the same time period; and / or, A second number determination unit, configured to determine, according to the first block time series and the second block time series, a second number of times that the first user and the user to be analyzed appear in different blocks within the same time period and the distance between them is less than a distance threshold; The fourth determination module comprises: a first trip similarity value determining unit, configured to determine a first trip similarity value according to the first number of times and a first weight corresponding to the first number of times; A second trip similarity value determining unit, configured to determine a second trip similarity value according to the second number of times and a second weight corresponding to the second number of times; wherein the second weight is less than the first weight; A traveling user determining unit is used to determine whether the user to be analyzed is a user who has the same itinerary as the first user according to the first itinerary similarity value and the second itinerary similarity value.
9. An electronic device, characterized in that: include: A memory, a processor, and an information processing program stored in the memory and executable on the processor, wherein the processor can implement the method provided in any one of claims 1 to 7 when executing the information processing program.
10. A computer storage medium storing computer executable instructions; after the computer executable instructions are executed, the method provided in any one of claims 1 to 7 can be implemented.
