Track data processing method and device, computer readable medium and electronic equipment
By extracting and analyzing site access features and transfer features in trajectory data, the similarity between trajectory data is calculated, and the problem of insufficient accuracy of trajectory data recognition in the prior art is solved, and more efficient trajectory data recognition is achieved.
Patent Information
- Application Number
- CN202311004694.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-10
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is difficult to accurately identify the same individual in the trajectory data, resulting in insufficient identification accuracy.
By extracting site access features and site transfer features in trajectory data, the similarity between trajectory data is calculated, and the trajectory data belonging to the same travel object is found.
The accuracy of trajectory data is improved and the trajectory data of travel objects can be more effectively identified.
Smart Images

Figure CN119474163A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer and communication technology, and in particular to a trajectory data processing method, device, computer-readable medium and electronic device. Background Art
[0002] Object matching refers to identifying the same individuals in different datasets without leaking sensitive information by analyzing the similarity of their trajectory data for different datasets containing object trajectory data. However, it is difficult for the solutions in related technologies to obtain accurate recognition results. Therefore, how to improve the recognition accuracy of trajectory data is a technical problem that needs to be solved urgently. Summary of the invention
[0003] The embodiments of the present application provide a method, device, computer-readable medium and electronic device for processing trajectory data, which can combine the site visit characteristics and site transfer characteristics of travel objects to perform identification and processing of trajectory data, thereby improving the identification accuracy of trajectory data.
[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0005] In a first aspect, an embodiment of the present application provides a method for processing trajectory data, comprising: acquiring multiple trajectory data, each trajectory data comprising a sequence of sites visited by a travel object in chronological order; extracting, based on the multiple trajectory data, site visit features and site transfer features corresponding to each trajectory data; calculating the similarity between the multiple trajectory data based on the site visit features and site transfer features corresponding to each trajectory data; and searching for trajectory data belonging to the same travel object based on the similarity between the multiple trajectory data.
[0006] In a second aspect, an embodiment of the present application provides a trajectory data processing device, comprising: an acquisition unit, configured to acquire multiple trajectory data, each trajectory data comprising a sequence of sites visited by a travel object in chronological order; an extraction unit, configured to extract, based on the multiple trajectory data, site visit features and site transfer features corresponding to each trajectory data; a calculation unit, configured to calculate the similarity between the multiple trajectory data based on the site visit features and site transfer features corresponding to each trajectory data; and a processing unit, configured to search for trajectory data belonging to the same travel object based on the similarity between the multiple trajectory data.
[0007] In a third aspect, an embodiment of the present application provides a computer-readable medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for processing trajectory data as described in the above embodiment is implemented.
[0008] In a fourth aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a storage device for storing one or more computer programs, wherein when the one or more computer programs are executed by the one or more processors, the electronic device implements the trajectory data processing method as described in the above embodiments.
[0009] In a fifth aspect, an embodiment of the present application provides a computer program product, the computer program product including a computer program, the computer program being stored in a computer-readable storage medium. A processor of an electronic device reads and executes the computer program from the computer-readable storage medium, so that the electronic device executes the method for processing trajectory data provided in the above-mentioned various optional embodiments.
[0010] In the technical solutions provided in some embodiments of the present application, by extracting the site visit features and site transfer features corresponding to each trajectory data, and then calculating the similarity between multiple trajectory data based on the site visit features and site transfer features corresponding to each trajectory data, and then searching for trajectory data belonging to the same travel object based on the similarity between the multiple trajectory data, the trajectory data can be identified and processed in combination with the site visit features and site transfer features of the travel object, thereby improving the recognition accuracy of the trajectory data.
[0011] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A schematic diagram showing an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied;
[0013] Figure 2 A flowchart showing a method for processing trajectory data according to an embodiment of the present application is shown;
[0014] Figure 3 A flowchart of calculating the similarity between trajectory data according to an embodiment of the present application is shown;
[0015] Figure 4 An overall block diagram of a trajectory data processing solution according to an embodiment of the present application is shown;
[0016] Figure 5 A comparative schematic diagram of site access conditions according to an embodiment of the present application is shown;
[0017] Figure 6 A schematic diagram of a bipartite graph according to an embodiment of the present application is shown;
[0018] Figure 7A schematic diagram showing a matching result of a travel object according to an embodiment of the present application;
[0019] Figure 8 A block diagram of a device for processing trajectory data according to an embodiment of the present application is shown;
[0020] Fig. 9 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0021] The exemplary embodiments are now described in a more comprehensive manner with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be understood as being limited to these examples; on the contrary, the purpose of providing these embodiments is to make this application more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art.
[0022] In addition, the features, structures or characteristics described in the present application may be combined in one or more embodiments in any suitable manner. In the following description, there are many specific details so that the embodiments of the present application can be fully understood. However, those skilled in the art will appreciate that when implementing the technical scheme of the present application, all the detailed features in the embodiments may not be needed, one or more specific details may be omitted, or other methods, elements, devices, steps, etc. may be adopted.
[0023] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0024] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0025] It should be noted that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0026] It is understandable that the present application may display a prompt interface or pop-up window before collecting relevant data of the travel object (such as the trajectory data of the travel object, etc.) and during the process of collecting relevant data of the travel object. The prompt interface or pop-up window is used to prompt the travel object that its relevant data is currently being collected, so that the present application only starts to execute the relevant steps of obtaining the relevant data of the travel object after obtaining the confirmation operation issued by the travel object on the prompt interface or pop-up window, otherwise (that is, when the confirmation operation issued by the travel object on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining the relevant data of the travel object are terminated, that is, the relevant data of the travel object is not obtained. In other words, all data collected by the present application are collected with the consent and authorization of the travel object, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0027] Object matching refers to identifying the same individuals in different datasets without leaking sensitive information by analyzing the similarity of their trajectory data for different datasets containing object trajectory data. In related technologies, most of them first analyze the travel characteristics of different trajectory data, such as the same location points visited or the similar geometric shapes of the trajectories, and then calculate the spatial proximity between the trajectories, and finally identify the same individuals in different datasets through matching algorithms.
[0028] At the same time, the core of the object matching problem is trajectory similarity calculation, but most of the trajectory similarity measurement technologies in related technologies regard two trajectories as ordered point sequences or identify frequent activity pattern sequences of objects, and then calculate the distance between points in the sequence. Some use traditional similarity calculation methods, such as cosine distance, Manhattan distance, Euclidean distance, etc., while others consider the different number of trajectory points in different trajectory data and design a dynamic time wrapping (DTW) method with no restrictions on trajectory length. This method can reuse some position points to achieve the best alignment.
[0029] It can be seen that various methods are used in related technologies to find the best alignment of location points to measure their similarity. However, due to the difference between station data (such as bus stations and subway stations) and GPS (Global Positioning System) trajectory data, such as the small number of stations, there is no difference between the same location points, and each trip will only generate two trajectory points (i.e., entry and exit points). A large number of travelers use the subway at a very low frequency for a long time, making it difficult for these methods to achieve high performance in station trajectory data. In addition, the number of travelers in public transportation data is huge. If the solution in the related technology is adopted, that is, the travel object with the greatest trajectory similarity is used as the final matching result, a large number of conflicting matches may be generated, affecting the overall matching result.
[0030] In view of the problems existing in the related art, the technical solution of the embodiment of the present application proposes a new trajectory data processing solution, which is particularly suitable for processing trajectory data containing stations. Specifically, Figure 1 As shown, an exemplary system architecture using the technical solution of the present application may include: a card reader 110, a card swiping device 120, and a server 130. The card reader 110 may be set at a subway station, a bus station, and the like, and a traveler may use a card swiping device 120 to swipe a card at the card reader 110, and then the card reader 110 may open the gate to facilitate the traveler to enter and exit various stations after reading the card information in the card swiping device 120. At the same time, the card reader 110 may transmit the read card information to the server 130 via the network.
[0031] Optionally, the server 130 involved in the embodiments of the present application may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms. The card swiping device 120 may be a terminal device with the function of recording card information, such as a smart phone, a tablet computer, a smart bracelet, a smart watch, a bus card, etc. The server 130 can communicate with the card swiping machine 110 through a wireless network or a wired network.
[0032] In one embodiment of the present application, the server 130 can obtain the trajectory data of multiple travel objects through the card information transmitted by the card reader 110 and the identification information of the card reader 110 (such as the identification of which station). Each trajectory data contains a sequence of stations visited by the travel object in chronological order. Then, the server 130 can extract the station access features and station transfer features corresponding to each trajectory data according to the multiple trajectory data, and calculate the similarity between the multiple trajectory data according to the station access features and station transfer features corresponding to each trajectory data. Then, the server 130 can search for the trajectory data belonging to the same travel object according to the similarity between the multiple trajectory data.
[0033] It can be seen that the technical solution of the embodiment of the present application can combine the site visit characteristics and site transfer characteristics of the travel object to perform identification and processing of trajectory data, thereby improving the identification accuracy of trajectory data.
[0034] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0035] Figure 2 A flowchart showing a method for processing trajectory data according to an embodiment of the present application is shown. The method for processing trajectory data can be executed by a server, which can be Figure 1 The server 130 shown in FIG. Figure 2 As shown, the trajectory data processing method at least includes S210 to S240, which are described in detail as follows:
[0036] In S210 , a plurality of trajectory data are obtained, each of which includes a sequence of sites visited by the travel object in chronological order.
[0037] In some optional embodiments, the trajectory data is the data of each station visited by the travel object during the travel process. For example, if a travel object enters the station from station A, then exits the station from station B, then enters the station from station C, and finally exits the station from station A, then the trajectory data of the travel object is {station A, station B, station C, station A}. Optionally, the travel object can be a user, or other objects such as a robot. The station can be a subway station station, a bus station station, or a fixed station set on the travel route.
[0038] In S220 , based on the plurality of trajectory data, a site visit feature and a site transfer feature corresponding to each trajectory data are extracted.
[0039] In some optional embodiments, the site access feature is used to represent the visit of the travel object to each site, for example, to represent the visit probability of the travel object to each site. In this case, the process of extracting the site access feature corresponding to each track data may be: according to each site contained in each track data and the visit situation of each site, the visit probability of the travel object associated with each track data to each site is calculated, and then according to the visit probability of the travel object to each site, the site access probability distribution corresponding to each track data is generated, and the site access probability distribution is used as the site access feature.
[0040] In some optional embodiments, the access probability can be represented by the access frequency. Specifically, the access frequency of the travel object associated with each trajectory data to each site can be calculated based on the various sites contained in each trajectory data and the access status of each site, and then the access frequency of the travel object to each site can be used as the access probability of the travel object to each site.
[0041] In some optional embodiments, the station transfer feature is used to represent the transfer of the travel object between various stations. Optionally, the process of extracting the station transfer feature corresponding to each trajectory data may be: according to each station included in each trajectory data and the transfer between each station, the transfer probability of each station to other stations is calculated, and then according to the transfer probability of each station to other stations, the station transfer probability matrix corresponding to each trajectory data is generated, and the station transfer probability matrix is used as the station transfer feature.
[0042] In some optional embodiments, the transfer probability from each station to other stations can be calculated in the following manner: according to the transfer conditions between each station and each station contained in each trajectory data, the transfer frequency from the i-th station to the j-th station and the transfer frequency from the i-th station to other stations in each trajectory data are counted, and then the transfer probability from the i-th station to the j-th station is calculated according to the transfer frequency from the i-th station to the j-th station and the transfer frequency from the i-th station to other stations. For example, the ratio between the transfer frequency from the i-th station to the j-th station and the transfer frequency from the i-th station to other stations can be used as the transfer probability from the i-th station to the j-th station.
[0043] It should be noted that the transfer frequency is used to indicate the number of transfers. For example, the transfer frequency from the i-th station to the j-th station is used to indicate the number of transfers from the i-th station to the j-th station in a trajectory data, that is, the number of times the i-th station enters the station and the j-th station exits the station in the trajectory data. Similarly, the transfer frequency from the i-th station to other stations is used to indicate the number of transfers from the i-th station to other stations in a trajectory data, that is, the number of times the i-th station enters the station and the j-th station exits the station in the trajectory data.
[0044] In S230 , similarities between the plurality of trajectory data are calculated according to the site visit features and site transfer features corresponding to each trajectory data.
[0045] In some optional embodiments, the site visit features and site transfer features corresponding to each track data may be integrated as features corresponding to each track data, and then the similarity between multiple track data may be calculated by the features corresponding to each track data. For example, the distance between track data (such as cosine distance, Euclidean distance, etc.) may be calculated by the features corresponding to the track data, and then the similarity between the track data may be determined based on the distance. Alternatively, Figure 3 As shown (described in detail below), the similarity between the trajectory data is calculated by using the site visit feature and the site transfer feature respectively, and then the similarities calculated separately are integrated to obtain the overall similarity.
[0046] In S240 , based on the similarities between the plurality of trajectory data, trajectory data belonging to the same travel object is searched.
[0047] In some optional embodiments, after calculating the similarities between the plurality of trajectory data, trajectory data with higher similarity may be found according to the calculated similarities, and then the trajectory data with higher similarity may be used as trajectory data of the same travel object.
[0048] Since the technical solution of the embodiment of the present application combines the site visit characteristics and site transfer characteristics of the travel object to perform identification and processing of trajectory data, the identification accuracy of the trajectory data can be improved.
[0049] In some optional embodiments, Figure 2 In S230 shown in FIG. 1 , the process of calculating the similarity between the plurality of trajectory data according to the site visit feature and the site transfer feature corresponding to each trajectory data may be as follows: Figure 3 As shown, including S310 to S330, the details are as follows:
[0050] In S310 , a first similarity between the plurality of trajectory data is calculated according to a site visit feature corresponding to each trajectory data.
[0051] In some optional embodiments, if the site visit feature includes the site visit probability distribution corresponding to each trajectory data, then when calculating the first similarity between the trajectory data, for any two trajectory data, the relative entropy between the site visit probability distributions corresponding to the two trajectory data can be calculated, and then the relative entropy between the site visit probability distributions corresponding to the two trajectory data can be used as the first similarity between the two trajectory data.
[0052] It should be noted that any two trajectory data refer to two trajectory data whose similarity needs to be calculated among multiple trajectory data. Optionally, when calculating the relative entropy between the site visit probability distributions corresponding to the two trajectory data, the average distribution of the site visit probability distributions corresponding to the two trajectory data can be calculated based on the site visit probability distributions corresponding to the two trajectory data, and then the first relative entropy between the site visit probability distribution corresponding to the first trajectory data in the two trajectory data and the average distribution is calculated, and the second relative entropy between the site visit probability distribution corresponding to the second trajectory data in the two trajectory data and the average distribution is calculated, and then the relative entropy between the site visit probability distributions corresponding to the two trajectory data is generated based on the sum of the first relative entropy and the second relative entropy. The technical solution of this embodiment makes it possible to obtain a more accurate relative entropy through the average distribution of the site visit probability distributions corresponding to the two trajectory data, so as to more accurately measure the similarity between the two trajectory data.
[0053] In S320, a second similarity between the plurality of trajectory data is calculated according to the site transfer feature corresponding to each trajectory data.
[0054] In some optional embodiments, if the site access feature includes a site transfer probability matrix corresponding to each trajectory data, then when calculating the second similarity between the trajectory data, for each site transfer situation included in the first trajectory data of any two trajectory data, the corresponding transfer probability can be searched in the site transfer probability matrix corresponding to the second trajectory data of the two trajectory data to obtain the matching probability of each site transfer situation in the first trajectory data; then the product of the matching probabilities of the site transfer situations included in the first trajectory data is calculated, and then the second similarity between the first trajectory data and the second trajectory data is calculated according to the product of the matching probabilities of the site transfer situations included in the first trajectory data. For example, the product of the matching probabilities of the site transfer situations included in the first trajectory data can be logarithmically operated to obtain the second similarity between the first trajectory data and the second trajectory data.
[0055] In some optional embodiments, the site transfer situations included in the first trajectory data may not all be found in the site transfer probability matrix corresponding to the second trajectory data. In this case, for the target site transfer situation included in the first trajectory data and whose corresponding transfer probability is 0 is found in the site transfer probability matrix corresponding to the second trajectory data, the matching probability of the target site transfer situation may be set to a non-zero setting value, so as to avoid the entire product being zero due to setting its matching probability to zero during the product operation. Optionally, the non-zero setting value may be a smaller value, such as 10. -5 .
[0056] It should be noted that Figure 3 The execution order between S310 and S320 shown in FIG. 1 is not limited, that is, the execution order can be as follows: Figure 3 As shown in FIG. 1 , S310 is executed first, and then S320 is executed; S320 may be executed first, and then S310; S310 and S320 may also be executed simultaneously.
[0057] In S330 , similarities between the plurality of trajectory data are determined according to the first similarity and the second similarity.
[0058] In some optional embodiments, the first similarity and the second similarity may be combined to determine the similarity between the trajectory data. For example, for a specified trajectory data among the plurality of trajectory data, a first number of trajectory data may be selected in descending order according to the first similarity, and a second number of trajectory data may be selected in descending order according to the second similarity, and then similarity weights are assigned to the first number of trajectory data according to the first similarity, and similarity weights are assigned to the second number of trajectory data according to the second similarity; and then, the similarity weights of the first number of trajectory data and the similarity weights of the second number of trajectory data are combined to obtain the similarity between the specified trajectory data and each of the selected trajectory data.
[0059] It should be noted that the designated trajectory data can be any trajectory data among the multiple trajectory data, that is, the trajectory data that needs to calculate the similarity can be used as the designated trajectory data. When assigning similarity weights, the assigned similarity weights are positively correlated with the first similarity and the second similarity, that is, the greater the first similarity, the greater the assigned similarity weight; similarly, the greater the second similarity, the greater the assigned similarity weight.
[0060] In some optional embodiments, if there are a large number of trajectory data, the amount of calculation will be very huge when calculating the similarity between the trajectory data. In order to reduce the amount of calculation when calculating the similarity, the trajectory data that need to calculate the similarity can be filtered. For example, a predetermined number of sites in each trajectory data can be obtained in descending order of the number of site visits as the frequently visited sites corresponding to each trajectory data. If there is no overlap in the frequently visited sites corresponding to two trajectory data, it means that the two trajectory data are most likely not similar, and then the similarity of the two trajectory data can be directly determined as a preset value (such as 0), without calculating the similarity between the two trajectory data. On the contrary, if there is an overlap in the frequently visited sites corresponding to the two trajectory data, it means that the two trajectory data may be similar, and then the similarity between the two trajectory data can be calculated based on the site visit features and site transfer features corresponding to the two trajectory data.
[0061] In some optional embodiments, the multiple trajectory data obtained may include a first trajectory data set and a second trajectory data set, such as taking the trajectory data before a certain time point as the first trajectory data set and the trajectory data after the time point as the second trajectory data set in chronological order. In this case, when calculating the similarity between the trajectory data, the similarity between the trajectory data in the first trajectory data set and the trajectory data in the second trajectory data set may be calculated. Then, when searching for trajectory data belonging to the same travel object, based on the similarity between the trajectory data in the first trajectory data set and the trajectory data in the second trajectory data set, the trajectory data belonging to the same travel object as the trajectory data in the second trajectory data set may be searched in the first trajectory data set.
[0062] Optionally, in the first trajectory data set, the process of searching for trajectory data belonging to the same travel object as the trajectory data in the second trajectory data set may be: using the trajectory data in the first trajectory data set as the first vertex set, the trajectory data in the second trajectory data set as the second vertex set, and using the similarity between the trajectory data in the first trajectory data set and the trajectory data in the second trajectory data set as the vertex connection between the first vertex set and the second vertex set to construct a bipartite graph; and then, when the bipartite graph achieves optimal matching, determining the trajectory data belonging to the same travel object in the first trajectory data set and the second trajectory data set according to the vertex connection of the bipartite graph.
[0063] The technical solution of the above embodiment of the present application enables the identification and processing of trajectory data by combining the site visit characteristics and site transfer characteristics of the travel object, thereby improving the identification accuracy of the trajectory data. The following takes the site as a subway station as an example to elaborate on the implementation details of the technical solution of the embodiment of the present application:
[0064] In an application scenario of the present application, due to the need to protect the privacy of travel object data, subway travel trajectories can usually only be stored and processed anonymously, which means that it becomes very difficult to link the trajectories of the same travel object in time and space. Therefore, how to match travel trajectory data of different time periods in subway data under the premise of protecting the privacy of travel objects has become an important research direction. This application is based on data mining technology and statistical models, aiming to match trajectory data of different time periods and build a complete travel chain, so as to provide important data support for transportation planning, service optimization, intelligent scheduling and other fields, and can also provide valuable research resources for trajectory data mining, trajectory prediction and other fields.
[0065] When matching travel trajectories in different time periods in subway data, the overall framework in the embodiment of the present application is as follows: Figure 4 As shown. First, before trajectory matching, the acquired raw trajectory data can be preprocessed to extract the travel trajectory data of each travel object, and sort them in chronological order to generate a complete station sequence. Next, based on the travel trajectory data extracted in the previous step, the detailed features of the travel mode contained in the travel trajectory data are mined to further refine the analysis. Then, based on the extracted travel mode, the similarity between the trajectory data of different time periods is calculated. Finally, the similarity results are matched to realize the link between the travel trajectories of different time periods before and after, and complete the matching process of the travel objects. The following is a detailed description of each step.
[0066] In one embodiment of the present application, in the data preprocessing stage, since the subway automatic ticketing system calculates the fare by recording the entry and exit information of each travel object, the subway smart card data contains a large amount of track information, which includes the ID (i.e., card number) of the subway smart card, entry and exit information, entry and exit time information, etc. At the same time, the subway smart card data includes data of multiple different types of cards and tickets, mainly divided into ordinary transportation card data and single-trip ticket data. Single-trip ticket data is usually sold through automatic ticket machines and can only be used once, that is, the travel object swipes the card on the gate before entering the station and returns the card when leaving the station. Therefore, there is only one travel record in each single-trip ticket data, and it is impossible to identify the travel mode. Therefore, all single-trip ticket data can be deleted from the acquired raw data in the data preprocessing stage. For ordinary transportation card data, since the ID of each transportation card is fixed and the travel record is complete, the time and place of each entry and exit can be extracted, so as to determine the travel mode corresponding to these track data. An example of subway smart card data is shown in Table 1:
[0067]
[0068]
[0069] Table 1
[0070] As shown in Table 1, the subway smart card data may include the card number, the station where you enter the station, the station where you leave the station, the time you enter the station, and the time you leave the station. In order to facilitate subsequent calculations, each station can be associated with a unique number. id The visited sites can be i (S i represents the i-th site visited), and the timestamp corresponding to each site is represented by t i (t i In this way, the travel object U can be extracted from the subway smart card data in the historical records. id The sequence of sites visited in order of timestamps TR id :
[0071] TR id ={S1,S2,S3,…,S k}
[0072] Among them, k represents the travel object U id The total number of visits to the site, S k Indicates the site number.
[0073] In one embodiment of the present application, subway smart card data of the past three months (time is only an example) can be obtained and divided into two parts, with the subway data of the first one and a half months as the training set H and the rest as the test set R. The training set is regarded as a historical public anonymous smart card data set, and the test set represents a smart card data set of different time periods obtained by other means, then the training set H and the test set R can be expressed as:
[0074]
[0075]
[0076] In one embodiment of the present application, in the travel mode extraction stage, travel features can be extracted from anonymous historical subway card swiping data (i.e., smart card data), and these travel features can describe the travel mode of the travel object. Moreover, the travel mode of each travel object is unique and has certain regularity, and will not change significantly over a period of time, such as Figure 5 As shown in Figure 3, the visited sites and the transfers between sites of a randomly selected travel object at different times before and after are highly similar, and the lines between sites represent the transfer relationships between sites.
[0077] In some optional embodiments, the extraction of travel patterns is divided into two parts. In the first part, a probability distribution needs to be associated with each travel object in the training set and the test set, and used as the site visit feature of the travel object. In the second part, the transition probability matrix of the travel object can be extracted according to the Markov model as the site transition feature.
[0078] Specifically, the probability distribution of each travel object visiting different subway stations can be obtained through data statistics. To simplify the model, the travel frequency is regarded as probability. If the total number of stations is m, the probability distribution of different travel objects visiting all stations is expressed as: π id ={p1,p2,p3,…,p m}, p i Indicates the travel object U id Visit Site S i The probability of is defined as:
[0079]
[0080] Among them, Count(S i ) represents the travel object U id Visit site S in the trajectory data i The number of times; Indicates the travel object U id The number of visits to all sites in the trajectory data.
[0081] When extracting the state transition probability matrix of the travel object between different stations through the Markov model, the stations visited by the travel object are first sorted in chronological order. For the travel object, "entering the station → exiting the station" is a purposeful trip, which can better reflect the travel preference of the travel object. Therefore, the travel object U can be constructed by the following formula: id Traveling Markov Chain
[0082]
[0083] Among them, the Markov chain The states in are the stations visited by the travel object, and k is the total number of stations visited in the trajectory data. i,j Indicates that from site S i Transfer to site S j The probability of , and 0≤p i,j ≤1, and the travel object starts from station S i The sum of the probabilities of transferring to all other possible stations is 1, so for each travel object, an m*m transfer probability matrix can be obtained (m represents the total number of stations), where the value of the element in the i-th row and j-th column is expressed by the following formula:
[0084] P i,j =β i→j / β i
[0085] Among them, β i→j Indicates the travel object U id From the trajectory data of site S i Move to site S j The frequency of i Indicates the travel object U id From the trajectory data of site S i The frequency of moving to other stations. It should be noted that the transition probability matrix is obtained by analyzing the training set H, which is used to predict the frequency of a travel object moving from station S. i Transfer to site S j probability.
[0086] In one embodiment of the present application, in the similarity calculation stage, two methods can be used to measure the similarity of the site visit characteristics and the similarity of the site transfer characteristics of the travel objects respectively based on the travel patterns extracted in the above embodiments.
[0087] Specifically, the similarity of site visit features can be measured based on KL (Kullback-Leibler)-divergence (also known as relative entropy). KL-divergence is regarded as the distance between different probability distributions. From a statistical point of view, KL-divergence can be used to measure the degree of difference between two distributions. The smaller the difference between the two, the smaller the KL-divergence, and vice versa. When the two distributions are consistent, the KL-divergence of the two distributions is 0. The KL-divergence function is expressed as:
[0088]
[0089] in, and They represent the probability distribution of travel object i in the training set H and travel object j in the test set R. Strictly speaking, KL-divergence cannot be regarded as a distance because it is asymmetric. It represents the information difference of approximating one distribution to another distribution, so it can be expressed by the following formula: and Similarity Sim_KL based on KL-divergence:
[0090]
[0091] When measuring the similarity of station transfer features, we can use the state transition probability matrix (TP O→D ) to match the travel Markov chain of the travel objects in the test set R Specifically, for a trajectory data in the test set R (specifically represented by a station sequence), each station transfer process δ contained therein can be obtained from the transition probability matrix (TP O→D ) to find the corresponding transition probability, and record the found transition probability as p δ Then, by multiplying these transition probabilities found, we can calculate the transition probability matrix (TP O →D ), the probability of occurrence of this trajectory data in the test set R It is expressed by the following formula:
[0092]
[0093] Among them, k represents the total number of sites visited in the trajectory data; k / 2 means that k / 2 site transfer processes occurred in the trajectory data.
[0094] In the process of calculating similarity, it is possible to encounter a transition probability of 0. This happens when the state transition process of the travel object in the test set R is not in the trajectory data of the training set H. In order to avoid the overall similarity becoming 0 due to this reason, a very small probability, such as 10, can be used in the transition probability matrix. -5 , to replace the probability 0; or you can also replace the probability 0 with a very small probability when calculating the product. Since the transition probability is between 0 and 1, as the number of times the travel object visits the station increases, the similarity decreases exponentially. Therefore, the similarity Sim_ST of the station transfer feature can be expressed by the following logarithmic operation process:
[0095]
[0096] In one embodiment of the application, in the travel object matching stage, the similarity of the site visit features and the similarity of the site transfer features calculated in the above embodiment can be used. Specifically, for each trajectory data to be matched in the test set R, two different candidate sets can be obtained in the training set H based on the above two similarities, and different features (i.e., site visit features and site transfer features) can produce different but complementary matching results. In order to combine the above two characteristics, a weighted voting de-anonymizer is used in the embodiment of the present application to vote on the candidate set of each trajectory data in the test set R. Finally, the bipartite graph matching method is further used to match according to the votes obtained from different trajectory data in the candidate set.
[0097] Optionally, the specific processing method of the deanonymizer can be: the two candidate sets obtained are taken as input by the deanonymizer, and voted according to the similarity ranking. Assuming that the trajectory data with the top l similarity rankings are selected as the candidate set, the first one will get l votes, and the second one will get l-1 votes, and so on. Finally, the votes obtained by the same trajectory data in different candidate sets are added together to obtain the total votes of the trajectory data. Optionally, the top 5 trajectory data can be selected as the candidate set and input into the deanonymizer, that is, the value of l can be 5, of course, it can also be other values.
[0098] It should be noted that when extracting candidate sets of each similarity, we first need to calculate the similarity between all trajectory data in the test set R and the training set H. If the number of trajectories is n, O(n 2 ), and a large amount of calculated similarities will be wasted. Therefore, a filtering condition can be set in the example of the present application, that is, the three most frequently visited sites in the two trajectory data are extracted respectively (the number of sites is only an example, it can also be other numbers). If there is an intersection between the extracted sites, the subsequent process of calculating the similarity is performed; if there is no intersection between the extracted sites, it means that the two trajectory data are most likely not similar, and then there is no need to calculate the similarity. In this way, a large amount of trajectory data that cannot be matched successfully can be screened out before calculating the similarity. When the number of processed trajectory data increases to millions, the filtering conditions set in the embodiment of the present application can greatly reduce the amount of calculation.
[0099] The weighted voting de-anonymizer can output the number of votes between two trajectory data, and the number of votes represents the similarity. Based on this, the embodiment of the present application can adopt the idea of overall optimization and use the bipartite graph matching method to match all trajectory data at the same time. Figure 6 As shown in Figure 1, given a bipartite graph G = (V, E), where the vertex V is composed of trajectory data in the training set H and the test set R respectively. The training set H and the test set R are trajectory data of two time periods respectively, so they are independent of each other. ij The two vertices connected and belong to two different sets ( Belongs to the set corresponding to the training set H, Belongs to the set corresponding to the test set R), then a weight W can be associated with each edge ij , and the weight W ij Set to and If both the training set H and the test set R contain n trajectory data, then n 2 edges, and the bipartite graph has n! different permutations and combinations of matching results.
[0100] The optimal matching of a bipartite graph is also called the maximum weight matching, and its goal is to find a maximum matching (that is, there is a matching for each vertex) to maximize the sum of votes between the overall vertices. Therefore, the process of simultaneously matching all trajectory data in the training set H and the test set R is the process of finding the maximum weight matching. After finding the maximum weight matching, a matching trajectory data can be found in the training set H for each trajectory data in the test set R, and these two trajectory data belong to the trajectory data of the same travel object.
[0101] In the technical solution of the above embodiment of the present application, the site visit features and site transfer features of the travel object are extracted respectively through KL-divergence and Markov model, and the weighted voting de-anonymizer can effectively combine the similarity results based on the two features, and reflect the total similarity between the trajectory data through the number of votes. In order to measure the effectiveness of this technology on the subway smart card data set, 10 groups of travel objects were randomly selected for experiments in the embodiment of the present application, each group containing 10,000 travel objects, and the matching accuracy of the single method and the combined method were calculated respectively. The comparison results are shown in Figure 2. Figure 7 As shown, compared with using only a single method (i.e., the scheme using only Sim_KL or only Sim_ST), the scheme combining the two features through the weighted voting deanonymizer (i.e., the scheme using both Sim_KL and Sim_ST) significantly improves the matching accuracy.
[0102] The following describes an apparatus embodiment of the present application, which can be used to execute the trajectory data processing method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the embodiment of the trajectory data processing method in the above-mentioned embodiment of the present application.
[0103] Figure 8 A block diagram of a trajectory data processing device according to an embodiment of the present application is shown, and the trajectory data processing device can be applied to a server.
[0104] Reference Figure 8 As shown, a trajectory data processing device 800 according to an embodiment of the present application includes: an acquisition unit 802 , an extraction unit 804 , a calculation unit 806 and a processing unit 808 .
[0105] Among them, the acquisition unit 802 is configured to acquire multiple trajectory data, each trajectory data contains a sequence of sites visited by the travel object in chronological order; the extraction unit 804 is configured to extract the site visit features and site transfer features corresponding to each trajectory data according to the multiple trajectory data; the calculation unit 806 is configured to calculate the similarity between the multiple trajectory data according to the site visit features and site transfer features corresponding to each trajectory data; the processing unit 808 is configured to search for trajectory data belonging to the same travel object according to the similarity between the multiple trajectory data.
[0106] In some embodiments of the present application, based on the aforementioned scheme, the extraction unit 804 is configured to: calculate the visit probability of the travel object associated with each piece of trajectory data to each site according to the each site contained in the each piece of trajectory data and the visit status of the each site; generate the site visit probability distribution corresponding to each piece of trajectory data according to the visit probability of the travel object to the each site, and use the site visit probability distribution as the site visit feature.
[0107] In some embodiments of the present application, based on the aforementioned scheme, the extraction unit 804 calculates the visit probability of the travel object associated with each piece of trajectory data to each site according to each site contained in each piece of trajectory data and the visit status of each site, including: calculating the visit frequency of the travel object associated with each piece of trajectory data to each site according to each site contained in each piece of trajectory data and the visit status of each site; and using the visit frequency of the travel object to each site as the visit probability of the travel object to each site.
[0108] In some embodiments of the present application, based on the aforementioned scheme, the extraction unit 804 is configured to: calculate the transfer probability of each station to other stations according to the transfer conditions between each station contained in each trajectory data; generate a station transfer probability matrix corresponding to each trajectory data according to the transfer probability of each station to other stations, and use the station transfer probability matrix as the station transfer feature.
[0109] In some embodiments of the present application, based on the aforementioned scheme, the process in which the extraction unit 804 calculates the transition probability of each station to other stations according to each station included in each piece of trajectory data and the transition situation between each station includes: counting the transition frequency from the i-th station to the j-th station in each piece of trajectory data, and the transition frequency from the i-th station to other stations; and calculating the transition probability from the i-th station to the j-th station according to the transition frequency from the i-th station to the j-th station and the transition frequency from the i-th station to other stations.
[0110] In some embodiments of the present application, based on the aforementioned scheme, the calculation unit 806 is configured to: calculate a first similarity between the multiple trajectory data according to the site visit characteristics corresponding to each trajectory data; calculate a second similarity between the multiple trajectory data according to the site transfer characteristics corresponding to each trajectory data; and determine the similarity between the multiple trajectory data according to the first similarity and the second similarity.
[0111] In some embodiments of the present application, based on the aforementioned scheme, the site visit feature includes the site visit probability distribution corresponding to each trajectory data; the calculation unit 806 calculates the first similarity between the multiple trajectory data according to the site visit feature corresponding to each trajectory data, including: for any two trajectory data, calculating the relative entropy between the site visit probability distributions corresponding to the two trajectory data respectively; using the relative entropy between the site visit probability distributions corresponding to the two trajectory data respectively as the first similarity between the two trajectory data.
[0112] In some embodiments of the present application, based on the aforementioned scheme, the process in which the calculation unit 806 calculates the relative entropy between the site visit probability distributions respectively corresponding to the two trajectory data includes: calculating the average distribution of the site visit probability distributions respectively corresponding to the two trajectory data according to the site visit probability distributions respectively corresponding to the two trajectory data; calculating the first relative entropy between the site visit probability distribution corresponding to the first trajectory data of the two trajectory data and the average distribution, and calculating the second relative entropy between the site visit probability distribution corresponding to the second trajectory data of the two trajectory data and the average distribution; generating the relative entropy between the site visit probability distributions respectively corresponding to the two trajectory data according to the sum of the first relative entropy and the second relative entropy.
[0113] In some embodiments of the present application, based on the aforementioned solution, the site access feature includes a site transfer probability matrix corresponding to each of the trajectory data; the process in which the calculation unit 806 calculates the second similarity between the plurality of trajectory data according to the site transfer feature corresponding to each of the trajectory data includes: for each site transfer situation included in the first trajectory data of any two trajectory data, searching for the corresponding transfer probability in the site transfer probability matrix corresponding to the second trajectory data of the two trajectory data to obtain a matching probability of each site transfer situation in the first trajectory data; calculating the product of the matching probabilities of the site transfer situations included in the first trajectory data; and calculating the second similarity between the first trajectory data and the second trajectory data according to the product of the matching probabilities of the site transfer situations included in the first trajectory data.
[0114] In some embodiments of the present application, based on the aforementioned scheme, the calculation unit 806 is further configured to: for the target site transfer situation included in the first trajectory data, if the corresponding transfer probability is found to be 0 in the site transfer probability matrix corresponding to the second trajectory data, then the matching probability of the target site transfer situation is set to a non-zero set value.
[0115] In some embodiments of the present application, based on the aforementioned scheme, the process in which the calculation unit 806 determines the similarity between the plurality of trajectory data according to the first similarity and the second similarity includes: for designated trajectory data among the plurality of trajectory data, selecting a first number of trajectory data in descending order according to the first similarity, and selecting a second number of trajectory data in descending order according to the second similarity; assigning similarity weights to the first number of trajectory data according to the first similarity, and assigning similarity weights to the second number of trajectory data according to the second similarity; and combining the similarity weights of the first number of trajectory data and the similarity weights of the second number of trajectory data to obtain the similarity between the designated trajectory data and each of the selected trajectory data.
[0116] In some embodiments of the present application, based on the aforementioned scheme, the calculation unit 806 is configured to: obtain a predetermined number of sites in each trajectory data as the frequently visited sites corresponding to each trajectory data in descending order of the number of site visits; if there is no overlap in the frequently visited sites corresponding to two trajectory data, determine that the similarity of the two trajectory data is a preset value; if there is overlap in the frequently visited sites corresponding to the two trajectory data, calculate the similarity between the two trajectory data according to the site access features and the site transfer features respectively corresponding to the two trajectory data.
[0117] In some embodiments of the present application, based on the aforementioned scheme, the multiple trajectory data include a first trajectory data set and a second trajectory data set; the calculation unit 806 is configured to: calculate the similarity between the trajectory data in the first trajectory data set and the trajectory data in the second trajectory data set according to the site visit characteristics and the site transfer characteristics corresponding to each trajectory data; the processing unit 808 is configured to: according to the similarity between the trajectory data in the first trajectory data set and the trajectory data in the second trajectory data set, search in the first trajectory data set for trajectory data belonging to the same travel object as the trajectory data in the second trajectory data set.
[0118] In some embodiments of the present application, based on the aforementioned scheme, the processing unit 808 is configured to: construct a bipartite graph using the trajectory data of the first trajectory data set as the first vertex set, the trajectory data in the second trajectory data set as the second vertex set, and the similarity between the trajectory data in the first trajectory data set and the trajectory data in the second trajectory data set as the vertex connection between the first vertex set and the second vertex set; when the bipartite graph achieves optimal matching, determine the trajectory data in the first trajectory data set and the second trajectory data set belonging to the same travel object according to the vertex connection of the bipartite graph.
[0119] Fig. 9 A schematic diagram of the structure of a computer system of an electronic device suitable for implementing an embodiment of the present application is shown, and the electronic device may be the server in the aforementioned embodiment.
[0120] It should be noted that Fig. 9 The computer system 900 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0121] like Fig. 9 As shown, the computer system 900 may include a central processing unit (CPU) 901, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 902 or the program loaded from the storage part 908 to the random access memory (RAM) 903, such as executing the method described in the above embodiment. In the RAM 903, various programs and data required for system operation are also stored. The CPU 901, ROM 902 and RAM 903 are connected to each other through a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0122] The following components can be connected to the I / O interface 905: an input section 906 including a keyboard, a mouse, etc.; an output section 907 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker; a storage section 908 including a hard disk, etc.; and a communication section 909 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 909 performs communication processing via a network such as the Internet. A drive 910 is also connected to the I / O interface 905 as needed. A removable medium 911, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 910 as needed so that a computer program read therefrom is installed into the storage section 908 as needed.
[0123] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program is used to perform the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 909, and / or installed from a removable medium 911. When the computer program is executed by a central processing unit (CPU) 901, various functions defined in the system of the present application are executed.
[0124] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a computer program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable computer program is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0125] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and a computer program.
[0126] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0127] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more computer programs, and when the above one or more computer programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.
[0128] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0129] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable an electronic device to execute the method according to the implementation methods of the present application.
[0130] For example, the electronic device can be a server, and the server can execute Figure 2 The processing method of trajectory data is shown.
[0131] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0132] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for processing trajectory data, characterized in that: include: Acquire multiple trajectory data, each trajectory data includes a sequence of sites visited by the travel object in chronological order; Extracting, according to the plurality of trajectory data, site visit features and site transfer features corresponding to each of the trajectory data; Calculating similarities between the plurality of trajectory data according to the site visit features and the site transfer features corresponding to the respective trajectory data; According to the similarities between the multiple trajectory data, the trajectory data belonging to the same travel object are searched.
2. The method for processing trajectory data according to claim 1, characterized in that: Extracting, according to the plurality of trajectory data, site visit features and site transfer features corresponding to each of the trajectory data, including: Calculate the visit probability of the travel object associated with each piece of trajectory data to each site according to each site included in each piece of trajectory data and the visit status of each site; According to the visit probability of the travel object to each of the sites, a site visit probability distribution corresponding to each of the trajectory data is generated, and the site visit probability distribution is used as the site visit feature.
3. The method for processing trajectory data according to claim 2, characterized in that: Calculating the visit probability of the travel object associated with each piece of trajectory data to each piece of trajectory data according to each site included in each piece of trajectory data and the visit status of each site, including: Calculate the visit frequency of each site to each site by the travel object associated with each track data according to each site included in each track data and the visit status of each site; The visit frequency of the travel object to the respective sites is used as the visit probability of the travel object to the respective sites.
4. The method for processing trajectory data according to claim 1, characterized in that: Extracting, according to the plurality of trajectory data, site visit features and site transfer features corresponding to each of the trajectory data, including: Calculate the transfer probability of each station to other stations according to each station included in each track data and the transfer status between the stations; According to the transfer probability from each station to other stations, a station transfer probability matrix corresponding to each trajectory data is generated, and the station transfer probability matrix is used as the station transfer feature.
5. The method for processing trajectory data according to claim 4, characterized in that: According to each station included in each track data and the transfer situation between each station, the transfer probability of each station to other stations is calculated, including: According to each station included in each track data and the transfer between each station, counting the transfer frequency from the i-th station to the j-th station in each track data, and the transfer frequency from the i-th station to other stations; The probability of a transition from the i-th site to the j-th site is calculated according to the frequency of transition from the i-th site to the j-th site and the frequency of transition from the i-th site to other sites.
6. The method for processing trajectory data according to claim 1, characterized in that: Calculating similarities between the plurality of trajectory data according to the site visit features and the site transfer features corresponding to the respective trajectory data includes: Calculating a first similarity between the plurality of trajectory data according to a site visit feature corresponding to each of the trajectory data; Calculating a second similarity between the plurality of trajectory data according to a site transfer feature corresponding to each of the trajectory data; The similarities between the plurality of trajectory data are determined according to the first similarity and the second similarity.
7. The method for processing trajectory data according to claim 6, characterized in that: The site visit feature includes a site visit probability distribution corresponding to each track data; Calculating a first similarity between the plurality of trajectory data according to a site visit feature corresponding to each of the trajectory data includes: For any two trajectory data, calculate the relative entropy between the site visit probability distributions corresponding to the two trajectory data respectively; The relative entropy between the site visit probability distributions respectively corresponding to the two trajectory data is used as the first similarity between the two trajectory data.
8. The method for processing trajectory data according to claim 7, characterized in that: Calculating the relative entropy between the site visit probability distributions respectively corresponding to the two trajectory data includes: According to the site visit probability distributions respectively corresponding to the two trajectory data, calculating the average distribution of the site visit probability distributions respectively corresponding to the two trajectory data; Calculating a first relative entropy between a site visit probability distribution corresponding to a first trajectory data of the two trajectory data and the average distribution, and calculating a second relative entropy between a site visit probability distribution corresponding to a second trajectory data of the two trajectory data and the average distribution; The relative entropy between the site visit probability distributions respectively corresponding to the two trajectory data is generated according to the sum of the first relative entropy and the second relative entropy.
9. The method for processing trajectory data according to claim 6, characterized in that: The site visit feature includes a site transition probability matrix corresponding to each trajectory data; Calculating the second similarity between the plurality of trajectory data according to the site transfer feature corresponding to each of the trajectory data includes: For each site transfer situation included in the first trajectory data of any two trajectory data, the corresponding transfer probability is searched in the site transfer probability matrix corresponding to the second trajectory data of the two trajectory data to obtain the matching probability of each site transfer situation in the first trajectory data; Calculating the product of the matching probabilities of the site transfer situations included in the first trajectory data; The second similarity between the first trajectory data and the second trajectory data is calculated according to the product of the matching probabilities of the site transfer situations included in the first trajectory data.
10. The method for processing trajectory data according to claim 6, characterized in that: Determining similarities between the plurality of trajectory data according to the first similarity and the second similarity includes: For designated trajectory data among the plurality of trajectory data, selecting a first number of trajectory data according to the first similarities in descending order, and selecting a second number of trajectory data according to the second similarities in descending order; assigning a similarity weight to the first number of trajectory data according to the first similarity, and assigning a similarity weight to the second number of trajectory data according to the second similarity; The similarity weights of the first number of trajectory data and the similarity weights of the second number of trajectory data are combined to obtain the similarity between the designated trajectory data and each selected trajectory data.
11. The method for processing trajectory data according to any one of claims 1 to 10, characterized in that: Calculating similarities between the plurality of trajectory data according to the site visit features and the site transfer features corresponding to the respective trajectory data includes: Acquire a predetermined number of sites in each track data as frequently visited sites corresponding to each track data in descending order of the number of site visits; If the frequently visited sites corresponding to the two trajectory data do not overlap, determining that the similarity of the two trajectory data is a preset value; If the frequently visited sites corresponding to the two trajectory data overlap, the similarity between the two trajectory data is calculated according to the site visit features and the site transfer features respectively corresponding to the two trajectory data.
12. A trajectory data processing device, characterized in that: include: An acquisition unit is configured to acquire a plurality of trajectory data, each trajectory data including a sequence of sites visited by the travel object in chronological order; an extraction unit configured to extract, according to the plurality of trajectory data, a site visit feature and a site transfer feature corresponding to each of the trajectory data; a calculation unit configured to calculate the similarity between the plurality of trajectory data according to the site visit characteristics and the site transfer characteristics corresponding to the respective trajectory data; The processing unit is configured to search for trajectory data belonging to the same travel object according to the similarities between the multiple trajectory data.
13. A computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the trajectory data processing method according to any one of claims 1 to 11 is implemented.
14. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more computer programs, which, when executed by the one or more processors, enables the electronic device to implement the trajectory data processing method described in any one of claims 1 to 11.