A method, device, electronic device and storage medium for clustering target objects

By projecting the target object on the grid template to extract feature sequences, the problems of low clustering efficiency and poor universality of target objects in the prior art are solved, and efficient and accurate clustering of massive target objects is achieved.

CN114863156BActive Publication Date: 2025-03-21SUZHOU XUANWO INTELLIGENT TECHNOLOGY CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210486345.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-06
Publication Date
2025-03-21
Estimated Expiration
2042-05-06

AI Technical Summary

Technical Problem

In the prior art, when clustering target objects, a large amount of data is required to build a training data set, and the neural network model is poor in versatility, making it difficult to achieve efficient clustering of massive target objects.

Method used

By projecting the target object into a grid template, extracting its feature sequences, and obtaining clustering results based on these feature sequences, efficient clustering of multiple target objects can be achieved.

Benefits of technology

This method can efficiently accurately cluster various types of target objects, improve work efficiency, and have high versatility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114863156B_ABST
    Figure CN114863156B_ABST
Patent Text Reader

Abstract

Some embodiments of the present application provide a method, device, electronic device and storage medium for clustering target objects, the method comprising: obtaining multiple target objects; projecting each target object into a grid template respectively, and extracting a feature sequence corresponding to each target object; and obtaining clustering results for the multiple target objects according to the feature sequence. Some embodiments of the present application can achieve clustering of multiple target objects, with high versatility and high clustering efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of object analysis, and in particular to a method, device, electronic device and storage medium for clustering target objects. Background Art

[0002] At present, clustering target objects in related fields (for example, graphic design) is a basic and tedious task. In the prior art, a trained neural network model is generally used to cluster many objects. It is understandable that this method requires the collection of a large amount of data to construct a training data set and then train the model based on the data in the training data set to obtain a neural network model that meets the requirements. The use of a neural network model to achieve clustering has high requirements on the quality of the data in the training data set, and the application scenarios of the trained neural network model are limited, and the versatility is poor.

[0003] Therefore, how to provide a simple target object clustering method becomes a technical problem that needs to be solved urgently. Summary of the invention

[0004] The purpose of some embodiments of the present application is to provide a method, device, electronic device and storage medium for clustering target objects. Through the technical solutions of the embodiments of the present application, clustering of massive target objects can be achieved with high clustering efficiency, high efficiency and good versatility, thereby improving work efficiency in related fields.

[0005] In a first aspect, some embodiments of the present application provide a method for clustering target objects, comprising: obtaining multiple target objects; projecting each target object into a grid template respectively, and extracting a feature sequence corresponding to each target object; and obtaining clustering results for the multiple target objects based on the feature sequence.

[0006] Some embodiments of the present application obtain clustering results of multiple target objects according to the feature sequence of each target object in the grid template, which can achieve accurate clustering of various types of target objects with high versatility, thereby providing convenience for subsequent work.

[0007] In some embodiments, the target object is a graphic, and each graphic includes multiple structural parts, wherein each target object is projected into a grid template, and a feature sequence corresponding to each target object is extracted, including: projecting the i-th graphic into the grid template, and extracting a sub-feature sequence of each structural part included in the i-th graphic to obtain the feature sequence, wherein a sub-feature sequence is used to characterize the characteristics of a structural part, and the i-th graphic is any target object.

[0008] Some embodiments of the present application can obtain a feature sequence of each target object with higher accuracy by characterizing multiple structural components of each graphic with sub-feature sequences, thereby laying a foundation for subsequent effective clustering of multiple target objects.

[0009] In some embodiments, extracting the sub-feature sequence of each structural component included in the i-th graphic includes: obtaining the sub-feature sequence according to positions of each structural component in the grid template.

[0010] Some embodiments of the present application obtain the sub-feature sequence corresponding to each structural part through the position of each structural part in the grid template, so as to completely obtain the features of each structural part and effectively avoid the problem of inaccurate clustering results caused by missing feature points.

