Target clustering method, electronic device and computer readable storage medium
By generating a similarity matching between the candidate relationship graph and the reference relationship graph, the problem of low target clustering accuracy in scenarios with poor image quality is solved, and high-accuracy clustering determination is achieved under graph structure constraints.
Patent Information
- Application Number
- CN202611433467.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-15
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies do not achieve high accuracy in target clustering in scenarios with poor image quality.
By acquiring the reference relationship graph and the trajectory data of the objects to be processed, a candidate relationship graph is generated, and the similarity between the candidate relationship graph and the reference relationship graph is calculated. Clustering is then performed using graph structure pattern matching to filter out accidental associations and improve clustering accuracy.
It improves the accuracy of target clustering and enables refined decision-making in scenarios with poor image quality.
Smart Images

Figure CN123158264A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a target clustering method, electronic device, and computer-readable storage medium. Background Technology
[0002] Target clustering aims to automatically group objects with real-world relationships into the same set, thereby solving the problems of merging similar objects and distinguishing dissimilar ones, reducing analytical complexity, and supporting refined decision-making. Currently, traditional methods typically rely on image features of the target objects for clustering; however, this approach often suffers from low accuracy in scenarios with poor image quality. Therefore, improving the accuracy of target clustering has become a pressing issue. Summary of the Invention
[0003] The main technical problem addressed by this application is to provide a target clustering method, electronic device, and computer-readable storage medium that can improve the accuracy of target clustering.
[0004] To address the aforementioned technical problems, this application provides a target clustering method, comprising: acquiring a reference relationship graph and objects to be processed; wherein the reference relationship graph includes multiple reference objects and target association relationships between at least some of the reference objects, and the objects to be processed correspond to trajectory data; generating a candidate relationship graph for the objects to be processed based on the trajectory data of the objects to be processed and the trajectory co-occurrence data of candidate objects; wherein the candidate relationship graph indicates that there is a reference association relationship between the objects to be processed and the candidate objects; determining the similarity between the candidate relationship graph and the reference relationship graph; and, in response to the similarity satisfying a preset similarity condition, clustering the objects to be processed into the target cluster corresponding to the reference objects.
[0005] To address the aforementioned technical problems, a second aspect of this application provides an electronic device including a memory and a processor coupled to each other, wherein the memory stores program instructions and the processor executes the program instructions to implement the method described in the first aspect.
[0006] To address the aforementioned technical problems, a third aspect of this application provides a computer-readable storage medium storing program instructions executable by a processor, the program instructions being used to implement the method described in the first aspect.
[0007] The above scheme obtains a reference relationship graph and objects to be processed. The reference relationship graph is a pre-constructed graph structure, with nodes representing multiple reference objects and edges representing known target associations between at least some reference objects. Objects to be processed are targets whose clustering affiliation is not yet clear, and they are associated with trajectory data. Based on the trajectory data of objects to be processed and the co-occurrence data of candidate objects' trajectories, a candidate relationship graph is generated. This graph uses nodes and edges to represent the reference associations between objects to be processed and candidate objects. The similarity between the candidate relationship graph and the reference relationship graph is calculated. When the similarity meets the preset similarity conditions, the objects to be processed that meet the conditions are clustered into the corresponding target clusters in the reference objects. By constraining the candidate relationship graph with the overall topological structure of the reference relationship graph, the clustering determination is upgraded from the existence of a single association to graph structure pattern matching, thereby filtering out accidental associations and improving the accuracy of target clustering. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a flowchart illustrating one implementation of the target clustering method of this application; Figure 2 This is a flowchart illustrating another implementation of the target clustering method of this application; Figure 3 This is a schematic diagram of the structure of one embodiment of the electronic device of this application; Figure 4 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0009] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments, and different implementation methods can be adaptively combined. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0010] In this paper, the terms "system" and "network" are often used interchangeably. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this paper means two or more.
[0011] Please see Figure 1 , Figure 1 This is a flowchart illustrating one implementation of the target clustering method of this application. The method includes: S101: Obtain the reference relationship graph and the object to be processed; wherein, the reference relationship graph includes multiple reference objects and target association relationships between at least some of the reference objects, and the object to be processed corresponds to trajectory data.
[0012] Specifically, a reference relationship graph and objects to be processed are obtained. The reference relationship graph is a pre-constructed graph structure, whose nodes are multiple reference objects, and the edges in the graph represent known target associations between at least some of the reference objects. The objects to be processed are targets whose clustering affiliation has not yet been clearly defined, and their associations include trajectory data.
[0013] In one application approach, confirmed target relationship records are obtained from external data sources, and a reference relationship graph is constructed in real time with objects as nodes and target relationships as edges. When new trajectory data is generated, the objects that generated the trajectory data and whose clustering affiliation has not yet been determined are treated as objects to be processed.
[0014] In another application, a pre-built reference relationship graph is read from local storage media, and the unprocessed object queue and its associated trajectory data are read in batches.
[0015] S102: Based on the trajectory data of the object to be processed and the co-occurrence data of the trajectory of the candidate objects, generate a candidate relationship graph of the object to be processed; wherein, the candidate relationship graph indicates that there is a reference association relationship between the object to be processed and the candidate objects.
[0016] Specifically, based on the trajectory data of the object to be processed and the co-occurrence data of the trajectory of the candidate object, a candidate relationship graph is generated. This graph uses nodes and edges to represent the reference association relationship between the object to be processed and the candidate object.
[0017] In one application, multidimensional features are extracted from trajectory data and trajectory co-occurrence data, and these multidimensional features are input into a trained relationship prediction model. The relationship prediction model outputs a prediction result indicating whether a reference association exists, and a candidate relationship graph is then constructed based on this prediction result.
[0018] In another application, trajectory data and co-occurrence data are used to set a fixed time window and count the frequency of co-occurrence. When a threshold condition is reached, it is determined that there is a reference correlation, thereby constructing a candidate relationship graph.
[0019] S103: Determine the similarity between the candidate relationship graph and the reference relationship graph.
[0020] Specifically, the similarity between the candidate relation graph and the reference relation graph is calculated.
[0021] In one application method, the topological features of the candidate relationship graph are extracted, and the topological features are matched with the preset topological patterns of the relationship between each target in the reference relationship graph. The similarity is determined based on the degree of matching.
[0022] In another application, the candidate relation graph and the reference relation graph are input into a graph embedding model, such as a graph neural network, to obtain their respective graph-level embedding vectors. The similarity is determined by calculating the cosine similarity or Euclidean distance between the two graph-level embedding vectors.
[0023] S104: In response to the similarity meeting the preset similarity condition, the object to be processed is clustered into the target cluster corresponding to the reference object.
[0024] Specifically, when the similarity meets the preset similarity conditions, the objects to be processed that meet the conditions are clustered into the target cluster corresponding to the reference objects.
[0025] In one application method, a similarity threshold is preset. When the similarity between the candidate relationship graph and the reference relationship graph reaches or exceeds the threshold, the reference objects in the reference relationship graph that participate in the similarity calculation are determined, and the object to be processed is assigned to the target cluster to which these reference objects belong.
[0026] In another application, the similarity of the target association relationships reflected by different combinations of reference objects in the candidate relationship graph and the reference relationship graph is calculated respectively. The one with the highest similarity is selected, and the object to be processed is assigned to the target cluster to which the reference object with the highest similarity belongs.
[0027] The above scheme obtains a reference relationship graph and objects to be processed. The reference relationship graph is a pre-constructed graph structure, with nodes representing multiple reference objects and edges representing known target associations between at least some reference objects. Objects to be processed are targets whose clustering affiliation is not yet clear, and they are associated with trajectory data. Based on the trajectory data of objects to be processed and the co-occurrence data of candidate objects' trajectories, a candidate relationship graph is generated. This graph uses nodes and edges to represent the reference associations between objects to be processed and candidate objects. The similarity between the candidate relationship graph and the reference relationship graph is calculated. When the similarity meets the preset similarity conditions, the objects to be processed that meet the conditions are clustered into the corresponding target clusters in the reference objects. By constraining the candidate relationship graph with the overall topological structure of the reference relationship graph, the clustering determination is upgraded from the existence of a single association to graph structure pattern matching, thereby filtering out accidental associations and improving the accuracy of target clustering.
[0028] Please see Figure 2 , Figure 2 This is a flowchart illustrating another implementation of the target clustering method of this application. The method includes: S201: Obtain the reference relationship diagram and the objects to be processed.
[0029] Specifically, a reference relationship graph and an object to be processed are obtained; wherein, the reference relationship graph includes multiple reference objects and target association relationships between at least some of the reference objects, and the object to be processed has trajectory data, which is the action record of the object to be processed itself.
[0030] S202: Extract the co-occurrence features of the object to be processed and each candidate object from the trajectory data and trajectory co-occurrence data.
[0031] Specifically, trajectory co-occurrence data refers to the action records of the object to be processed and the candidate object appearing together at the same or similar time and in the same or similar place, while co-occurrence features are a series of indicators extracted from trajectory co-occurrence data to quantify the co-occurrence action patterns between the object to be processed and the candidate object.
[0032] Optionally, co-occurrence characteristics may include co-occurrence frequency, co-occurrence days, co-occurrence duration, co-occurrence interval distribution, and co-occurrence location distribution. These co-occurrence characteristics provide quantitative input for subsequent determination of whether there is a reference correlation between the object to be processed and the candidate object.
[0033] In one implementation scenario, the reference relationship graph is constructed based on the target association relationships known in the first data source. The target association relationships are preset relationship types. The trajectory data of the object to be processed and the trajectory co-occurrence data of the candidate object are obtained from a second data source different from the first data source.
[0034] Specifically, the reference relationship graph is constructed based on the known target associations in the first data source. The first data source refers to a data source containing records of confirmed relationships between objects, which records some clearly defined target associations between objects. Target associations are preset relationship types, that is, predefined object association types with specific meanings. By extracting the recorded target associations from the first data source, and using objects as nodes and target associations as edges, the reference relationship graph can be constructed. In this reference relationship graph, the existence of an edge indicates that a target association has been confirmed between two reference objects by the first data source.
[0035] Furthermore, the trajectory data of the objects to be processed and the co-occurrence data of the candidate objects' trajectories are obtained from a second data source different from the first data source. The second data source is independent of the first data source; it records data generated by objects during daily activities or operations, rather than confirmed relationship information. The second data source can reflect the actual interactions between objects, but cannot directly provide the specific relationship types corresponding to these interactions. By combining the trajectory data and co-occurrence data from the second data source with the reference relationship graph constructed from the first data source, accurate clustering of objects to be processed that do not have a clearly defined cluster affiliation can be achieved.
[0036] S203: Input co-occurrence features into a pre-trained relationship prediction model, and use the relationship prediction model to output the judgment result of whether there is a reference association relationship between the object to be processed and the candidate object.
[0037] Specifically, co-occurrence features are input into a pre-trained relationship prediction model, which outputs a judgment result indicating whether a reference association exists between the object to be processed and the candidate object. This relationship prediction model is a machine learning model trained on multiple samples, which has learned the mapping rules between co-occurrence features and reference associations. When co-occurrence features are input into the model, the model performs calculations based on the learned mapping rules and outputs a judgment result, thereby determining whether a reference association exists between the object to be processed and the candidate object.
[0038] In one implementation scenario, step S203 specifically includes: dividing the trajectory co-occurrence data into high-frequency co-occurrence data and low-frequency co-occurrence data based on the co-occurrence frequency between the object to be processed and the candidate object; processing the high-frequency co-occurrence data using a first relationship prediction model and processing the low-frequency co-occurrence data using a second relationship prediction model; wherein the relationship prediction feature sets used by the first relationship prediction model and the second relationship prediction model are at least partially different, and both the first relationship prediction model and the second relationship prediction model output a prediction result of whether a reference association relationship exists.
[0039] Specifically, based on the co-occurrence frequency between the object to be processed and the candidate object, trajectory co-occurrence data is divided into high-frequency co-occurrence data and low-frequency co-occurrence data. Co-occurrence frequency refers to the number or frequency at which the object to be processed and the candidate object appear together in the trajectory co-occurrence data. Using a preset co-occurrence frequency threshold, trajectory co-occurrence data above the threshold is classified as high-frequency co-occurrence data, and trajectory co-occurrence data below the threshold is classified as low-frequency co-occurrence data. High-frequency co-occurrence data indicates relatively frequent interaction between the object to be processed and the candidate object, while low-frequency co-occurrence data indicates relatively sparse interaction. However, sparseness does not mean no correlation; important reference correlation data may still exist in low-frequency co-occurrence data. Therefore, a second relationship prediction model is needed to process the low-frequency co-occurrence data.
[0040] In a specific implementation scenario, low-frequency co-occurrence data refers to co-occurrence frequency less than 5 times in 2 days, or less than 3 times in 2 days, or an average of 1 time per day; otherwise, it is considered high-frequency co-occurrence data. In other implementation scenarios, the co-occurrence frequency threshold can also be flexibly set according to the actual situation. This application does not impose specific restrictions here.
[0041] Furthermore, different relationship prediction models are used to process the two types of data based on their different characteristics. A first relationship prediction model is used to process high-frequency co-occurrence data, focusing on identifying regular features from high-frequency interactions; a second relationship prediction model is used to process low-frequency co-occurrence data, focusing on capturing accidental but indicative features from sparse interactions. The relationship prediction feature sets used by the first and second relationship prediction models are at least partially different to adapt to the characteristics of high-frequency and low-frequency co-occurrence data, thereby improving the accuracy of relationship prediction. Both the first and second relationship prediction models output prediction results indicating whether a reference association exists between the object to be processed and the candidate object. The combined outputs of both models constitute the basis for judging edges in the candidate relationship graph.
[0042] In one implementation scenario, the relationship prediction features used by the first relationship prediction model include at least one of the following: co-occurrence days, co-occurrence frequency, target attribute features, and co-location type. The relationship prediction features used by the second relationship prediction model include at least one of the following: active area overlap, co-occurrence frequency at different time granularities, co-occurrence ratio of low-density collection locations, co-occurrence interval duration distribution, and the number of times the distance between objects is less than a preset threshold.
[0043] Specifically, the first relationship prediction model processes high-frequency co-occurrence data. The relationship prediction features it uses focus on describing the regularity and persistence of frequent interactions between the object to be processed and candidate objects. Specifically, the number of co-occurrence days reflects the degree of persistence of their co-occurrence over time; the number of co-occurrences reflects the frequency of their interactions; target attribute features reflect the similarity or correlation of their own attributes; and the co-occurrence location type reflects the category characteristics of the environment in which they co-occur. These features characterize action patterns in high-frequency interaction scenarios from multiple dimensions, helping to identify objects with referential relationships from frequent co-occurrences.
[0044] Furthermore, the second relationship prediction model processes low-frequency co-occurrence data, and its relationship prediction features focus on capturing weak signals with indicative significance in sparse interactions. Specifically, the overlapping area of active regions reflects the degree of spatial overlap between the activity ranges of the object to be processed and the candidate object; the co-occurrence frequency at different time granularities reflects the co-occurrence of the two at different time scales; the co-occurrence ratio at low-density collection locations reflects the co-occurrence ratio of the two at non-busy collection locations, which helps to eliminate accidental co-occurrence caused by high traffic; the distribution of co-occurrence interval duration reflects the regularity of the time interval between each co-occurrence; and the number of times the distance between objects is less than a preset threshold reflects the frequency of close spatial co-occurrence. These features can mine candidate objects with referential relationships from sparse data, compensating for the problem of insufficient coverage in high-frequency data. By designing at least partially different relationship prediction feature sets for the first and second relationship prediction models, both high-frequency and low-frequency co-occurrence data can be processed in a targeted manner, and both output prediction results of whether a referential relationship exists, jointly improving the recall and accuracy of referential relationship judgment.
[0045] S204: Connect the candidate objects that are judged to have a reference relationship with the object to be processed to generate a candidate relationship graph.
[0046] Specifically, after determining whether a referential relationship exists between the object to be processed and each candidate object, candidate objects with such relationships are selected. Using the object to be processed and these candidate objects as nodes, and the referential relationships between the object to be processed and each candidate object as edges, a graph structure centered on the object to be processed is formed—the candidate relationship graph. This candidate relationship graph visually represents the action relationship network of the object to be processed. Its nodes include the object to be processed and its related candidate objects, and the edges represent the referential relationships between the object to be processed and the candidate objects. It should be noted that the edges in the candidate relationship graph do not carry relationship type identifiers; they are only used to characterize a non-accidental association between the object to be processed and the candidate objects. The specific type of association between them needs to be verified and confirmed subsequently through similarity matching with the reference relationship graph.
[0047] S205: Determine the similarity between the candidate relationship graph and the reference relationship graph.
[0048] Specifically, the similarity between the candidate relation graph and the reference relation graph is calculated.
[0049] In one implementation scenario, step S205 specifically includes: extracting the topological structure features of the candidate relationship graph; matching the topological structure features with the preset topological pattern of the target association relationship in the reference relationship graph, and obtaining the similarity based on the degree of matching.
[0050] Specifically, after generating the candidate relationship graph, it is necessary to extract its topological features to quantitatively describe its structural characteristics. Topological features refer to structural indicators reflecting the connectivity between nodes and edges in the candidate relationship graph, and may include node degree distribution, graph density, number of connected components, clustering coefficients, etc. These topological features can characterize the connection patterns presented by the candidate relationship graph, providing a structured basis for subsequent matching with the preset topological patterns of the target association relationships in the reference relationship graph.
[0051] Furthermore, the preset topological pattern of the target association in the reference relationship graph refers to the typical topological structure template extracted based on the established target associations in the reference relationship graph. Since target associations have clear type attributes, they often exhibit relatively fixed connection patterns in the reference relationship graph, thus forming identifiable preset topological patterns. By matching the topological features of the candidate relationship graph with the preset topological pattern, the degree of structural similarity between the candidate relationship graph and the typical connection pattern corresponding to the target association can be measured. The higher the degree of matching, the closer the structural relationship between the object to be processed and the candidate object in the candidate relationship graph is to the target association, thus obtaining the similarity between the candidate relationship graph and the reference relationship graph.
[0052] S206: In response to the similarity meeting the preset similarity condition, the object to be processed is clustered into the target cluster corresponding to the reference object.
[0053] Specifically, when the similarity meets the preset similarity conditions, the objects to be processed that meet the conditions are clustered into the target cluster corresponding to the reference objects.
[0054] In one implementation scenario, step S206, which involves clustering the objects to be processed into the target cluster corresponding to the reference objects, specifically includes: determining the target association subgraph in the reference association graph that has the highest similarity to the candidate association graph, and assigning the objects to be processed into the set cluster corresponding to the existing reference objects in the target association subgraph.
[0055] Specifically, the part of the reference relationship graph with the highest similarity to the candidate relationship graph is identified. This involves finding the local structure in the reference relationship graph that best matches the candidate relationship graph in terms of topological structure; this local structure consists of reference objects with target association relationships. The similarity of the target association relationship structures composed of different reference objects in the candidate relationship graph and the reference relationship graph is compared one by one, and the one with the highest similarity is selected. Since the reference objects in this local structure clearly belong to a certain cluster, the cluster corresponding to the existing reference objects in this local structure is used as the affiliation of the objects to be processed, and the objects to be processed are assigned to this cluster, completing the clustering operation.
[0056] In a specific implementation scenario, for ease of understanding, the following explanation uses logistics transportation vehicles as an example. In logistics transportation fleet management, it's necessary to automatically cluster vehicles from the same transportation company or the same dispatch group for unified scheduling and management. Typically, vehicle trajectory data is collected at road data collection points, and co-occurrence data between vehicles can also be obtained. In a logistics park, there are three known fleets: Fleet A includes vehicles A1, A2, and A3; Fleet B includes vehicles B1 and B2; and Fleet C includes vehicles C1, C2, C3, and C4. Based on these known fleet affiliations, a reference relationship graph is constructed, where nodes represent known vehicles, and edges represent target associations belonging to the same fleet. Now, a vehicle X with an unspecified affiliation enters the park. During its operation, it generates co-occurrence data with multiple other vehicles. Analysis reveals that vehicle X co-occurs with vehicles A1, A2, D1, and E2. After extracting the co-occurrence features of X with each candidate vehicle, a relationship prediction model is used to determine that X has a reference association with A1, A2, and D1, but no reference association with E2. This generates a candidate relation graph centered on X, connecting A1, A2, and D1, but the specific type of the edges is unknown at this point.
[0057] The candidate relationship graph is matched with the target association topology patterns of each known fleet in the reference relationship graph. Fleet A's topology pattern presents a tightly connected structure of three vehicles, and X in the candidate relationship graph also shows a similar connection pattern with A1 and A2, indicating the highest matching degree. Fleet B's topology pattern is a two-vehicle connection, which differs significantly from the candidate relationship graph; the connection between X and D1 has no corresponding pattern in the reference relationship graph. Therefore, it is determined that the similarity between the candidate relationship graph and fleet A meets the preset conditions, and vehicle X is assigned to the target cluster corresponding to fleet A. In this way, even if vehicle X's license plate is damaged, making image features unrecognizable, accurate clustering can still be achieved by matching trajectory co-occurrence with known fleet topology patterns.
[0058] S207: In response to detecting that the same object to be processed has been divided into multiple different target clusters, merge the multiple target clusters into one cluster.
[0059] Specifically, after clustering the objects to be processed into their corresponding target clusters, it is also necessary to check whether the same object is assigned to multiple different target clusters. This situation may occur when the object to be processed has a strong referential relationship with reference objects in multiple target clusters, causing the object to be assigned to different target clusters under different matching conditions. When it is detected that the same object to be processed is assigned to multiple different target clusters, it indicates that these target clusters may actually be the same clusters, incorrectly segmented only due to incomplete historical data. In this case, these target clusters are merged into one cluster to eliminate redundancy and ensure the consistency and accuracy of the clustering results.
[0060] Please see Figure 3 , Figure 3 This is a schematic diagram of an embodiment of the electronic device of this application. The electronic device 30 includes a memory 300 and a processor 302 coupled to each other. The memory 300 stores program instructions (not shown). The processor 302 calls the program instructions to implement the methods in any of the above embodiments. For related descriptions, please refer to the detailed description of the above method embodiments, which will not be repeated here. Specifically, the electronic device 30 includes: desktop computers, laptops, tablet computers, servers, etc., without limitation. In addition, the processor 302 can also be called a central processing unit (CPU). The processor 302 may be an integrated circuit chip with signal processing capabilities. The processor 302 can also be a general-purpose processor, 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, or discrete hardware components. The general-purpose processor can be a microprocessor or any conventional processor. In addition, the processor 302 can be implemented by integrated circuit chips.
[0061] Please see Figure 4 , Figure 4 This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 40 stores program instructions 400. When the program instructions 400 are executed by the processor, they implement the methods in any of the above embodiments. For a detailed description of the relevant content, please refer to the detailed description of the above method embodiments, which will not be repeated here.
[0062] It should be noted that the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0063] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0064] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0065] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A target clustering method, characterized by, include: Obtain a reference relationship graph and objects to be processed; wherein, the reference relationship graph includes multiple reference objects and at least some of the target association relationships between the reference objects, and the objects to be processed correspond to trajectory data; Based on the trajectory data of the object to be processed and the co-occurrence data of the trajectory of the candidate objects, a candidate relationship graph of the object to be processed is generated; wherein, the candidate relationship graph indicates that there is a reference association relationship between the object to be processed and the candidate objects; Determine the similarity between the candidate relationship graph and the reference relationship graph; In response to the similarity meeting a preset similarity condition, the object to be processed is clustered into the target cluster corresponding to the reference object.
2. The method of claim 1, wherein, The step of generating a candidate relationship graph for the object to be processed based on the trajectory data of the object to be processed and the co-occurrence data of the trajectory of candidate objects includes: Extract the co-occurrence features between the object to be processed and each of the candidate objects from the trajectory data and the trajectory co-occurrence data; The co-occurrence features are input into a pre-trained relationship prediction model, and the relationship prediction model is used to output a judgment result on whether there is a reference association relationship between the object to be processed and the candidate object; The candidate objects that are determined to have the reference relationship are connected to the object to be processed to generate the candidate relationship graph.
3. The method of claim 2, wherein, The step of inputting the co-occurrence features into a pre-trained relationship prediction model and using the relationship prediction model to output a judgment result on whether the reference association relationship exists between the object to be processed and the candidate object includes: Based on the co-occurrence frequency between the object to be processed and the candidate object, the trajectory co-occurrence data is divided into high-frequency co-occurrence data and low-frequency co-occurrence data; The high-frequency co-occurrence data is processed using a first relationship prediction model, and the low-frequency co-occurrence data is processed using a second relationship prediction model; wherein the relationship prediction feature sets used by the first relationship prediction model and the second relationship prediction model are at least partially different, and both the first relationship prediction model and the second relationship prediction model output a judgment result on whether the reference association exists.
4. The method of claim 3, wherein, The relationship prediction features used in the first relationship prediction model include at least one of the following: co-occurrence days, co-occurrence frequency, target attribute features, and co-location type. The relationship prediction features used in the second relationship prediction model include at least one of the following: active area overlap, co-occurrence frequency at different time granularities, co-occurrence ratio of low-density collection locations, co-occurrence interval duration distribution, and the number of times the distance between objects is less than a preset threshold.
5. The method of claim 1, wherein, Determining the similarity between the candidate relationship graph and the reference relationship graph includes: Extract the topological features of the candidate relationship graph; The topological features are matched with the preset topological patterns of target associations in the reference relationship graph, and the similarity is obtained based on the degree of matching.
6. The method of claim 5, wherein, The step of clustering the objects to be processed into the corresponding target cluster in the reference objects includes: The target association subgraph with the highest similarity to the candidate association graph in the reference relationship graph is determined, and the object to be processed is assigned to the set cluster corresponding to the existing reference object in the target association subgraph.
7. The method of claim 1, wherein, After clustering the object to be processed into the corresponding target cluster in the reference object in response to the similarity meeting the preset similarity condition, the method further includes: In response to the detection that the same object to be processed is divided into multiple different target clusters, the multiple target clusters are merged into one cluster.
8. The method of claim 1, wherein, The reference relationship graph is constructed based on the target association relationships known in the first data source. The target association relationships are preset relationship types. The trajectory data of the object to be processed and the trajectory co-occurrence data of the candidate object are obtained from a second data source different from the first data source.
9. An electronic device, comprising: The method includes a memory and a processor coupled to each other, the memory storing program instructions, and the processor executing the program instructions to implement the method according to any one of claims 1-8.
10. A computer readable storage medium characterized by, The system stores program instructions that can be executed by a processor, the program instructions being used to implement the method according to any one of claims 1-8.
