Resident Plot Classification Method, Device, Equipment and Storage Medium
By constructing a resident graph and using the graph characterization network model and node classification network model for self-supervised learning, the problem of insufficient labeled data is solved, and high-precision resident plot classification under a small amount of labeled data is achieved.
Patent Information
- Application Number
- CN202210323526.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-29
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2042-03-29
AI Technical Summary
In the prior art, the classification method of vehicle resident plots has the problem of insufficient label data leading to overfitting, and building a knowledge graph requires a large amount of data, and the classification effect is not good.
By constructing the residency graph of the target object, the characteristic data of nodes and directed connection lines are extracted, and the pre-trained graph characterization network model and node classification network model are used for classification, and self-supervised learning is carried out in combination with local and global comparison relationship pairs to improve classification accuracy.
With a small amount of labeled data, the accuracy and accuracy of the classification of resident plots is improved, and the categories of different nodes can be effectively distinguished.
Smart Images

Figure CN114898139B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of machine learning, and in particular, to a method and apparatus, device, and storage medium for classifying dwelling plots. Background Art
[0002] Classifying the attributes of vehicle dwelling plots based on vehicle trajectories, such as the trajectory data of hazardous chemical transportation vehicles, and analyzing the categories of dwelling plots. The category labels include restaurants, auto repair shops, gas stations, chemical enterprises, etc. On the one hand, it is beneficial to the real-time monitoring of vehicle status, provides analysis support for abnormal behaviors, and ensures the safety management of hazardous chemicals; on the other hand, it enriches the plot portrait and provides support for scenarios such as recommendations.
[0003] Currently, the implementation methods for this scenario can be divided into the following two types: First, a supervised plot classification method, that is, constructing a plot sample set and classifying and learning the plots based on labeled data, including tree models, network models, etc.; Second, a method combining plot representation learning and classification, combining external information of the plot (such as relevant knowledge graphs) to enhance the plot portrait representation and then performing classification. However, for the first method, due to the small amount of labeled data in the actual scenario, this type of method is prone to overfitting and has poor classification effects; the second method requires a large amount of data for the construction and learning of the knowledge graph. Summary of the Invention
[0004] To solve the above technical problems or at least partially solve the above technical problems, embodiments of the present disclosure provide a method and apparatus, device, and storage medium for classifying dwelling plots.
[0005] In a first aspect, embodiments of the present disclosure provide a method for classifying dwelling plots, including the following steps:
[0006] Determine a target object dwelling graph according to the trajectory data of the target object. Among them, determine the dwelling plot as a node in the target object dwelling graph according to the dwelling location of the target object in the trajectory data, and determine the directed connection line between the nodes in the target object dwelling graph according to the trajectory of the target object between the nodes in the trajectory data;
[0007] Extract the feature data of each node and the directed connection line;
[0008] Input the feature data of each node and the directed connection line into a pre-trained graph representation network model and a node classification network model to obtain the category of the output node.
[0009] In a possible implementation manner, the determining the dwelling plot as a node in the target object dwelling graph according to the dwelling location of the target object includes:
[0010] Aggregate the residence locations in the trajectory data of multiple target objects within a preset distance range to obtain a residence plot, which serves as a node in the residence map of the target object.
[0011] In a possible implementation manner, before extracting the feature data of each node and directed connection line, the method further includes:
[0012] Remove the nodes in the residence map of the target object whose total connection frequency is lower than the preset frequency threshold;
[0013] Identify and remove the invalid directed connection lines in the residence map of the target object, where the invalid directed connection lines are used to form a loop through three nodes.
[0014] In a possible implementation manner, the feature data of each node includes at least one of the following: road network feature data, map point of interest feature data, and arrival time distribution data and stay duration distribution data of the target object. The feature data of each directed connection line includes at least one of the following: connection frequency and average usage time.
[0015] In a possible implementation manner, the graph representation network model is trained through the following steps:
[0016] Input the feature data of each node and directed connection line into a neural network model to represent the nodes and directed connection lines;
[0017] Use the loss function values of the local contrast relation pairs and the global contrast relation sequences determined according to the residence map of the target object to train the neural network model for representing the nodes and directed connection lines, and obtain the trained graph representation network model.
[0018] In a possible implementation manner, the local contrast relation pairs include negative sample pairs composed of adjacent nodes and positive sample pairs composed of first-order neighbor nodes of the same node;
[0019] The global contrast relation sequence includes negative sample pairs composed of node sequences with a preset order different from that of the node sequence and positive sample pairs composed of node sequences with the same preset order as the node sequence.
[0020] In a possible implementation manner, the loss function values of the local contrast relation pairs and the global contrast relation sequences are calculated through the following expressions:
[0021]
[0022]
[0023]
[0024]
[0025] Among them, is the loss function value of the local contrast relationship pair and the global contrast relationship sequence, is the loss value of the local contrast relationship pair, is the loss value of the global contrast relationship sequence, z i is the representation of the i-th node, represents the dot product of z i for where the dot product describes the distance between the two vectors of z i and is the representation of the i-th trajectory, represents for The dot product of, τ is a hyperparameter, and K is the total number of positive and negative samples of sample i.
[0026] In a possible implementation manner, the neural network model for representing nodes is a graph attention network model or a graph isomorphism network model.
[0027] In a possible implementation manner, the node classification network model is trained through the following steps:
[0028] Take each node representation output from the graph representation network model as the initial representation;
[0029] Based on the known labeled data of the nodes, train the node classification network model based on the supervised classification learning method and the initial representation.
[0030] In a second aspect, an embodiment of the present disclosure provides a dwelling plot classification device, including:
[0031] A determination module, which is used to determine the dwelling graph of the target object according to the trajectory data of the target object. Among them, the dwelling plot is determined as the node in the dwelling graph of the target object according to the dwelling location of the target object in the trajectory data, and the directed connection line between the nodes in the dwelling graph of the target object is determined according to the trajectory between the nodes of the target object in the trajectory data;
[0032] An extraction module, which is used to extract the feature data of each node and the directed connection line;
[0033] A classification module, which is used to input the feature data of each node and the directed connection line into the pre-trained graph representation network model and node classification network model to obtain the category of the output node.
[0034] In a third aspect, an embodiment of the present disclosure provides an electronic device, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus;
[0035] The memory is used to store a computer program;
[0036] The processor is configured to implement the above-mentioned method for classifying dwelling plots when executing the program stored in the memory.
[0037] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored. The computer program, when executed by a processor, implements the above-mentioned method for classifying dwelling plots.
[0038] The above technical solutions provided by the embodiments of the present disclosure have at least some or all of the following advantages compared with the prior art:
[0039] In the method for classifying dwelling plots according to the embodiments of the present disclosure, a dwelling plot graph of a target object is determined according to the trajectory data of the target object. Among them, the dwelling plot where the target object stays in the trajectory data is determined as a node in the dwelling plot graph of the target object, and a directed connection line between the nodes in the dwelling plot graph of the target object is determined according to the trajectory of the target object between the nodes in the trajectory data; the feature data of each node and the directed connection line is extracted; the feature data of each node and the directed connection line is input into a pre-trained graph representation network model and a node classification network model, and the category of the output node is obtained. By predicting the category of the node through the features of the nodes and the directed connection lines in the dwelling plot graph of the target object, it is possible to distinguish the categories of different nodes by combining time and space attributes, and improve the accuracy of node classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The accompanying drawings herein are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure.
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the accompanying drawings required for use in the description of the embodiments or related technologies. Obviously, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative efforts.
[0042] Figure 1 Schematically shows a flowchart of a method for classifying dwelling plots according to an embodiment of the present disclosure;
[0043] Figure 2 Schematically shows a flowchart of a method for classifying dwelling plots according to another embodiment of the present disclosure;
[0044] Figure 3 Schematically shows a specific flowchart of step S22 according to an embodiment of the present disclosure;
[0045] Figure 4 Schematically shows a flowchart of a method for classifying dwelling plots according to another embodiment of the present disclosure;
[0046] Figure 5 Schematically shows a specific flowchart of step S31 according to an embodiment of the present disclosure;
[0047] Figure 6 Schematically shows an architecture diagram of a dwelling plot classification device according to an embodiment of the present disclosure; and
[0048] Figure 7 Schematically shows a structural block diagram of an electronic device according to an embodiment of the present disclosure. Detailed implementation manners
[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are some, but not all, of the embodiments of the present disclosure. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present disclosure without creative efforts shall fall within the protection scope of the present disclosure.
[0050] Refer to Figure 1 , embodiments of the present disclosure provide a method for classifying dwelling plots, including the following steps:
[0051] S1. Determine a dwelling graph of a target object according to the trajectory data of the target object. Among them, determine the dwelling plots as the nodes in the dwelling graph of the target object according to the dwelling locations of the target object in the trajectory data, and determine the directed connection lines between the nodes in the dwelling graph of the target object according to the trajectories of the target object between the nodes;
[0052] In practical applications, the target object can be a movable entity such as a vehicle or a pedestrian. The determining the dwelling plots as the nodes in the dwelling graph of the target object according to the dwelling locations of the target object includes: aggregating the dwelling locations in the trajectory data of multiple target objects within a preset distance range to obtain dwelling plots as the nodes in the dwelling graph of the target object.
[0053] S2. Remove the nodes in the dwelling graph of the target object whose total connection frequency is lower than a preset frequency threshold;
[0054] S3. Identify and remove the invalid directed connection lines in the target object residence graph, where the invalid directed connection lines are used to form a loop through three nodes.
[0055] S4. Extract the feature data of each node and directed connection line;
[0056] In practical applications, the feature data of each node includes at least one of the following: road network feature data, map point of interest feature data, and the arrival time distribution data and stay duration distribution data of the target object. The feature data of each directed connection line includes at least one of the following: connection frequency and average usage time.
[0057] S5. Input the feature data of each node and directed connection line into a pre-trained graph representation network model and node classification network model to obtain the category of the output node.
[0058] In practical applications, input the feature data of each node and directed connection line into a pre-trained graph representation network model to obtain the node representation of each node and the trajectory representation of each directed connection line; input the node representation of each node and the trajectory representation of each directed connection line into the node classification network model to obtain the category of each node, such as a restaurant, gas station, etc.
[0059] See Figure 2 , in this embodiment, in step S5, the graph representation network model is trained through the following steps:
[0060] S21. Input the feature data of each node and directed connection line into a neural network model to represent the nodes and directed connection lines;
[0061] In practical applications, the neural network model used to represent the nodes is a graph attention network model or a graph isomorphism network model.
[0062] S22. Train the neural network model used to represent the nodes and directed connection lines according to the loss function value pairs of the local contrast relationship pair and the global contrast relationship sequence determined by the denoised target object residence graph to obtain the trained graph representation network model.
[0063] In practical applications, the local contrast relation pairs include negative sample pairs composed of adjacent nodes and positive sample pairs composed of first-order neighbor nodes of the same node; the global contrast relation sequence includes negative sample pairs composed of node sequences with a preset order different from that of the node sequence and positive sample pairs composed of node sequences with the same preset order as the node sequence. Specifically, considering the trajectory-based association relationship between nodes, two types of contrast learning tasks are designed: 1) Local contrast relation pairs. Based on the fact that "a vehicle will not continuously stay in two plots of the same category (for example, the probability that the next node of the 'restaurant' category is another category such as a gas station is greater than that of the same'restaurant' category)", local contrast relation pairs are constructed: the contrast relation between a node and its first-order neighbor nodes, that is, the first-order neighbor nodes are positive sample pairs, and the first-order neighbor nodes and their previous nodes form negative sample pairs; 2) Global contrast relation sequence. Based on the fact that "there is a certain order between nodes", randomly sample a node sequence and a node sequence with its order randomly changed to form negative sample pairs, and two node sequences of the same node form positive sample pairs. By training the graph representation network model with the losses of two contrast self-supervised learning tasks, after learning the node representations, based on the node-labeled data, further classification learning is carried out, and a large amount of unlabeled data can be mined and used with a small amount of labeled data.
[0064] In practical applications, the loss function values of the local contrast relation pairs and the global contrast relation sequence are calculated through the following expressions:
[0065]
[0066]
[0067]
[0068]
[0069] Among them, is the loss function value of the local contrast relation pairs and the global contrast relation sequence, is the loss value of the local contrast relation pairs, is the loss value of the global contrast relation sequence, z i is the i-th node representation, represents the dot product of z i with where the dot product describes the distance between the two vectors of z i and , is the i-th trajectory representation, represents with The dot product, τ is a hyperparameter, K is the total number of positive and negative samples of sample i, and the trajectory representation Use the Readout function Aggregate the node sequence
[0070] See Figure 3 , in this embodiment, in step S22, the loss function value pair of the local contrast relationship pair and the global contrast relationship sequence determined according to the target object residence map is used to train the neural network model for characterizing nodes and directed connection lines, including:
[0071] First, based on the local contrast relationship pair, obtain the local contrast loss for the node representation z Then, the node representation z passes through the Readout function to obtain the trajectory representation I, and based on the global contrast relationship sequence, obtain the global contrast relationship loss Then, weight and aggregate the two losses to obtain the target contrast loss as the loss function value
[0072] See Figure 4 , in this embodiment, in step S5, the node classification network model is trained through the following steps:
[0073] S41, use each node representation output from the graph representation network model as the initial representation
[0074] S42, based on the known labeled data of the nodes, train the node classification network model based on the supervised classification learning method and the initial representation
[0075] The residence plot classification method of this embodiment models the residence plot classification problem as a graph node classification problem, extracts multi-source heterogeneous data such as trajectories, road networks, POIs, etc. into node and directed connection line features, such as extracting trajectory features as node features (arrival, departure time, stay duration, etc.) and features of directed connection lines (connection frequency, average time used, etc.), and fuses and learns multi-source data through the graph representation learning method, which can improve the model performance and thus improve the accuracy of residence plot classification
[0076] The residence plot classification method of this embodiment is applicable to plot (area) scenarios with trajectory features (there is a time series relationship between plots), and has a relatively wide application in the real world, such as the classification of residence plots of dangerous goods vehicles, plot portraits based on pedestrian trajectories, etc
[0077] See Figure 5 , taking the target object being a vehicle as the application scenario, elaborate on the residence plot classification method of this embodiment:
[0078] 1) Perform feature processing on multi-source data to construct as Figure 5The network model diagram corresponding to "feature processing" includes nodes and directed edges. Among them, node features include POI (Point of Interest. In a geographic information system, a POI can be a house, a store, a mailbox, a bus stop, etc.) distribution, road network features, trajectory features such as arrival time period, departure time period, and stay duration. Edges include connection frequency, average time used, etc.;
[0079] In practical applications, trajectory feature data is obtained through the following steps: The association relationship between nodes is mainly obtained from trajectories. First, residence detection analysis is performed on the trajectories (staying at the same location for more than K hours) to obtain the residence points (latitude and longitude) of each vehicle. Then, the residence points with similar distances of different vehicles are aggregated to obtain residence plots (graph nodes). Each vehicle trajectory is statistically analyzed, and the sequentially visited plots are connected (edges). Among them, edge features include connection frequency, average time used, etc. Information such as arrival time and departure time in the trajectory data is extracted as node features and represented as a time period distribution. For example, if the arrival times of each vehicle at node i are 8:23, 9:10, 12:00, and 13:20 respectively, and the time period is divided into 3 segments (8:00 - 11:00, 11:00 - 13:00, 13:00 - 16:00), it is represented as (2, 1, 1), that is, there are 2 in the first time period, 1 in the second time period, and 1 in the third time period. Among them, the above statistical information will eliminate the stay duration information of each trajectory, extract the stay duration separately as a feature, perform bucketing processing on the stay durations of each node to obtain the stay duration distribution of each node. For example, the stay duration sequence (in minutes) at a certain node is 20, 30, 5, 45, 59. According to the maximum and minimum values, it is divided into 2 buckets, namely: 1 - 30, 31 - 60. Then the first bucket contains 20, 30, and 5, and the second bucket contains 45 and 59. So the stay duration distribution is (3, 2). Road network features such as the number of roads, road length, maximum number of lanes, and the distribution of the number of roads at different levels included in the nodes are used as node features. The top P POIs that are more concerned are extracted (such as shopping, transportation facilities, public toilets, medical treatment, etc.), and the POI distribution feature (2, 1, 1, 0) of each plot is constructed, that is, 2 shopping POIs, 1 transportation facility, 1 public toilet.
[0080] 2) Remove the influence of noise and filter out unimportant nodes in the graph (such as Figure 5 the dotted circles in the network model diagram corresponding to "data filtering"), loops formed within the second - order range (affecting the effect of local contrast learning tasks), etc.;
[0081] In practical applications, in order to improve the quality of nodes and edges in the graph, nodes with a total connection frequency lower than F are removed. Such nodes are considered to be nodes with accidental residence and contribute nothing to the overall graph. Remove the loops formed within the second - order range, and remove such asFigure 5 The dashed edge in the network model diagram corresponding to "data filtering". This edge is an invalid (roundabout) edge in the three-point structure.
[0082] 3) The main part of the model is to learn the graph representation network model (GIN (Graph Isomorphism Network Model) and GAT (Graph Attention Network Model) with directed edge features) through contrastive self-supervised learning tasks, including two tasks: local and global.
[0083] In practical applications, when the neural network model is a graph attention network model, the feature data of each node and the directed connection line are input into the neural network model through the following expression to represent the node and the directed connection line:
[0084]
[0085] Among them, is the feature value of the updated node, is the feature value of the node before update, α uv is the weight coefficient calculated by the attention mechanism, W is the weight coefficient of the module, e uv is the added edge feature.
[0086] When the neural network model is a graph isomorphism network model, the feature data of each node and the directed connection line are input into the neural network model through the following expression to represent the node and the directed connection line:
[0087]
[0088] Among them, is the feature value of the updated node, is the feature value of the node before update, e uv is the added edge feature.
[0089] It should be noted that the graph representation network model used in the method of this embodiment is inductive (in the inference stage, new subgraphs can be input for judgment, because the graph representation network model only requires the neighbor structure of the nodes and does not require the connection relationship of the entire graph). If it is changed to non-inductive, such as GCN, etc., a global structure input is required. At this time, the inference and training stages are carried out simultaneously, that is, a graph composed of all unlabeled nodes to be classified is input at one time. After the learning is completed, the class of the unlabeled nodes is directly judged.
[0090] Design of contrastive self-supervised local and global learning tasks:
[0091] Local contrast relationship pair construction: Based on the fact that "a vehicle will not continuously stay at two plots of the same category (for example, the probability that the next node of the 'dining hall' category is another category such as a gas station is greater than that of the same 'dining hall' category)", local contrast relationship pairs are constructed: the contrast relationship between a node and its 1-hop neighbors, that is, positive sample pairs are formed between 1-hop neighbor nodes, and negative sample pairs are formed between adjacent nodes. For example, Figure 5 In the network model diagram corresponding to the "local contrast learning task", two nodes in the wireframe form a positive sample pair, and a node in the wireframe and its adjacent node form a negative sample pair.
[0092] Global contrast relationship sequence construction. Based on the fact that "there is a certain order between nodes", for example, the node trajectories of different vehicles performing the same task are consistent. Therefore, a sequence (directed connection line) that is the same as the preset node trajectory sequence and the preset node trajectory sequence form a positive sample set, and a sequence that is different from the preset node trajectory sequence and the preset node trajectory sequence form a negative sample set, that is, a randomly sampled node sequence and a node sequence with its order randomly changed form a negative sample pair, and two node sequences passing through the same node (the red node sequences in the following figure) form a positive sample pair.
[0093] The loss function values of the local contrast relationship pairs and the global contrast relationship sequences are calculated through the following expressions:
[0094]
[0095]
[0096]
[0097]
[0098] Among them, is the loss function value of the local contrast relationship pairs and the global contrast relationship sequences, is the loss value of the local contrast relationship pairs, is the loss value of the global contrast relationship sequences, z i is the representation of the i-th node, represents the dot product of z i with where the dot product is to describe the distance between the two vectors of z i and Two vectors, is the representation of the i-th trajectory, represents the dot product of with τ is a hyperparameter, K is the total number of positive and negative samples of sample i, and the trajectory representation uses the Readout function to aggregate the node sequence.
[0099] Among them, self-supervised learning constructs label information through the dataset itself, enhances the existing small amount of supervised information, and aims to make full use of the large amount of unlabeled data existing in the actual scenario. It is a relatively popular research direction at present. It includes generative (learning through reconstruction loss, etc., which is used more in NLP), contrastive (constructing contrastive triples based on business knowledge or data augmentation, etc., and there is more research currently), prediction (designing auxiliary tasks, and constructing labeled training samples based on the characteristics of the known dataset itself for predictive learning), etc. Among them, the contrastive method performs relatively better in classification tasks.
[0100] 4) After the training of the graph representation network model is completed, the representation z of each node is obtained i , and then multi-classification is performed on it based on the node labeled data (using a double-hidden-layer MLP + softmax as the multi-classification network model).
[0101] See Figure 6 , an embodiment of the present disclosure provides a dwelling plot classification device, including:
[0102] A determination module 11, which is used to determine a target object dwelling map according to the trajectory data of the target object. Among them, the dwelling plot where the target object stays in the trajectory data is determined as a node in the target object dwelling map, and a directed connection line between the nodes in the target object dwelling map is determined according to the trajectory of the target object between the nodes in the trajectory data;
[0103] An extraction module 12, which is used to extract the feature data of each node and the directed connection line;
[0104] A classification module 13, which is used to input the feature data of each node and the directed connection line into a pre-trained graph representation network model and a node classification network model to obtain the category of the output node.
[0105] For the implementation process of the functions and roles of each unit in the above device, please refer to the implementation process of the corresponding steps in the above method for details, and will not be elaborated here.
[0106] For the device embodiment, since it basically corresponds to the method embodiment, please refer to the partial description of the method embodiment for relevant parts. The device embodiments described above are only illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network model units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of the present invention. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0107] Referring to Figure 7 As shown, the electronic device provided by the third exemplary embodiment of the present disclosure includes a processor 1110, a communication interface 1120, a memory 1130, and a communication bus 1140. Among them, the processor 1110, the communication interface 1120, and the memory 1130 complete mutual communication through the communication bus 1140;
[0108] The memory 1130 is used to store computer programs;
[0109] When the processor 1110 is used to execute the program stored on the memory 1130, the following resident plot classification method is implemented:
[0110] Determine the target object's residence map based on the trajectory data of the target object. Among them, determine the residence plot as the node in the target object's residence map according to the residence location of the target object in the trajectory data, and determine the directed connection line between the nodes in the target object's residence map according to the trajectory of the target object between the nodes in the trajectory data;
[0111] Extract the feature data of each node and the directed connection line;
[0112] Input the feature data of each node and the directed connection line into a pre-trained graph representation network model and a node classification network model to obtain the category of the output node.
[0113] The above-mentioned communication bus 1140 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is used in the figure to represent it, but it does not mean that there is only one bus or one type of bus.
[0114] The communication interface 1120 is used for communication between the above-mentioned electronic device and other devices.
[0115] The memory 1130 can include a Random Access Memory (RAM), or can also include a non-volatile memory, such as at least one disk memory. Optionally, the memory 1130 can also be at least one storage device located far from the aforementioned processor 1110.
[0116] The above-mentioned processor 1110 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0117] The fourth exemplary embodiment of the present disclosure further provides a computer-readable storage medium. A computer program is stored on the above-mentioned computer-readable storage medium, and when the computer program is executed by a processor, the above-mentioned method for classifying residential plots is implemented.
[0118] The computer-readable storage medium may be included in the device / apparatus described in the above embodiments; it may also exist alone without being assembled into the device / apparatus. The above-mentioned computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method for classifying residential plots according to the embodiments of the present disclosure is implemented.
[0119] According to the embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, and the program can be used by or combined with an instruction execution system, device, or device.
[0120] It should be noted that in this document, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, article or device comprising said element.
[0121] The above are only specific embodiments of the present disclosure, enabling those skilled in the art to understand or implement the present disclosure. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments shown herein, but rather should be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for classifying dwelling plots, characterized in that, It includes the following steps: Determine the target object's residence graph based on the trajectory data of the target object. Among them, determine the residence plot as the node in the target object's residence graph according to the residence location of the target object in the trajectory data, and determine the directed connection line between the nodes in the target object's residence graph according to the trajectory of the target object between the nodes in the trajectory data; Extract the feature data of each node and directed connection line; Input the feature data of each node and directed connection line into a pre-trained graph representation network model and node classification network model to obtain the category of the output node, Among them, the feature data of each node includes at least one of the following: road network feature data, map point of interest feature data, and the arrival time distribution data and stay duration distribution data of the target object; The feature data of each directed connection line includes at least one of the following: connection frequency and average time used.
2. The method according to claim 1, characterized in that The step of determining the residence plot as the node in the target object's residence graph according to the residence location of the target object includes: Aggregate the residence locations in the trajectory data of multiple target objects within a preset distance range to obtain a residence plot, which is used as the node in the target object's residence graph.
3. The method according to claim 1, characterized in that Before extracting the feature data of each node and directed connection line, the method further includes: Remove the nodes in the target object's residence graph whose total connection frequency is lower than the preset frequency threshold; Identify and remove the invalid directed connection lines in the target object's residence graph, where the invalid directed connection lines are used to form a loop through three nodes.
4. The method according to claim 1, wherein The graph representation network model is trained through the following steps: Input the feature data of each node and directed connection line into a neural network model to represent the nodes and directed connection lines; Use the loss function value pairs of the local contrast relationship pairs and global contrast relationship sequences determined according to the target object's residence graph to train the neural network model for representing the nodes and directed connection lines, and obtain the trained graph representation network model.
5. The method according to claim 4, characterized in that, The local contrast relationship pairs include negative sample pairs composed of adjacent nodes and positive sample pairs composed of first-order neighbor nodes of the same node; The global contrast relationship sequence includes negative sample pairs composed of node sequences with a preset order different from that of the node sequence and positive sample pairs composed of node sequences with the same preset order as the node sequence.
6. The method according to claim 4, characterized in that, The loss function values of the local contrast relationship pairs and global contrast relationship sequences are calculated through the following expressions: Among them, is the loss function value of the local contrast relationship pair and the global contrast relationship sequence, is the loss value of the local contrast relationship pair, is the loss value of the global contrast relationship sequence, z i is the representation of the i-th node, represents the dot product of z i for , where the dot product describes the distance between the two vectors of z i and , l i is the representation of the i-th trajectory, represents the dot product of l i for , τ is a hyperparameter, and K is the total number of positive and negative samples of sample i.
7. The method according to claim 4, wherein The neural network model for representing the nodes is a graph attention network model or a graph isomorphism network model.
8. The method according to claim 4, characterized in that, The node classification network model is trained through the following steps: Take each node representation output from the graph representation network model as the initial representation; Based on the known labeled data of the nodes, train the node classification network model based on the supervised classification learning method and the initial representation.
9. A dwelling plot classification device, characterized in that, It includes: A determination module, which is used to determine the target object's residence graph according to the trajectory data of the target object. Among them, determine the residence plot as the node in the target object's residence graph according to the residence location of the target object in the trajectory data, and determine the directed connection line between the nodes in the target object's residence graph according to the trajectory of the target object between the nodes in the trajectory data; An extraction module for extracting feature data of each node and directed connection line; A classification module for inputting the feature data of each node and directed connection line into a pre-trained graph characterization network model and node classification network model to obtain the category of the output node, wherein the feature data of each node includes at least one of the following: road network feature data, map point of interest feature data, and arrival time distribution data and stay duration distribution data of the target object; The feature data of each directed connection line includes at least one of the following: connection frequency and average usage time.
10. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus. Among them, the processor, communication interface, and memory complete mutual communication through the communication bus; The memory is used to store computer programs; The processor, when executing the program stored on the memory, implements the dwelling plot classification method described in any one of claims 1-8.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when executed by the processor, implements the dwelling plot classification method described in any one of claims 1-8.
Citation Information
Patent Citations
Interest point display method and device
CN110413886A
Geographic position determination method and device, electronic equipment and storage medium
CN113720340A