[0011] In some embodiments, obtaining the sub-feature sequence according to the position of each structural component in the grid template includes: when confirming that the x-th structural component is projected onto a first grid of the grid template, using a set of coordinates corresponding to the first grid to characterize the x-th structural component, wherein the set of coordinates is the sub-feature sequence.

[0012] Some embodiments of the present application obtain a corresponding sub-feature sequence through a set of coordinates of each structural component in a grid template, which can accurately characterize the position attributes of each structural component.

[0013] In some embodiments, obtaining the sub-feature sequence according to the position of each structural component in the grid template includes: when confirming that the yth structural component is projected onto multiple second grids of the grid template, using multiple groups of coordinates corresponding to the multiple second grids to characterize the yth structural component, wherein one group of coordinates is used to characterize the position of a second grid on the grid template; and sorting the multiple groups of coordinates to obtain the sub-feature sequence corresponding to the yth structural component.

[0014] Some embodiments of the present application obtain a sub-feature sequence of each structural component by sorting multiple groups of coordinates corresponding to multiple second grids occupied by each structural component in the grid template. The accurate position attributes of each structural component can be obtained based on the ordered multiple groups of coordinates, laying the foundation for the accuracy of subsequent clustering results.

[0015] In some embodiments, the set of coordinates is a two-dimensional coordinate, the horizontal coordinate of the two-dimensional coordinate is the row number of each grid in the grid template, and the vertical coordinate of the two-dimensional coordinate is the column number of each grid in the grid template, wherein sorting the multiple sets of coordinates to obtain the sub-feature sequence corresponding to the y-th structural member includes: obtaining the m-th group of coordinates (a, b) and the n-th group of coordinates (c, d) from the multiple sets of coordinates; if a is less than c, or if a is equal to c and b is less than d, then the m-th group of coordinates is located before the n-th group of coordinates in the sub-feature sequence; if a is greater than c, then the m-th group of coordinates is located after the n-th group of coordinates in the sub-feature sequence.

[0016] Some embodiments of the present application can correctly locate and reflect the position attributes of each structural component by setting reasonable sorting rules to sort multiple groups of coordinates, thereby reducing the problem of large errors in clustering results caused by inaccurate position attributes.

[0017] In some embodiments, obtaining clustering results for the multiple target objects according to the feature sequences includes: obtaining similarities between feature sequences corresponding to the target objects; and obtaining the clustering results according to the similarities.

[0018] Some embodiments of the present application obtain clustering results through the similarity between the feature sequences of each target object, thereby achieving effective clustering of each target object with high efficiency and applicability.

[0019] In some embodiments, the obtaining of the similarity between the feature sequences corresponding to the target objects includes: obtaining a sub-feature sequence of each structural component included in the i-th graphic and a sub-feature sequence of each structural component included in the t-th graphic; obtaining the similarity of each structural component in the i-th graphic and the t-th graphic based on the sub-feature sequence of each structural component in the i-th graphic and the sub-feature sequence of each structural component in the t-th graphic; and performing weighted calculation on the similarities of the structural components to obtain the similarity between the feature sequence corresponding to the i-th graphic and the feature sequence corresponding to the t-th graphic.

[0020] Some embodiments of the present application can obtain more accurate similarities between structural parts by comparing the sub-feature sequences of each structural part in any two graphics one by one, thereby improving the accuracy of obtaining the similarity between the feature sequences of any two graphics, and have high versatility.

[0021] In a second aspect, some embodiments of the present application provide a device for clustering target objects, comprising: an acquisition module configured to acquire multiple target objects; a feature extraction module configured to project each target object into a grid template respectively, and extract a feature sequence corresponding to each target object; and a clustering result acquisition module configured to acquire clustering results for the multiple target objects based on the feature sequence.

[0022] In a third aspect, some embodiments of the present application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the method described in any embodiment of the first aspect.

