A method, device and storage medium for mining sequential patterns
By screening out sequence patterns with actual frequency greater than the expected frequency, the problem that high interest sequence patterns in the prior art are difficult to reflect the real preferences of the population, and a true reflection of the population's travel preferences is achieved.
Patent Information
- Application Number
- CN202111123686.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-24
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2041-09-24
AI Technical Summary
The existing sequence pattern mining methods are difficult to reflect the population's true preference for the destination, because the high interest sequence pattern it usually mines is a pattern with closer access distances and lower travel costs.
By obtaining semantic location trajectory data, the actual frequency and expected frequency of the candidate sequence mode are determined, and the candidate sequence mode with the actual frequency greater than the expected frequency is selected as the high interest sequence mode, reflecting the actual travel preferences of the population under the high travel cost.
It realizes the travel preferences of the crowds truly reflecting, and solves the problem that high interest sequence patterns in the prior art are difficult to reflect the real preferences of the crowds.
Smart Images

Figure CN114139043B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of sequence pattern mining, and in particular to a sequence pattern mining method, device and storage medium. Background Art
[0002] The trajectory data generated by crowd movement is an important type of urban big data. Since trajectory data usually has spatial and temporal dimensions, it can be used to reflect the temporal and spatial patterns of crowd behavior, thereby supporting people to analyze areas of interest. Sequential pattern mining is one of the most common trajectory data analysis tasks, which aims to discover valuable sequential patterns from trajectory data, such as "office area a→shopping center b→residential area c". The results of sequential pattern mining are widely used in transportation planning, urban facility allocation, location-based advertising push, and tourist attraction recommendations.
[0003] However, the high-interest sequence patterns mined by existing sequence pattern mining methods are usually sequence patterns with high frequency but short access distance and low travel cost. After excluding the travel cost factor, people may not have a preference for the places in the mined sequence patterns. For example, if the purpose of the sequence pattern mining task is to analyze the shopping preferences of residents, according to the existing sequence pattern mining methods, the obtained high-interest sequence patterns often exist between residential areas and their surrounding shops. The goods provided by some distant shops may be more in line with the preferences of residents, but due to the high travel cost and small passenger flow, the frequency of the sequence patterns between these shops and residential areas is low and may not be mined. Therefore, the existing mined high-interest sequence patterns are difficult to reflect the real preferences of people for destinations.
[0004] Therefore, the existing technology still needs to be improved and developed. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a sequence pattern mining method, device and storage medium in response to the above-mentioned defects of the prior art, aiming to solve the problem that the high-interest sequence patterns mined by the existing sequence pattern mining methods are usually high-frequency sequence patterns with short access distances and low travel costs, which are difficult to reflect people's real preferences for destinations.
[0006] The technical solution adopted by the present invention to solve the problem is as follows:
[0007] In a first aspect, an embodiment of the present invention provides a sequential pattern mining method, wherein the method comprises:
[0008] Acquire a number of semantic location trajectory data, and determine a number of candidate sequence patterns and actual frequencies respectively corresponding to the candidate sequence patterns according to the number of semantic location trajectory data, wherein the actual frequencies respectively corresponding to the candidate sequence patterns are all higher than a preset frequency threshold;
[0009] Obtaining expected frequencies corresponding to a number of the candidate sequence patterns, respectively, wherein the expected frequencies are used to reflect the theoretical number of occurrences of each candidate sequence pattern based on travel cost considerations;
[0010] Among the candidate sequence patterns, the candidate sequence pattern whose actual frequency is greater than the expected frequency is taken as a high-interest sequence pattern.
[0011] In one embodiment, the acquiring of a plurality of semantic location trajectory data, and determining a plurality of candidate sequence patterns and actual frequencies respectively corresponding to the plurality of candidate sequence patterns according to the plurality of semantic location trajectory data, comprises:
[0012] Acquire a number of original trajectory data within a target area and geographic information corresponding to the target area;
[0013] Determine, according to the geographic information, semantic location trajectory data corresponding to a number of the original trajectory data respectively;
[0014] All of the plurality of semantic location trajectory data are input into a preset frequent sequence pattern mining algorithm to obtain the plurality of candidate sequence patterns and the actual frequencies respectively corresponding to the plurality of candidate sequence patterns.
[0015] In one implementation, obtaining expected frequencies corresponding to the plurality of candidate sequence patterns respectively includes:
[0016] Determine an actual travel distribution table according to the plurality of semantic location trajectory data, wherein the actual travel distribution table is used to reflect the actual situation of crowd movement;
[0017] Fitting the actual travel distribution table to obtain a theoretical travel distribution table, wherein the theoretical travel distribution table is used to reflect the theoretical law of crowd movement;
[0018] According to the actual travel distribution table and the theoretical travel distribution table, expected frequencies corresponding to a number of the candidate sequence patterns are determined.
[0019] In one embodiment, determining the actual travel distribution table according to the plurality of semantic location trajectory data includes:
[0020] Statistical analysis is performed on the semantic location trajectory data to obtain the travel distribution table, wherein the actual travel distribution table includes a plurality of cells, the row number of each cell represents the starting location, the column number of each cell represents the destination point, and the element value of each cell represents the number of people who arrive at the destination point from the starting location within a preset time.
[0021] In one implementation, fitting the actual travel distribution table to obtain a theoretical travel distribution table includes:
[0022] The actual travel distribution table is fitted by using a plurality of dual-constraint gravity models to obtain a plurality of alternative theoretical travel distribution tables, wherein the plurality of dual-constraint gravity models correspond to different friction coefficient formulas and model parameters;
[0023] The goodness of fit corresponding to the plurality of candidate theoretical travel distribution tables is obtained, and the candidate theoretical travel distribution table with the highest goodness of fit is used as the theoretical travel distribution table.
[0024] In one implementation, determining the expected frequencies corresponding to the candidate sequence patterns respectively according to the actual travel distribution table and the theoretical travel distribution table includes:
[0025] Determine a plurality of subsequence patterns corresponding to each of the candidate sequence patterns, wherein each of the subsequence patterns is a local portion of the candidate sequence pattern corresponding to the subsequence pattern;
[0026] Determine actual occurrence frequencies corresponding to a plurality of the subsequence patterns according to the actual travel distribution table, and determine the expected sequence frequency corresponding to each of the candidate sequence patterns according to the actual occurrence frequencies;
[0027] Determine theoretical occurrence frequencies corresponding to a plurality of subsequence patterns according to the theoretical travel distribution table, and determine geographical expected frequencies corresponding to each candidate sequence pattern according to the theoretical occurrence frequencies;
[0028] According to the sequential expected frequency and the geographical expected frequency, the expected frequency corresponding to each of the candidate sequence patterns is determined.
[0029] In one embodiment, determining the expected frequency corresponding to each of the candidate sequence patterns according to the sequential expected frequency and the geographical expected frequency includes:
[0030] The maximum value of the sequential expected frequency and the geographical expected frequency corresponding to each of the candidate sequence patterns is used as the expected frequency corresponding to each of the candidate sequence patterns.
[0031] In one embodiment, the method further comprises:
[0032] Performing a statistical significance test on all the high-interest sequence patterns, and taking the high-interest sequence patterns that pass the statistical significance test as sequence pattern mining results;
[0033] According to the sequence pattern mining results, the travel preference information of the crowd is determined.
[0034] In a second aspect, an embodiment of the present invention further provides a sequence pattern screening device, wherein the device comprises:
[0035] an acquisition module, used for acquiring a plurality of semantic location trajectory data, and determining a plurality of candidate sequence patterns and actual frequencies respectively corresponding to the plurality of candidate sequence patterns according to the plurality of semantic location trajectory data, wherein the actual frequencies respectively corresponding to the plurality of candidate sequence patterns are all higher than a preset frequency threshold;
[0036] A prediction module, used to obtain expected frequencies corresponding to a plurality of the candidate sequence patterns, wherein the expected frequencies are used to reflect the theoretical number of occurrences of each candidate sequence pattern based on travel cost considerations;
[0037] The mining module is used to select, among the candidate sequence patterns, the candidate sequence patterns whose actual frequencies are greater than the expected frequencies as high-interest sequence patterns.
[0038] In a third aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a plurality of instructions are stored, wherein the instructions are suitable for being loaded and executed by a processor to implement the steps of any of the above-mentioned sequential pattern mining methods.
[0039] Beneficial effects of the present invention: The embodiments of the present invention screen out high-interest sequence patterns whose actual frequencies are greater than the expected frequencies by calculating the actual frequencies and expected frequencies of each candidate sequence pattern. Since the actual frequency and the expected frequency can respectively reflect the actual number of occurrences of each candidate sequence pattern and the theoretical number of occurrences obtained based on travel cost considerations, when the actual frequency is greater than the expected frequency, it means that the candidate sequence pattern still has a number of occurrences far higher than the theoretical value when the travel cost is high, and it is then used as a high-interest sequence pattern. The present invention mines high-interest sequence patterns through the comprehensive mining of actual frequencies and expected frequencies, and can truly reflect the travel preferences of the crowd. It solves the problem that the currently mined high-interest sequence patterns are usually high-frequency sequence patterns with short access distances and low travel costs, which are difficult to reflect the real preferences of the crowd for the destination. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0041] Figure 1 It is a flowchart of the sequence pattern mining method provided by an embodiment of the present invention.
[0042] Figure 2 These are experimental results of using different sequence pattern mining methods in a simulated crowd movement data set when the simulated data provided by an embodiment of the present invention contains 5000 trajectories.
[0043] Figure 3 These are experimental results of using different sequence pattern mining methods in a simulated crowd movement data set when the simulated data provided by an embodiment of the present invention contains 20,000 trajectories.
[0044] Figure 4 These are experimental results of using different sequence pattern mining methods in a simulated crowd movement data set when the simulated data provided by an embodiment of the present invention contains 80,000 trajectories.
[0045] Figure 5 This is the experimental result of using a typical sequence pattern mining method in a Foursquare user check-in trajectory dataset provided by an embodiment of the present invention.
[0046] Figure 6 This is the experimental result of the sequence pattern mining method of the present invention in the Foursquare user check-in trajectory data set provided by the embodiment of the present invention.
[0047] Figure 7 It is a schematic diagram of the internal module connections of the sequential pattern screening device provided in an embodiment of the present invention.
[0048] Figure 8 It is a principle block diagram of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0050] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0051] The trajectory data generated by crowd movement is an important type of urban big data. Since trajectory data usually has spatial and temporal dimensions, it can be used to reflect the temporal and spatial patterns of crowd behavior, thereby supporting people to analyze areas of interest. Sequential pattern mining is one of the most common trajectory data analysis tasks, which aims to discover valuable sequential patterns from trajectory data, such as "office area a→shopping center b→residential area c". The results of sequential pattern mining are widely used in transportation planning, urban facility allocation, location-based advertising push, and tourist attraction recommendations.
[0052] However, the high-interest sequence patterns mined by the existing sequence pattern mining methods are usually sequence patterns with high frequency but short access distance and low travel cost. After excluding the travel cost factor, people may not have a preference for the places in the selected sequence patterns. For example, if the purpose of the sequence pattern mining task is to analyze the shopping preferences of residents, according to the existing sequence pattern mining methods, the obtained high-interest sequence patterns often exist between residential areas and their surrounding shops. The goods provided by some distant shops may be more in line with the preferences of residents, but due to the high travel cost and small passenger flow, the frequency of the sequence patterns between these shops and residential areas is low and may not be mined. Therefore, the existing mined high-interest sequence patterns are difficult to reflect the real preferences of people for destinations.
[0053] In view of the above-mentioned defects of the prior art, the present invention provides a method for mining a sequence pattern, by obtaining a number of semantic location trajectory data, determining a number of candidate sequence patterns and actual frequencies corresponding to the candidate sequence patterns according to the semantic location trajectory data, wherein the actual frequencies corresponding to the candidate sequence patterns are all higher than the preset frequency threshold; obtaining the expected frequencies corresponding to the candidate sequence patterns, wherein the expected frequencies are used to reflect the theoretical number of occurrences of each candidate sequence pattern based on the law that the travel frequency of the crowd decreases as the travel cost increases; and taking the candidate sequence pattern whose actual frequency is greater than the expected frequency among the candidate sequence patterns as a high-interest sequence pattern. Since the present invention mines a high-interest sequence pattern through the actual frequency and the expected frequency, when the actual frequency is greater than the expected frequency, it means that the currently calculated candidate sequence pattern still has a number of occurrences far higher than the theoretical value under the condition of high travel cost, so it can truly reflect the travel preference information of the crowd. The problem that the high-interest sequence patterns mined by the existing sequence pattern mining method are usually high-frequency sequence patterns with short access distance and low travel cost, which is difficult to reflect the real preference of the crowd for the destination is solved.
[0054] like Figure 1 As shown, the method comprises the following steps:
[0055] Step S100: Acquire a plurality of semantic location trajectory data, and determine a plurality of candidate sequence patterns and actual frequencies respectively corresponding to the plurality of candidate sequence patterns according to the plurality of semantic location trajectory data, wherein the actual frequencies respectively corresponding to the plurality of candidate sequence patterns are all higher than a preset frequency threshold.
[0056] Specifically, this embodiment first requires multiple semantic location trajectory data, which contain multiple semantic locations and can reflect the movement routes of the crowd. Therefore, multiple candidate sequence patterns with actual frequencies higher than the preset frequency threshold can be screened out according to these semantic location trajectories. Since these candidate sequence patterns represent multiple movement routes frequently visited by the crowd, they can be used to analyze the travel preferences of the crowd. For example, a candidate sequence pattern can be specifically "office area a→shopping center b→residential area c".
[0057] In one implementation, the step of acquiring a plurality of semantic location trajectory data and acquiring a plurality of candidate sequence patterns and actual frequencies respectively corresponding to the plurality of candidate sequence patterns according to the plurality of semantic location trajectory data specifically comprises the following steps:
[0058] Step S101, obtaining a number of original trajectory data within a target area and geographic information corresponding to the target area;
[0059] Step S102, determining semantic location trajectory data corresponding to a plurality of the original trajectory data respectively according to the geographic information and the plurality of the original trajectory data;
[0060] Step S103: input all of the plurality of semantic location trajectory data into a preset frequent sequence pattern mining algorithm to obtain the plurality of candidate sequence patterns and the actual frequencies corresponding to the plurality of candidate sequence patterns.
[0061] Specifically, this embodiment first determines the target area for research, and then obtains multiple original trajectory data within the target area. These original trajectory data include but are not limited to GPS trajectory data, check-in trajectories of social network users containing geographic locations, etc. Then, the geographic information within the target area is obtained, and the geographic information can be obtained based on an existing geographic information system or from an existing network map. Based on the geographic information, the semantic information of each location in each original trajectory data is determined to obtain the semantic location corresponding to each location, and each location is replaced with its corresponding semantic location, that is, the semantic location trajectory data corresponding to each original trajectory data is obtained. Finally, all the semantic location trajectory data are input into the preset frequent sequence pattern mining algorithm, that is, each candidate sequence pattern and its corresponding actual frequency are obtained, wherein the actual frequency of each candidate sequence pattern is higher than the preset frequency threshold, which is used to reflect the multiple mobile routes where people travel frequently.
[0062] Specifically, the specific value of the actual frequency is determined by the number of times the sequence pattern appears in all semantic place trajectory data. For example, if the actual frequency of the sequence pattern p "office area a→shopping center b→residential area c" is 100, it means that 100 people in the semantic place trajectory data visited the above three places in the order of a→b→c.
[0063] In one implementation, the actual frequency can be represented by the support of the sequence pattern. Specifically, for a given sequence pattern P, trajectory database D, and time threshold Δt, the support of P is the number of trajectories in D that simultaneously meet the following conditions a) and b), represented by supp(P, D, Δt):
[0064] a) P is a subsequence of the trajectory; where the definition of a subsequence is as follows: for a trajectory S = <(p1, t1), (p2, t2), …, (p k ,t k )>, S'=<(p'1,t'1),(p'2,t'2),…,(p' l ,t' l )>, where each p i represents a location, t i Indicates access to p iThe timestamp of the l ≤k, so that for all 1≤j≤l, p' j =p ij , then S' is called a subsequence of S, denoted by S' <S。
[0065] b) For any 1≤i <k,p i and p i+1 The access time difference does not exceed Δt, that is, t i -t i+1 ≤Δt. When D and Δt are clearly given in the context, supp(P,D,Δt) can be abbreviated as supp(P).
[0066] In one implementation, generating a plurality of the semantic location trajectory data according to the geographic information and the plurality of the original trajectory data specifically comprises the following steps:
[0067] Step S1021, determining a plurality of semantic locations according to the geographic information, wherein the plurality of semantic locations respectively have corresponding semantic information and are located in the target area;
[0068] Step S1022, determining a plurality of travel locations included in each of the original trajectory data, and determining a target semantic location corresponding to each of the travel locations from the plurality of semantic locations;
[0069] Step S1023 : for each piece of the original trajectory data, generate semantic location trajectory data corresponding to the original trajectory data according to all the target semantic locations corresponding to the original trajectory data.
[0070] In one implementation, this embodiment first determines several original points of interest in the target area based on geographic information, and then clusters these original points of interest, and regards each cluster generated by clustering as a location. After assigning semantic information to it, a semantic location is obtained. For example, Baidu Map shows that there are several restaurants in the target area, and each restaurant is an original point of interest. Since the number of visits to a single original point of interest is usually not high, the sequence composed of a single original point of interest usually has no practical value. Therefore, this embodiment clusters multiple original points of interest corresponding to multiple restaurants to obtain several clusters, and regards each cluster as a location and assigns it correct semantic information. For example, the sequence pattern of "restaurants near the north gate of Shenzhen University (cluster formed by several restaurants) → dormitory buildings of Shenzhen University (cluster formed by several dormitory buildings)" can reflect the behavior of Shenzhen University students going out for dinner and returning to the dormitory.
[0071] In another implementation, this embodiment may also divide the target area into grids or polygonal units, and take each grid or polygonal unit as a semantic location, and determine the semantic information of each semantic location based on the original points of interest within the coverage of each grid or polygonal unit.
[0072] In another implementation, this embodiment first identifies several stay points of the user from the original trajectory data, and then clusters the several stay points, taking each cluster generated by clustering as a semantic place, and determining the semantic information of each semantic place based on the original points of interest within the coverage of each cluster.
[0073] In one implementation, the preset frequent sequence pattern mining algorithm can be generated based on an existing frequent sequence pattern mining algorithm, but the step of calculating the actual frequency of the sequence pattern in the existing algorithm needs to be modified to determine whether the relevant sequence pattern satisfies t each time it appears in the semantic location trajectory data. i -t i+1 ≤Δt for inspection, t i -t i+1 ≤Δt means that in the trajectory, the time interval between each two adjacent locations in the sequence pattern does not exceed Δt. According to the definition of pattern support mentioned above, only when t is satisfied, i -t i+1 ≤Δt, this trajectory conforms to the sequence pattern P, and the actual frequency / support of the sequence pattern can be increased by 1. For example, assuming P =<a,b,c> , the time when locations a, b, and c appear in trajectory s are t1, t2, and t3 respectively, and Δt = 6 hours. Therefore, it is necessary that t2-t1≤6 hours and t3-t2≤6 hours for trajectory s to conform to the sequence pattern P.
[0074] Specifically, the frequent sequence pattern mining algorithm used in this embodiment needs to meet the following three conditions:
[0075] a) The frequent sequence pattern mining algorithm can exhaustively search for all sequence patterns in the trajectory database whose actual sequence patterns are higher than the preset frequency threshold;
[0076] b) The step of calculating the support of the sequence pattern in the frequent sequence pattern mining algorithm can be modified to check whether t is satisfied every time a relevant pattern appears in the trajectory. i -t i+1 ≤Δt;
[0077] c) The frequent sequential pattern mining algorithm calculates the support of the sequential pattern completely by traversing the database, rather than based on data sampling.
[0078] like Figure 1As shown, the method further comprises the following steps:
[0079] Step S200: obtaining expected frequencies corresponding to a plurality of the candidate sequence patterns respectively, wherein the expected frequencies are used to reflect the theoretical number of occurrences of each candidate sequence pattern based on travel cost considerations.
[0080] Specifically, after obtaining the actual frequency of each candidate sequence pattern, this embodiment also needs to obtain the expected frequency corresponding to each candidate sequence pattern, which can reflect the theoretical number of occurrences of each candidate sequence pattern based on travel cost considerations. Generally speaking, as the travel distance increases from near to far, the travel cost will also increase from low to high, and the value of the expected frequency corresponding to each candidate sequence pattern will gradually decrease. Therefore, by comparing the actual frequency and expected frequency of each candidate sequence pattern, it is possible to determine and mine a sequence pattern in which the number of occurrences is still far higher than the theoretical value when the travel cost is high. Such a sequence pattern can reflect the real preference of the crowd for the destination, which has certain research significance.
[0081] In one implementation, step S200 specifically includes:
[0082] Step S201: determining an actual travel distribution table according to the plurality of semantic location trajectory data, wherein the actual travel distribution table is used to reflect the actual situation of crowd movement;
[0083] Step S202: fitting the actual travel distribution table to obtain a theoretical travel distribution table, wherein the theoretical travel distribution table is used to reflect the theoretical law of crowd movement;
[0084] Step S203: Determine expected frequencies corresponding to a plurality of candidate sequence patterns respectively according to the actual travel distribution table and the theoretical travel distribution table.
[0085] Specifically, since these semantic location trajectory data are generated based on the original trajectory data of the crowd, the actual travel distribution table of the crowd can be obtained after statistical analysis of these semantic location trajectory data, and the actual travel distribution table can reflect the actual situation of the crowd's movement. After fitting the actual travel distribution table according to the crowd travel theoretical model, the theoretical travel distribution table can be obtained. The theoretical travel distribution table can reflect the influence of some objective factors (such as travel costs) on the crowd's movement route, and thus can reflect the theoretical law of crowd movement. This embodiment will combine the actual travel distribution table and the fitted theoretical travel distribution table to comprehensively determine the expected frequency corresponding to each candidate sequence pattern. The expected frequency can reflect the number of people who should theoretically occur when each candidate sequence pattern is based on travel cost considerations.
[0086] In one implementation, determining the actual travel distribution table according to the plurality of semantic location trajectory data includes:
[0087] Step S2011, statistically analyzing the semantic location trajectory data to obtain the actual travel distribution table, wherein the actual travel distribution table includes a plurality of cells, the row number of each cell represents the starting location, the column number of each cell represents the destination point, and the element value of each cell represents the number of people who arrive at the destination point from the starting location within a preset time.
[0088] Specifically, this embodiment can count the movement frequency of people between various semantic locations based on all semantic location trajectory data, thereby generating an actual travel distribution table. For example, suppose that the movement frequency of people between all m locations in the semantic location trajectory data is counted to obtain an actual travel distribution table T, where the element value at the (i, j) position of T represents the number of people who start from the starting location i and arrive at the destination point j within Δt time, denoted as T ij , that is, T ij =supp(i→j,D,Δt).
[0089] In one implementation, fitting the actual travel distribution table to obtain a theoretical travel distribution table includes:
[0090] Step S2021: fitting the actual travel distribution table through a plurality of dual-constraint gravity models to obtain a plurality of candidate theoretical travel distribution tables, wherein the plurality of dual-constraint gravity models correspond to different friction coefficient formulas and model parameters respectively;
[0091] Step S2022: Obtain the goodness of fit corresponding to the several candidate theoretical travel distribution tables, and use the candidate theoretical travel distribution table with the highest goodness of fit as the theoretical travel distribution table.
[0092] In short, in this embodiment, multiple dual-constraint gravity models are used to fit the actual travel distribution table, so as to obtain the theoretical travel distribution table with the highest goodness of fit through the calibration of multiple dual-constraint gravity models. Among them, these dual-constraint gravity models have different friction coefficient formulas and different model parameters, and the influence of travel cost factors represented by different friction coefficient formulas is different. Therefore, after each dual-constraint gravity model is fitted to the actual travel distribution table, an alternative theoretical travel distribution table corresponding to the dual-constraint gravity model will be generated. For each alternative theoretical travel distribution table, its corresponding goodness of fit needs to be calculated. Finally, the alternative theoretical travel distribution table with the highest goodness of fit is selected as the theoretical travel distribution table. Among them, this embodiment does not specifically limit the measurement method of goodness of fit.
[0093] For example, the total number of people departing from semantic location i to any other location in the semantic location trajectory data is recorded as O i , the total number of people departing from any other location to location j is recorded as D j The trip distribution table T is fitted by the double-constrained gravity model M to obtain the initial trip distribution table Each element in The values are:
[0094]
[0095] Among them, K i and L j is the balance factor, f(r ij ) is the friction coefficient, which indicates that due to the travel cost r ij , proceed from P i To P j The decrease in the possibility of travel:
[0096] f(r ij )=exp(-βr ij ) (2)
[0097] or:
[0098] f(r ij )=r ij -β (3)
[0099] Where exp represents the exponent. ij There are different ways to measure travel costs. The most common way is to use r ij Set as the travel distance d from location i to location j ij .
[0100] For different friction coefficient formulas (2) or (3) and different model parameters β, the median smoothing process is used to fit the double-constrained gravity model. ij The extreme values in are highly robust, which can avoid the adverse effects of extreme values on the model calibration results. Among them, the process of fitting the trip distribution table based on the median smoothing model is as follows:
[0101] 1) Establish a trip distribution table:
[0102]
[0103] The initial value of each element in the trip distribution table is e ij =log(T ij / f(r ij )), a i=b j =M=0.
[0104] 2) Run the median smoothing fitting procedure by alternatingly applying row and column sweeps.
[0105] In each row scan, for each column c in the travel distribution table, 1≤c≤m, find e 1c ,…,e mc The median of 1c ,…,e mc ). 1c ,…,e mc The values of median(e 1c ,…,e mc ), and b c The value of median(e 1c ,…,e mc ). After looping through each column, find b1,…,b m The median of m ). Set b1,…,b m The values of median(b1,…,b m ), and increase the value of M by median(b1,…,b m ).
[0106] In each column scan, for each row r in the table above, 1≤r≤m, find e r1 ,…,e rm The median of r1 ,…,e rm ). r1 ,…,e rm The values of median(e r1 ,…,e rm ), and a r The value of median(e r1 ,…,e rm ). After looping through each row, find a1,…,a m The median of m ). Set a1,…,a m The values of median(a1,…,a m ), and increase the value of M by median(a1,…,a m ).
[0107] The cells with zero values in the above table do not participate in row and column scanning. The above iterative process is repeated until the change brought to the above table by a row or column scan is close to zero.
[0108] Finally, the alternative theoretical itinerary distribution table is generated according to the following formula
[0109]
[0110] Then, the alternative theoretical travel distribution table obtained by fitting different friction coefficient formulas and model parameter combinations is Calculate the corresponding goodness of fit. Finally, select the one with the highest goodness of fit As a theoretical itinerary distribution table.
[0111] In one implementation, this embodiment uses a public commuter proportion value (CPC value) to evaluate the goodness of fit of each candidate theoretical trip distribution table, wherein the calculation formula of the CPC value is as follows:
[0112]
[0113] In one implementation, determining the expected frequencies corresponding to the candidate sequence patterns respectively according to the actual travel distribution table and the theoretical travel distribution table specifically includes the following steps:
[0114] Step S2031, determining a plurality of subsequence patterns corresponding to each of the candidate sequence patterns, wherein each of the subsequence patterns is a local portion of the candidate sequence pattern corresponding to the subsequence pattern;
[0115] Step S2032: determining actual occurrence frequencies corresponding to a plurality of the subsequence patterns according to the actual travel distribution table, and determining a sequence expected frequency corresponding to each of the candidate sequence patterns according to the actual occurrence frequencies;
[0116] Step S2033, determining theoretical occurrence frequencies corresponding to a plurality of the subsequence patterns according to the theoretical travel distribution table, and determining geographical expected frequencies corresponding to each of the candidate sequence patterns according to the theoretical occurrence frequencies;
[0117] Step S2034: Determine the expected frequency corresponding to each of the candidate sequence patterns according to the sequential expected frequency and the geographical expected frequency.
[0118] Specifically, since a candidate sequence pattern may contain more than two semantic locations, such candidate sequence patterns containing more than two semantic locations can be split into several subsequence patterns, wherein any adjacent semantic locations in each candidate sequence pattern can constitute a subsequence pattern corresponding to the candidate sequence pattern. Since the actual travel distribution table can reflect the actual situation of the crowd's movement route, the actual occurrence frequency corresponding to each subsequence pattern can be determined based on the actual travel distribution table, that is, the number of people who actually occur in the subsequence pattern in the data. Since the theoretical travel distribution table can reflect the theoretical law of the crowd's movement route, the theoretical number of people who occur corresponding to each subsequence pattern can be determined based on the theoretical travel distribution table, that is, the number of people who should occur in the subsequence pattern based on the travel cost consideration. For each candidate sequence pattern, the sequential expected frequency corresponding to the candidate sequence pattern is calculated according to the actual occurrence frequency of each subsequence pattern corresponding to the candidate sequence pattern, wherein the sequential expected frequency can reflect the number of people who theoretically visit each location in the candidate sequence pattern in sequence when the travel decisions between the locations in each candidate sequence pattern are independent of each other. Then, the geographic expected frequency corresponding to the candidate sequence pattern is calculated based on the theoretical occurrence frequency of each subsequence pattern corresponding to the candidate sequence pattern, where the geographic expected frequency can reflect the number of people who theoretically visit each location in a candidate sequence pattern in sequence when the crowd only considers travel costs and has no other preferences for locations. Finally, the expected frequency corresponding to the candidate sequence pattern is obtained by combining the sequential expected frequency and the geographic expected frequency. The expected frequency can reflect the final and accurate number of people who should occur in the candidate sequence pattern based on travel cost considerations.
[0119] In one implementation, it is first necessary to determine whether the occurrence of several subsequence patterns of the candidate sequence pattern is independent of each other, that is, whether the preferences of the crowd for several subsequence patterns do not affect each other. When the occurrence of several subsequence patterns is independent of each other, the actual occurrence frequency corresponding to each subsequence pattern is determined according to the actual travel distribution table, and then the expected frequency of the order corresponding to the candidate sequence pattern is calculated according to the following formula:
[0120]
[0121] in, is the trip distribution table T (p j ,p j+1 ) element value at position p. Specifically, assuming that according to the itinerary distribution table T, when the crowd is at p j When p is accessed within Δt time j+1 The ratio is As the crowd passes by j In the next Δt period, the average number of visits semantic locations, where each semantic location is p j+1 The possibility is therefore Candidate pattern sequence P = p1 → p2 → ... → p k The expected frequency of the sequence is the actual frequency of occurrence from p1 to p2, that is, the actual number of people moving and the number of people moving when the crowd is in p2, ..., p k-1 When, go to p3, ..., p k The product of the proportions, that is:
[0122]
[0123] For example, the expected order frequency of the candidate sequence pattern P = p1 → p2 → p3 is:
[0124] In one implementation, r = NΔt / t total Come as all The first estimated value is then substituted into the following formula to obtain the expected frequency of the sequence corresponding to the candidate sequence pattern:
[0125]
[0126] In one implementation, for each candidate sequence pattern, after determining the theoretical occurrence frequencies of several subsequence patterns corresponding to the candidate sequence pattern according to the theoretical travel distribution table, the geographical expected frequencies corresponding to each candidate sequence pattern are obtained according to the following formula:
[0127]
[0128] in, In the theoretical travel distribution table (p j ,p j+1 ) element value at position, is the trajectory data from location p j Total number of departures to any other location, For each trajectory, each time it passes through p j The average number of locations passed during the subsequent Δt period.
[0129] Specifically, when the candidate sequence pattern P contains only two semantic locations p1 and p2, formula (7) is equivalent to That is, the geographic expected frequency of the candidate sequence pattern P is the theoretical occurrence frequency from p1 to p2 in the theoretical itinerary distribution table. When the candidate sequence pattern p contains 3 or more semantic locations, according to the estimation of the theoretical itinerary distribution table, when the crowd is in p jWhen p is accessed within Δt time j+1 The probability of As the crowd passes by j In the next Δt period, the average number of visits semantic locations, each of which is p j+1 The probability of therefore Candidate sequence pattern P = p1 → p2 → ... → p k The expected frequency of geographic location is the theoretical frequency of occurrence from p1 to p2 and the frequency of occurrence when the population is in p2, ..., p k-1 When, go to p3, ..., p k The product of the possibilities, that is:
[0130]
[0131] For example, candidate sequence pattern P = p1 → p2 → ... → p k The geographical expected frequency is:
[0132]
[0133] The visiting time interval between adjacent semantic locations in the candidate sequence pattern is not less than a preset time threshold Δt.
[0134] In one implementation, r = NΔt / t total Come as all The second estimate of , where N is the sum of the number of trips between different locations for all trajectories, t total The sum of the elapsed time lengths is formed for all trajectories. Then the second estimate is substituted into the following formula to obtain the geographic expected frequency corresponding to the candidate sequence pattern:
[0135]
[0136] In one implementation, determining the expected frequency corresponding to each of the candidate sequence patterns according to the sequential expected frequency and the geographical expected frequency comprises the following steps:
[0137] The maximum value of the sequential expected frequency and the geographical expected frequency corresponding to each of the candidate sequence patterns is used as the expected frequency corresponding to each of the candidate sequence patterns.
[0138] In short, for any candidate sequence pattern P, its expected frequency is the larger value of its corresponding geographical expected frequency and sequential expected frequency.
[0139] like Figure 1 As shown, the method further comprises the following steps:
[0140] Step S300: Among the candidate sequence patterns, the candidate sequence pattern whose actual frequency is greater than the expected frequency is taken as a high-interest sequence pattern.
[0141] Specifically, since the actual frequency can reflect the actual number of occurrences of each candidate sequence pattern, and the expected frequency can reflect the theoretical number of occurrences of each candidate sequence pattern, when the actual frequency is greater than the expected frequency, it means that the candidate sequence pattern is more popular than theoretically, and the candidate sequence pattern is used as a high-interest sequence pattern. Since the present embodiment is a high-interest sequence pattern comprehensively screened by the actual frequency and the expected frequency, the high-interest sequence pattern can truly reflect the travel preference information of the crowd and can be applied to the fields of market analysis, marketing strategy decision-making, etc.
[0142] For example, the expected frequency of candidate sequence pattern P: A→B = 200, which means that people in business circle A should theoretically visit mall B 200 times. If the actual frequency of A→B = 500, it means that people in business circle A should actually visit mall B 500 times. Then candidate sequence pattern P is a high-interest sequence pattern, which reflects the preference of the crowd for the candidate sequence pattern P, and can be used for market analysis. For example, people in business circle A may have a special preference for the goods in mall B. If the actual frequency of A→B = 200, it means that people in business circle A actually only visit mall B 200 times, then the actual number of visits of candidate sequence pattern P is similar to the theoretically calculated number of visits, and candidate sequence pattern P cannot reflect the crowd's special preference for mall B, and cannot be used as a high-interest sequence pattern.
[0143] In one implementation, step S300 may be performed by the following formula:
[0144] expSupp(P)=max(seqExpSupp(P),seqExpSupp(P))
[0145] The geographic leverage of P is defined as the difference between the expected frequency of P and the actual frequency of P:
[0146] geoLev(P)=supp(P)–expSupp(P)
[0147] If geoLev(P)>0, P is regarded as a high-interest sequence pattern.
[0148] In one implementation, the method further includes the following steps:
[0149] Step S1, performing statistical significance tests on all the high-interest sequence patterns respectively, and taking the high-interest sequence patterns that pass the statistical significance test as sequence pattern mining results;
[0150] Step S2: Determine the travel preference information of the group according to the sequence pattern mining result.
[0151] Specifically, after obtaining the high-interest sequence pattern, this embodiment also needs to determine each high-interest sequence pattern for a statistical significance test. According to the statistical significance test, it can be determined whether each high-interest sequence pattern has statistical significance, that is, whether the actual frequency of each high-interest sequence pattern is significantly greater than its corresponding expected frequency. Only when the high-interest sequence pattern passes the statistical significance test can it be retained to obtain a sequence pattern mining result that can accurately reflect the preference information of the movement of the crowd. The sequence pattern mining result has a certain generalizability, which can not only be used to explain the current multiple semantic trajectory data, but also can be applied to future decisions in the same study area or other geographical areas. Among them, the specific types of significance tests can include but are not limited to: chi-square goodness of fit test, exact goodness of fit test, and double sample test.
[0152] In one implementation, since the sequential expected frequency and the geographic expected frequency have different physical natures, when performing a statistical significance test, it is necessary to separately test whether the actual frequency of each high-interest sequence pattern is significantly greater than its corresponding sequential expected frequency, and whether it is significantly greater than its corresponding geographic expected frequency.
[0153] For example, for each high-interest sequence pattern P = p1 → p2 → ... → pk, in order to determine whether the actual frequency of the high-interest sequence pattern is significantly higher than its corresponding geographical expected frequency, when When , use the chi-square goodness-of-fit test:
[0154] chi 2 =(supp(P)-geoExpSupp(P)) 2 (geoExpSupp(P) -1 +(supp(P)-geoExpSupp(P)) -1 )(9)
[0155] The result of this test is chi in the above formula 2 The right-tail probability of the chi-square distribution with a value of 1 degree of freedom is expressed as p geo (P) indicates. When , an exact goodness-of-fit test is used:
[0156]
[0157] in,
[0158] In one implementation, when a high-interest sequence pattern contains three or more semantic locations, a two-sample test method is used to determine whether the actual frequency of the high-interest sequence pattern is significantly higher than its corresponding expected frequency. For example, a two-sample z is used to test the high-interest sequence pattern and obtain the statistic:
[0159]
[0160] in, Independent binomial distribution variables The variance of the product of i →p i+1 ) can be used To estimate.
[0161] When the high interest sequence pattern contains 3 locations:
[0162]
[0163] in:
[0164]
[0165]
[0166]
[0167]
[0168] When the high interest sequence pattern contains 4 or more locations, It can be calculated by multiplying more variables in equation (12). The result of this test is the right-tail probability of the normal distribution at the z value in equation (11), expressed as p seq (P) indicates.
[0169] In one implementation, this embodiment may also perform an auxiliary test on each high-interest sequence pattern to screen out false sequence patterns in the high-interest sequence patterns, thereby further ensuring the statistical significance of the sequence pattern mining results.
[0170] Specifically, if the high-interest sequence pattern a:p a →p b The actual frequency is significantly higher than its corresponding expected frequency, and there is a third location p c With p a The distance is very close, so p a The main purpose of travel for the people inb When p a to p c The travel cost is very low, by the way, visit p c , then go to p b is more likely to result in a high interest sequence pattern B: p c →p b The actual frequency of is higher than its corresponding expected frequency, and the high-interest sequence pattern b can also pass the statistical significance test and be identified as a sequence pattern mining result. c Since it was a casual visit, I visited with the crowd b and p c Therefore, the high-interest sequence pattern B is a false sequence pattern, even misleading, and should be screened out. Similarly, if the location p c With p b Very close, high interest sequence pattern p a →p c In one implementation, if the task of mining a specific sequence pattern is to be performed, the above pattern p c →pb or p a →p c If the analysis of pattern mining results is valuable, no auxiliary inspection is needed.
[0171] In one implementation, the specific steps of the auxiliary inspection are as follows:
[0172] First, for the high interest sequence pattern P = p1 → p2 → ... → p k Each semantic location p in i ,1≤j≤k, and p i and p i+1 Every other semantic location p nearby a , when p i →p a or p a →p i+1 When the actual frequency of is significantly higher than its corresponding expected frequency, that is, when p i →p a or p a →p i+1 When the relationship between the actual frequency and the expected frequency satisfies the following (14), the semantic location p a Put it into a set A:
[0173] max(p geo (p i →p a ),p seq (p i →p a ))≤κmax
[0174] or
[0175] max(p geo (p a →p i+1 ),p seq (p a →p i+1 ))≤κ max (14)
[0176] Among them, k max To satisfy the p of any sequence pattern geo >k max or p seq >k max The minimum p value for which the high-interest sequence pattern must not be statistically significant is geo or p geo value.
[0177] Calculate the population in the data along p1→…→p i →p a →p i+1 →…→pk moves, and p i →p a → p i+1 The frequency of accesses completed within Δt is count(P,p a ,i,Δt). All semantic locations p in A a The corresponding count(P,p a ,i,Δt) value is subtracted from the actual frequency and expected frequency of the sequence pattern P to obtain the corrected actual frequency of P:
[0178]
[0179] And the expected frequency of the modified P:
[0180]
[0181] Finally, supp(P), geoExpSupp(P), and geoPr(P) in equations (9) and (10) are replaced by supp'(P), geoExpSupp'(P), and geoExpSupp'(P) / Replace and re-test the statistical significance, the test result is p' geo (P). When p' geo When (P) is also lower than the preset significance level, it is considered that the high interest sequence pattern P passes the auxiliary test.
[0182] In one implementation, the Benjamini-Hochberg-Yekutieli correction method is used to control the proportion of false sequence patterns below a preset ratio.
[0183] Specifically, the final statistical test p value of each high-interest sequence pattern P can be calculated by the following formula:
[0184] p=max(p geo (P),p seq (P),p′ geo (P))
[0185] For all final p values not exceeding k max The high-interest sequence patterns need to be subjected to the Benjamini-Hochberg-Yekutieli correction method to control the proportion of false sequence patterns in the sequence pattern mining results. The final p values of each high-interest sequence pattern in the sequence pattern mining results are arranged from small to large, and recorded as p1,…,p t . Find the maximum q value that satisfies the following equation (17):
[0186]
[0187] Where α is the upper limit of the false pattern ratio specified by the user, such as 5%; m is the total number of candidate sequence patterns for the sequence pattern mining task. q The corresponding sequence pattern is used as the final result of the sequence pattern mining method, and the proportion of false patterns in the result can be controlled below α.
[0188] The calculation method of m in equation (17) is as follows:
[0189] If there are n locations in the data, and the number of locations included in the user-specified sequence pattern does not exceed h, then m = n(n-1) + n(n-1)2 + ... + n(n-1)h-1. If only the sequence patterns between specific locations are considered, then the value of m is the total number of permutations that can be formed by the specific locations, which is smaller than the above value. Let f be the total number of retained sequence patterns. For equation (17), when q = t = f, p q reaches its maximum possible value, k max value:
[0190]
[0191] If the final p-value of the statistical test of a high-interest sequence pattern is greater than pq, then the high-interest sequence pattern must be screened out in the Benjamini-Hochberg-Yekutieli correction method. maxThe value is p q Therefore, if the statistical test result value of a high-interest sequence pattern in any step of the statistical significance test is greater than k max , then the high-interest sequence patterns are unlikely to enter the sequence pattern mining results and can be directly deleted to save running time and improve efficiency.
[0192] In order to illustrate the effect of the sequential pattern mining method provided by the embodiment of the present invention, Figure 2 , 3 4 shows the experimental results of mining simulated crowd movement trajectory data by this method, and compares them with the results of other sequence pattern mining methods. In the simulated crowd movement trajectory data, each location on the trajectory is randomly selected according to the preset crowd movement probability distribution. The preset crowd movement probability between most locations conforms to the distance decay equation, indicating that people have no special preference for locations except for travel costs. At the same time, it is set that some locations (such as p a to p b ) is significantly higher than the probability calculated according to the distance decay equation, indicating that the population located in or visiting p a The crowd is p b Preference. The above-mentioned special preference for locations has formed 165 preset sequence patterns, namely "real patterns", and 20 inevitable and incidentally generated sequence patterns. Except for the above 185 patterns, other patterns in the sequence pattern mining results are "false patterns". In order to test the robustness of the method, different crowd movement probability distance decay equations and different numbers of trajectories are used to generate multiple sets of simulation data and conduct experiments respectively. Among them, the upper limit of the false pattern ratio defined by the user is 5%.
[0193] Figure 2 , 3 4 show that the sequence pattern mining method provided by the embodiment of the present invention has a high ability to discover real sequence patterns. In different simulation data groups, it can generally discover at least 140 of the 165 real patterns, and can strictly control the proportion of false patterns. The overall false pattern proportion in each simulation data group is only 0.00625%. In contrast, according to the aforementioned existing typical sequence pattern mining method, selecting a sequence pattern with a higher frequency will obtain many false patterns, and the number of real patterns found is generally much lower than the sequence pattern mining method provided by the embodiment of the present invention. If the statistical significance test in the present invention is not performed, although the result is better than the sequence pattern with a higher frequency, the proportion of the obtained false patterns is still often higher than 5%, which does not meet the user's requirements, thereby proving the necessity of the statistical significance test process.
[0194] In order to further demonstrate the application effect of the sequential pattern mining method provided by the present invention, the inventors also used the user check-in trajectory data on the social media Foursquare to conduct an empirical study on crowd movement sequential pattern mining. The results are as follows: Figure 5 , 6 As shown, the frequency threshold minsupp for screening out candidate sequence patterns is 20. Figure 5 The top 200 most frequent sequence patterns are given. Figure 6 The results obtained by the sequence pattern mining method provided by the embodiment of the present invention are given. It can be seen that according to the aforementioned existing typical sequence pattern mining method, the sequence patterns with higher frequencies are selected, and the majority of the sequence patterns obtained exist between adjacent locations. According to such data mining results, the decision obtained is generally to recommend points of interest near the user, or to push advertisements of shops near the user. This is a conventional marketing strategy and it is not easy to gain a competitive advantage. In contrast, the results obtained by the sequence pattern mining method provided by the embodiment of the present invention can better reflect the preference of the crowd for a specific location, thereby discovering new crowd behavior patterns, as well as new advertising push and interest point recommendation strategies. According to the results obtained by the sequence pattern mining method provided by the embodiment of the present invention, in addition to recommending or pushing nearby points of interest or shop advertisements to users according to conventional strategies, points of interest or advertisements that are usually particularly preferred by users at the location and within a reasonable distance range should also be recommended or pushed according to the user's location, which may bring higher conversion rates and profits, and because the recommendation or push is more in line with the user's preferences, it is conducive to enhancing user stickiness.
[0195] Based on the above embodiments, the present invention also provides a sequence pattern screening device, such as Figure 7 As shown, the device comprises:
[0196] The acquisition module 01 is used to acquire a plurality of semantic location trajectory data, and determine a plurality of candidate sequence patterns and actual frequencies respectively corresponding to the plurality of candidate sequence patterns according to the plurality of semantic location trajectory data, wherein the actual frequencies respectively corresponding to the plurality of candidate sequence patterns are all higher than a preset frequency threshold;
[0197] Prediction module 02, used to obtain expected frequencies corresponding to a plurality of candidate sequence patterns, wherein the expected frequencies are used to reflect the theoretical number of occurrences of each candidate sequence pattern based on travel cost considerations;
[0198] The mining module 03 is used to select, among the candidate sequence patterns, the candidate sequence patterns whose actual frequencies are greater than the expected frequencies as high-interest sequence patterns.
[0199] Based on the above embodiment, the present invention further provides a terminal, whose principle block diagram can be shown as follows: Figure 8As shown. The terminal includes a processor, a memory, a network interface, and a display screen connected through a system bus. Among them, the processor of the terminal is used to provide computing and control capabilities. The memory of the terminal includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the terminal is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a sequential pattern mining method is implemented. The display screen of the terminal can be a liquid crystal display screen or an electronic ink display screen.
[0200] Those skilled in the art will understand that Figure 8 The principle block diagram shown in the figure is only a block diagram of a partial structure related to the scheme of the present invention, and does not constitute a limitation on the terminal to which the scheme of the present invention is applied. The specific terminal may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0201] In one implementation, one or more programs are stored in the memory of the terminal, and the one or more programs are configured to be executed by one or more processors, and the one or more programs include instructions for performing a sequential pattern mining method.
[0202] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0203] In summary, the present invention discloses a method, device and storage medium for mining a sequence pattern, wherein the method comprises: obtaining a plurality of semantic location trajectory data, determining a plurality of candidate sequence patterns and actual frequencies corresponding to the plurality of candidate sequence patterns according to the plurality of semantic location trajectory data, wherein the actual frequencies corresponding to the plurality of candidate sequence patterns are all higher than a preset frequency threshold; obtaining the expected frequencies corresponding to the plurality of candidate sequence patterns, wherein the expected frequencies are used to reflect the theoretical number of occurrences of each candidate sequence pattern based on travel cost considerations; and taking the candidate sequence pattern whose actual frequency is greater than the expected frequency among the plurality of candidate sequence patterns as a high-interest sequence pattern. Since the present invention mines a high-interest sequence pattern by comprehensively mining the actual frequency and the expected frequency, when the actual frequency is greater than the expected frequency, it indicates that the currently calculated candidate sequence pattern still has a number of occurrences far higher than the theoretical value under the condition of high travel cost, and thus can truly reflect the travel preference information of the crowd. The method solves the problem that the high-interest sequence patterns mined by the existing sequence pattern mining method are usually high-frequency sequence patterns with short access distance and low travel cost, which are difficult to reflect the real preference of the crowd for the destination.
[0204] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A sequential pattern mining method, characterized in that: The method comprises: Acquire a number of semantic location trajectory data, and determine a number of candidate sequence patterns and actual frequencies respectively corresponding to the candidate sequence patterns according to the number of semantic location trajectory data, wherein the actual frequencies respectively corresponding to the candidate sequence patterns are all higher than a preset frequency threshold; Obtaining expected frequencies corresponding to a number of the candidate sequence patterns, respectively, wherein the expected frequencies are used to reflect the theoretical number of occurrences of each candidate sequence pattern based on travel cost considerations; Among the candidate sequence patterns, the candidate sequence pattern whose actual frequency is greater than the expected frequency is taken as a high-interest sequence pattern; The obtaining of the expected frequencies respectively corresponding to the candidate sequence patterns includes: Determine an actual travel distribution table according to the plurality of semantic location trajectory data, wherein the actual travel distribution table is used to reflect the actual situation of crowd movement; Fitting the actual travel distribution table to obtain a theoretical travel distribution table, wherein the theoretical travel distribution table is used to reflect the theoretical law of crowd movement; Determining expected frequencies corresponding to a plurality of candidate sequence patterns respectively according to the actual travel distribution table and the theoretical travel distribution table; The step of determining the expected frequencies respectively corresponding to a plurality of the candidate sequence patterns according to the actual travel distribution table and the theoretical travel distribution table comprises: Determine a plurality of subsequence patterns corresponding to each of the candidate sequence patterns, wherein each of the subsequence patterns is a local portion of the candidate sequence pattern corresponding to the subsequence pattern; According to the actual travel distribution table, determining actual occurrence frequencies corresponding to a plurality of the subsequence patterns respectively, and determining the expected sequence frequency corresponding to each of the candidate sequence patterns respectively according to the actual occurrence frequencies; Determine theoretical occurrence frequencies corresponding to a plurality of subsequence patterns according to the theoretical travel distribution table, and determine geographical expected frequencies corresponding to each candidate sequence pattern according to the theoretical occurrence frequencies; Determine the expected frequency corresponding to each of the candidate sequence patterns according to the sequential expected frequency and the geographical expected frequency; The step of determining the expected frequency corresponding to each of the candidate sequence patterns according to the sequential expected frequency and the geographical expected frequency comprises: The maximum value of the sequential expected frequency and the geographical expected frequency corresponding to each of the candidate sequence patterns is used as the expected frequency corresponding to each of the candidate sequence patterns.
2. The sequential pattern mining method according to claim 1, characterized in that: The acquiring of a plurality of semantic location trajectory data and determining a plurality of candidate sequence patterns and actual frequencies respectively corresponding to the plurality of candidate sequence patterns according to the plurality of semantic location trajectory data include: Acquire a number of original trajectory data within a target area and geographic information corresponding to the target area; Determine, according to the geographic information, semantic location trajectory data corresponding to a number of the original trajectory data respectively; All of the plurality of semantic location trajectory data are input into a preset frequent sequence pattern mining algorithm to obtain the plurality of candidate sequence patterns and the actual frequencies respectively corresponding to the plurality of candidate sequence patterns.
3. The sequential pattern mining method according to claim 1, characterized in that: Determining the actual travel distribution table according to the plurality of semantic location trajectory data includes: Statistical analysis is performed on the semantic location trajectory data to obtain the actual travel distribution table, wherein the actual travel distribution table includes a plurality of cells, the row number of each cell represents the starting location, the column number of each cell represents the destination point, and the element value of each cell represents the number of people who arrive at the destination point from the starting location within a preset time.
4. The sequential pattern mining method according to claim 1, characterized in that: The fitting of the actual travel distribution table to obtain a theoretical travel distribution table includes: The actual travel distribution table is fitted by using a plurality of dual-constraint gravity models to obtain a plurality of alternative theoretical travel distribution tables, wherein the plurality of dual-constraint gravity models correspond to different friction coefficient formulas and model parameters; The goodness of fit corresponding to the plurality of candidate theoretical travel distribution tables is obtained, and the candidate theoretical travel distribution table with the highest goodness of fit is used as the theoretical travel distribution table.
5. The sequential pattern mining method according to claim 1, characterized in that: The method further comprises: Performing statistical significance tests on all the high-interest sequence patterns respectively, and taking the high-interest sequence patterns that pass the statistical significance test as sequence pattern mining results; According to the sequence pattern mining results, the travel preference information of the crowd is determined.
6. A sequence pattern screening device, characterized in that: The device comprises: an acquisition module, used for acquiring a plurality of semantic location trajectory data, and determining a plurality of candidate sequence patterns and actual frequencies respectively corresponding to the plurality of candidate sequence patterns according to the plurality of semantic location trajectory data, wherein the actual frequencies respectively corresponding to the plurality of candidate sequence patterns are all higher than a preset frequency threshold; A prediction module, used to obtain expected frequencies corresponding to a plurality of the candidate sequence patterns, wherein the expected frequencies are used to reflect the theoretical number of occurrences of each candidate sequence pattern based on travel cost considerations; A mining module, configured to select, among the candidate sequence patterns, a candidate sequence pattern whose actual frequency is greater than the expected frequency as a high-interest sequence pattern; The obtaining of the expected frequencies respectively corresponding to the candidate sequence patterns includes: Determine an actual travel distribution table according to the plurality of semantic location trajectory data, wherein the actual travel distribution table is used to reflect the actual situation of crowd movement; Fitting the actual travel distribution table to obtain a theoretical travel distribution table, wherein the theoretical travel distribution table is used to reflect the theoretical law of crowd movement; Determining expected frequencies corresponding to a plurality of candidate sequence patterns respectively according to the actual travel distribution table and the theoretical travel distribution table; The step of determining the expected frequencies respectively corresponding to a plurality of the candidate sequence patterns according to the actual travel distribution table and the theoretical travel distribution table comprises: Determine a plurality of subsequence patterns corresponding to each of the candidate sequence patterns, wherein each of the subsequence patterns is a local portion of the candidate sequence pattern corresponding to the subsequence pattern; According to the actual travel distribution table, determining actual occurrence frequencies corresponding to a plurality of the subsequence patterns respectively, and determining the expected sequence frequency corresponding to each of the candidate sequence patterns respectively according to the actual occurrence frequencies; Determine theoretical occurrence frequencies corresponding to a plurality of subsequence patterns according to the theoretical travel distribution table, and determine geographical expected frequencies corresponding to each candidate sequence pattern according to the theoretical occurrence frequencies; Determine the expected frequency corresponding to each of the candidate sequence patterns according to the sequential expected frequency and the geographical expected frequency; The step of determining the expected frequency corresponding to each of the candidate sequence patterns according to the sequential expected frequency and the geographical expected frequency comprises: The maximum value of the sequential expected frequency and the geographical expected frequency corresponding to each of the candidate sequence patterns is used as the expected frequency corresponding to each of the candidate sequence patterns.
7. A computer-readable storage medium having a plurality of instructions stored thereon, characterized in that: The instructions are suitable for being loaded and executed by a processor to implement the steps of the sequence pattern mining method described in any one of claims 1-5 above.