[0023] In a fourth aspect, some embodiments of the present application provide an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor can implement a method as described in any embodiment of the first aspect when executing the program.

[0024] In a fifth aspect, some embodiments of the present application provide a computer program product, wherein the computer program product comprises a computer program, wherein the computer program, when executed by a processor, can implement the method described in any embodiment of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions of some embodiments of the present application, the drawings required for use in some embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0026] Figure 1 A system diagram of target object clustering provided in some embodiments of the present application;

[0027] Figure 2 One of the flow charts of a method for clustering target objects provided in some embodiments of the present application;

[0028] Figure 3 A second flow chart of a method for clustering target objects provided in some embodiments of the present application;

[0029] Figure 4 A schematic diagram of projecting a target object onto a grid template provided by some embodiments of the present application;

[0030] Figure 5 A block diagram of target object clustering provided in some embodiments of the present application;

[0031] Figure 6 A schematic diagram of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION

[0032] The technical solutions in some embodiments of the present application will be described below in conjunction with the drawings in some embodiments of the present application.

[0033] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0034] In the related technologies, there are corresponding neural network models for face recognition or specific object recognition in image recognition research. Since the methods used for different objects in different recognition application scenarios are different, it is necessary to build multiple neural network models to realize the recognition and classification of various types of objects. It can be seen from the above related technologies that when classifying or clustering a large number of target objects, different methods need to be used according to different types of target objects. It is impossible to use a universal algorithm, which increases time costs and reduces work efficiency.

[0035] In view of this, some embodiments of the present application provide a method for clustering target objects, which can project each target object into a grid template, extract a feature sequence corresponding to each target object, and then obtain clustering results of multiple target objects according to the feature sequence. The method provided in some embodiments of the present application can use the same clustering method for different types of target objects, has good versatility, and is more efficient in obtaining clustering results, which reduces time costs and improves work efficiency in related fields (for example, graphic design or animation design).

[0036] like Figure 1 As shown, some embodiments of the present application provide a system diagram for clustering target objects, the system comprising a data storage end 100 and a terminal device 200, wherein the data storage end 100 is used to store a large number of target objects (that is, multiple target objects), and the data storage end 100 sends the multiple target objects to the terminal device 200, and the terminal device 200 can process the multiple target objects to obtain clustering results of the multiple target objects.

[0037] In other embodiments of the present application, the terminal device 200 may also have the functions of storing (i.e., storing a large number of target objects) and processing multiple target objects to obtain clustering results of multiple target objects. In this case, an independent data storage terminal 100 may not be provided. It should be noted that the terminal device 200 may be a non-portable PC terminal or a portable mobile terminal device. In some embodiments of the present application, an independent database server may be provided for data storage of a large number of target objects, and the corresponding data storage terminal 100 and the terminal device 200 may read the stored data from the database server and obtain clustering results of multiple target objects based on the data.

[0038] The following is an exemplary description of some embodiments of the present application. Figure 1 The implementation process of the target object clustering method performed by the terminal device 200.

[0039] Please see attached Figure 2 , Figure 2 A flow chart of a method for clustering target objects provided in some embodiments of the present application, the method may include:

[0040] S210, obtaining multiple target objects.

[0041] For example, in some embodiments of the present application, the type of the target object may be a design drawing (e.g., an object graphic, an architectural design drawing, an animation design drawing, or a painting, etc.) or an image (e.g., a face image or an object image, etc.).

[0042] S220, projecting each target object into the grid template respectively, and extracting a feature sequence corresponding to each target object.

[0043] For example, in some embodiments of the present application, the grid template has h 1 ×h 2 grids, and the size of each grid is designed according to the actual application scenario, where h 1 、h 2 are all positive integers. In addition, h 1 and h 2 It can be the same positive integer or different positive integers, and can be specifically set according to actual conditions, wherein each grid corresponds to a set of coordinates, that is, a set of coordinates includes a horizontal coordinate and a vertical coordinate.

[0044] In some embodiments of the present application, the target object is a graphic, and each graphic includes multiple structural parts. S220 is exemplified below by taking the i-th graphic as an example, wherein the i-th graphic corresponds to any target object, and S220 may further include: projecting the i-th graphic into the grid template, and extracting a sub-feature sequence of each structural part included in the i-th graphic to obtain the feature sequence, wherein a sub-feature sequence is used to characterize the features of a structural part, and i is a positive integer.

[0045] For example, in some embodiments of the present application, the target object is composed of multiple parts (that is, structural parts). In different scenarios, the specific structures corresponding to the structural parts are different. For example, the various structural parts of the architectural design drawing (as a specific example of the target object) can be walls, pipes, bedrooms, living rooms, kitchens, etc., and the various structural parts of the mechanical design drawing (as a specific example of the target object) can be fuselages, bearings, gears, etc. The various structural parts of the face image (that is, the image) can refer to the left eye, the right eye, the left eyebrow, the right eyebrow, the nose and the mouth, etc. It is not difficult to understand that each target object is composed of various structural parts. Specifically, the various structural parts that make up the target object can be determined according to the type of the target object, and the present application does not make specific limitations here.

[0046] It should be understood that in some embodiments of the present application, the size of each grid in the grid template can be fixed or set according to the actual scene. Since the sizes of the target objects are different, the size of the target object and the size of the grid template can be analyzed first, and then the i-th graphic (that is, any target object) can be projected into the grid template. According to the actual analysis situation, the i-th graphic can be directly projected into the grid template, or the i-th graphic can be scaled proportionally and then projected into the grid template. In actual application scenarios, a suitable projection method can be selected according to the size and shape of the target object, so as to project the target object into the grid template. The present application does not specifically limit the projection method here.

[0047] In order to obtain a sub-feature sequence of each structural component with higher accuracy, in some embodiments of the present application, extracting the sub-feature sequence of each structural component included in the i-th figure includes: obtaining the sub-feature sequence according to the position of each structural component in the grid template.

[0048] In some embodiments of the present application, the sub-feature sequence is obtained according to the position of each structural component in the grid template, including: when confirming that the x-th structural component is projected onto a first grid of the grid template, using a set of coordinates corresponding to the first grid to characterize the x-th structural component, wherein the set of coordinates is the sub-feature sequence.

[0049] In some embodiments of the present application, since the sizes of various structural parts are different, the number of grids occupied by various structural parts in the grid template is different. When it is confirmed that the x-th structural part (that is, any structural part, x is a positive integer) occupies only one first grid, a set of coordinates corresponding to the first grid can be directly used as the sub-feature sequence of the x-th structural part. As a specific example of the present application, for example, when a face image is projected into a 5×5 grid template, the mouth occupies only one first grid, and the set of coordinates corresponding to the first grid is (3,3), and the sub-feature sequence corresponding to the mouth is {(3,3)}.

[0050] In other embodiments of the present application, the sub-feature sequence is obtained according to the position of each structural component in the grid template, including: when confirming that the yth structural component is projected onto multiple second grids of the grid template, using multiple groups of coordinates corresponding to the multiple second grids to characterize the yth structural component, wherein one group of coordinates is used to characterize the position of a second grid on the grid template; and sorting the multiple groups of coordinates to obtain the sub-feature sequence corresponding to the yth structural component.

[0051] In some other embodiments of the present application, the set of coordinates is a two-dimensional coordinate, the horizontal coordinate of the two-dimensional coordinate is the row number of each grid in the grid template, and the vertical coordinate of the two-dimensional coordinate is the column number of each grid in the grid template, wherein the sorting of the multiple sets of coordinates to obtain the sub-feature sequence corresponding to the y-th structural member includes: obtaining the m-th group of coordinates (a, b) and the n-th group of coordinates (c, d) from the multiple sets of coordinates; if a is less than c, or if a is equal to c and b is less than d, then the m-th group of coordinates is located before the n-th group of coordinates in the sub-feature sequence; if a is greater than c, then the m-th group of coordinates is located after the n-th group of coordinates in the sub-feature sequence.

[0052] It should be noted that a, b, c, d, m and n are all positive integers, and m and n are any two sets of coordinates among the multiple sets of coordinates.

[0053] For example, in some other embodiments of the present application, the size of the yth structural component (that is, any structural component, y is a positive integer) in a target object is relatively large. At this time, the structural component occupies multiple second grids in the grid template. At this time, in order to obtain an accurate sub-feature sequence, it is necessary to sort the multiple groups of coordinates corresponding to the multiple second grids according to certain rules to obtain the sub-feature sequence corresponding to the yth structural component. As another specific example of the present application, for example, when a face image is projected into a 5×5 grid template, the left eye occupies two second grids, and the two groups of coordinates corresponding to the second grids are (1,3) and (1,2), respectively. According to the above sorting rules, the sub-feature sequence corresponding to the left eye is {(1,2), (1,3)}.

[0054] S230: Obtain clustering results for the multiple target objects according to the feature sequence.

[0055] In some embodiments of the present application, S230 may include obtaining the similarity between feature sequences corresponding to each target object; and obtaining the clustering result according to the similarity.

[0056] For example, in some embodiments of the present application, when the similarity between the feature sequences corresponding to any two target objects is greater than or equal to a preset threshold, the two target objects are classified into one category.

[0057] In order to improve the accuracy of clustering results, in some embodiments of the present application, the method of obtaining the similarity between the feature sequences corresponding to each target object specifically includes: obtaining the sub-feature sequence of each structural component included in the i-th figure and the sub-feature sequence of each structural component included in the t-th figure; obtaining the similarity of each structural component in the i-th figure and the t-th figure according to the sub-feature sequence of each structural component in the i-th figure and the sub-feature sequence of each structural component in the t-th figure; performing weighted calculation on the similarities of the structural components to obtain the similarity between the feature sequence corresponding to the i-th figure and the feature sequence corresponding to the t-th figure.

[0058] For example, in some embodiments of the present application, when analyzing any two target objects (i.e., the i-th graph and the t-th graph), the similarity of each structural component is obtained by a similarity algorithm (e.g., the longest common subsequence algorithm), and then the similarity of each structural component is directly added to obtain the similarity of the two target objects. In other embodiments of the present application, corresponding weights may be set according to the importance of each structural component, and then the similarity of each structural component is multiplied by the corresponding weight and then weighted to obtain the similarity of the two target objects.

[0059] The following takes the graphic design field as an example. Figure 3 The specific implementation process of target object clustering is exemplified. The following embodiments are described using architectural design drawings as examples.

[0060] S310, constructing a grid template.

[0061] For example, as a specific example of the present application, a 4×2 grid template is constructed, where a set of coordinates corresponding to each grid can be (k, f), where k and f are integers and 0 <k≤4,0<f≤2。

[0062] S320, obtaining multiple target objects.

[0063] For example, as a specific example of the present application, two target objects are obtained, namely a first architectural design drawing and a second architectural design drawing.

[0064] S330, projecting each target object into the grid template respectively, and extracting a feature sequence corresponding to each target object.

[0065] It should be noted that, for the sake of simplicity, S320 takes one target object as an example to illustrate the implementation process of obtaining the feature sequence of each target object.

[0066] For example, as a specific example of the present application, the first architectural design drawing is projected into a 4×2 grid template, such as Figure 4 As shown. Figure 4 It can be seen that when the first architectural design drawing is projected onto the grid template, it is necessary to ensure that the long side of the design drawing can fill each grid as much as possible.

[0067] In addition, from Figure 4 It can be seen that the first architectural design drawing includes the following structural components: bedroom one, bedroom two, entrance hall, kitchen, bathroom, living and dining room, and bedroom three.

[0068] S331, obtaining the sub-feature sequence according to the position of each structural component in the grid template.

[0069] For example, according to the position of each structural component projected in the grid template, the sub-feature sequence of each structural component is obtained respectively, that is, the sub-feature sequence corresponding to bedroom one is {(1,1)}, the sub-feature sequence corresponding to bedroom two is {(1,2)}, the sub-feature sequence corresponding to the entrance hall is {(2,1)}, the sub-feature sequence corresponding to the kitchen is {(2,2)}, the sub-feature sequence corresponding to the bathroom is {(2,2),(3,2)}, the sub-feature sequence corresponding to the living and dining room is {(3,1),(4,1)}, and the sub-feature sequence corresponding to bedroom three is {(3,2),(4,2)}.

[0070] In addition, as a specific example of the present application, first, the two sets of coordinates corresponding to the living room and dining room are obtained as (4, 1) and (3, 1), and then the two sets of coordinates in the living room and dining room need to be sorted (the specific sorting method can refer to the above embodiment, and for the sake of brevity, it will not be repeated here). Finally, the sub-feature sequence corresponding to the sorted living room and dining room is {(3,1), (4,1)}.

[0071] S332, integrating the sub-feature sequences of each structural component to obtain the feature sequence of the target object.

[0072] For example, the sub-feature sequences corresponding to the various structural components in the first architectural design drawing are merged to obtain the feature sequence of the first architectural design drawing, wherein the sub-feature sequences of the various structural components can be clearly seen in the feature sequence of the first architectural design drawing.

[0073] It can be understood that the feature sequence of the second building design drawing can be obtained through the above method.

[0074] S340: Obtain clustering results for the multiple target objects according to the feature sequence.

[0075] For example, as a specific example of the present application, the longest common substring algorithm is used to obtain the similarity of each structural component of the sub-feature sequence corresponding to each structural component in the feature sequence of the first architectural design drawing and the sub-feature sequence corresponding to each structural component in the feature sequence of the second architectural design drawing. That is, the similarity of bedroom one, the similarity of bedroom two, the similarity of the entrance hall, the similarity of the kitchen, the similarity of the bathroom, the similarity of the living room and dining room, and the similarity of bedroom three. Then, the similarity of bedroom one, the similarity of bedroom two, the similarity of the entrance hall, the similarity of the kitchen, the similarity of the bathroom, the similarity of the living room and dining room, and the similarity of bedroom three are added to obtain the similarity of the first architectural design drawing and the second architectural design drawing. If the similarity is greater than or equal to the preset threshold, the first architectural design drawing and the second architectural design drawing are classified into one category, otherwise, the first architectural design drawing and the second architectural design drawing do not belong to the same category.

[0076] Please refer to Figure 5 , Figure 5 The block diagram of the target object clustering device provided by some embodiments of the present application is shown. It should be understood that the target object clustering device corresponds to the above method embodiment and can execute each step involved in the above method embodiment. The specific functions of the target object clustering device can be found in the description above. To avoid repetition, the detailed description is appropriately omitted here.

[0077] Figure 5 The device for clustering target objects includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the device for clustering target objects, and the device for clustering target objects includes: an acquisition module 510, which is at least configured to acquire multiple target objects; a feature extraction module 520, which is at least configured to project each target object into a grid template respectively and extract a feature sequence corresponding to each target object; a clustering result acquisition module 530, which is at least configured to acquire clustering results for the multiple target objects according to the feature sequence.

[0078] In some embodiments of the present application, the target object is a graphic, and each graphic includes multiple structural parts, wherein the feature extraction module 520 is at least configured to project the i-th graphic into the grid template, and extract the sub-feature sequence of each structural part included in the i-th graphic to obtain the feature sequence, wherein a sub-feature sequence is used to characterize the characteristics of a structural part, and the i-th graphic is any target object.

[0079] In some embodiments of the present application, the feature extraction module 520 is at least configured to obtain the sub-feature sequence according to the position of each structural component in the grid template.

[0080] In some embodiments of the present application, the feature extraction module 520 is at least configured to confirm that when the x-th structural component is projected onto a first grid of the grid template, a set of coordinates corresponding to the first grid is used to characterize the x-th structural component, wherein the set of coordinates is the sub-feature sequence.

[0081] In some embodiments of the present application, the feature extraction module 520 is at least configured to confirm that when the yth structural component is projected onto multiple second grids of the grid template, use multiple groups of coordinates corresponding to the multiple second grids to characterize the yth structural component, wherein one group of coordinates is used to characterize the position of a second grid on the grid template; and sort the multiple groups of coordinates to obtain a sub-feature sequence corresponding to the yth structural component.

[0082] In some embodiments of the present application, the set of coordinates is a two-dimensional coordinate, the horizontal coordinate of the two-dimensional coordinate is the row number of each grid in the grid template, and the vertical coordinate of the two-dimensional coordinate is the column number of each grid in the grid template, wherein the feature extraction module 520 is at least configured to obtain the mth group of coordinates (a, b) and the nth group of coordinates (c, d) from the multiple groups of coordinates; if a is less than c, or if a is equal to c and b is less than d, then the mth group of coordinates is located before the nth group of coordinates in the sub-feature sequence; if a is greater than c, then the mth group of coordinates is located after the nth group of coordinates in the sub-feature sequence.

[0083] In some embodiments of the present application, the clustering result acquisition module 530 is at least configured to acquire the similarity between the feature sequences corresponding to each target object; and acquire the clustering result according to the similarity.

[0084] In some embodiments of the present application, the clustering result acquisition module 530 can also be configured to obtain a sub-feature sequence of each structural component included in the i-th graphic and a sub-feature sequence of each structural component included in the t-th graphic; obtain the similarity of each structural component in the i-th graphic and the t-th graphic based on the sub-feature sequence of each structural component in the i-th graphic and the sub-feature sequence of each structural component in the t-th graphic; perform weighted calculation on the similarities of the structural components to obtain the similarity between the feature sequence corresponding to the i-th graphic and the feature sequence corresponding to the t-th graphic.

[0085] Some embodiments of the present application further provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, can implement the operations of the method corresponding to any embodiment of the method for clustering target objects provided in the above embodiments.

[0086] Some embodiments of the present application further provide a computer program product, which includes a computer program, wherein when the computer program is executed by a processor, it can implement the operations of the method corresponding to any embodiment of the method for clustering target objects provided in the above embodiments.

[0087] like Figure 6 As shown, some embodiments of the present application provide an electronic device 600, which includes: a memory 610, a processor 620, and a computer program stored in the memory 610 and executable on the processor 620, wherein the processor 620 reads the program from the memory 610 via a bus 630 and executes the program to implement a method of any embodiment included in the above-mentioned method for clustering target objects.

[0088] Processor 620 can process digital signals and can include various computing structures, such as complex instruction set computer structure, reduced instruction set computer structure, or a structure that implements a combination of multiple instruction sets. In some examples, processor 620 can be a microprocessor.

[0089] The memory 610 may be used to store instructions executed by the processor 620 or data related to the execution of instructions. These instructions and / or data may include codes for implementing some or all functions of one or more modules described in the embodiments of the present application. The processor 620 of the disclosed embodiment may be used to execute instructions in the memory 610 to implement the method shown above. The memory 610 includes a dynamic random access memory, a static random access memory, a flash memory, an optical memory, or other memory known to those skilled in the art.

[0090] The above description is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in the subsequent drawings.

[0091] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0092] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

Claims

1. A method for clustering target objects, characterized in that: include: Get multiple target objects; The types of target objects include: design drawings, images; Project each target object into the grid template respectively, and extract the feature sequence corresponding to each target object; Acquire clustering results for the multiple target objects according to the feature sequence; the clustering results are determined by the similarity between the multiple target objects; The method for obtaining the similarity between any two target objects among the multiple target objects is as follows: Obtaining a sub-feature sequence of each structural component included in the i-th graphic and a sub-feature sequence of each structural component included in the t-th graphic; According to the sub-feature sequence of each structural component in the i-th graphic and the sub-feature sequence of each structural component in the t-th graphic, obtaining the similarity of each structural component in the i-th graphic and the t-th graphic; A weighted calculation is performed on the similarities of the structural components to obtain the similarity between the feature sequence corresponding to the i-th graphic and the feature sequence corresponding to the t-th graphic.

2. The method according to claim 1, characterized in that The target object is a graphic, and each graphic includes a plurality of structural parts, wherein: The step of projecting each target object into a grid template and extracting a feature sequence corresponding to each target object comprises: The i-th figure is projected into the grid template, and sub-feature sequences of each structural part included in the i-th figure are extracted to obtain the feature sequence, wherein a sub-feature sequence is used to characterize the features of a structural part, and the i-th figure is any target object.

3. The method according to claim 2, characterized in that The extracting of the sub-feature sequence of each structural component included in the i-th graphic includes: The sub-feature sequence is obtained according to the position of each structural component in the grid template.

4. The method according to claim 3, characterized in that The obtaining of the sub-feature sequence according to the position of each structural component in the grid template comprises: When it is confirmed that the x-th structural component is projected onto a first grid of the grid template, a set of coordinates corresponding to the first grid is used to characterize the x-th structural component, wherein the set of coordinates is the sub-feature sequence.

5. The method according to claim 4, characterized in that The obtaining of the sub-feature sequence according to the position of each structural component in the grid template comprises: When confirming that the yth structure is projected onto a plurality of second grids of the grid template, using a plurality of sets of coordinates corresponding to the plurality of second grids to characterize the yth structure, wherein a set of coordinates is used to characterize a position of a second grid on the grid template; The multiple groups of coordinates are sorted to obtain a sub-feature sequence corresponding to the y-th structural component.

6. The method according to claim 5, characterized in that The set of coordinates is a two-dimensional coordinate, the horizontal coordinate of the two-dimensional coordinate is the row number of each grid in the grid template, and the vertical coordinate of the two-dimensional coordinate is the column number of each grid in the grid template, wherein, The step of sorting the multiple groups of coordinates to obtain a sub-feature sequence corresponding to the y-th structural component includes: Obtaining the mth group of coordinates (a, b) and the nth group of coordinates (c, d) from the multiple groups of coordinates; If a is less than c, or if a is equal to c and b is less than d, then the mth group of coordinates is located before the nth group of coordinates in the sub-feature sequence; If a is greater than c, then the mth group of coordinates is located after the nth group of coordinates in the sub-feature sequence.

7. The method according to any one of claims 1 to 4, characterized in that: The obtaining clustering results for the multiple target objects according to the feature sequence includes: Obtain the similarity between the feature sequences corresponding to each target object; The clustering result is obtained according to the similarity.

8. A device for clustering target objects, characterized in that: The device is used to perform the method according to claim 1, comprising: An acquisition module is configured to acquire a plurality of target objects; A feature extraction module is configured to project each target object into the grid template and extract a feature sequence corresponding to each target object; The clustering result acquisition module is configured to acquire clustering results for the multiple target objects according to the feature sequence.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method described in any one of claims 1 to 7 can be implemented.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the method described in any one of claims 1 to 7 can be implemented.

11. A computer program product, characterized in that The computer program product comprises a computer program, wherein the computer program can implement the method according to any one of claims 1 to 7 when executed by a processor.

Citation Information

Patent Citations

  • Target typical activity mode deviation warning method

    CN111209457A